abc/src/proof/acec/acecFadds.c
// returns array of 5-tuples containing inputs/sum/cout of each full adder
returns array of 5-tuples containing inputs/sum/cout of each full adder
returns array of 5 - tuples containing inputs / sum / cout of each full adder
Vec_Int_t * Gia_ManDetectFullAdders( Gia_Man_t * p, int fVerbose, Vec_Int_t ** pvCutsXor2 )
{
    Vec_Int_t * vCutsXor, * vCutsMaj, * vFadds;
    Dtc_ManComputeCuts( p, pvCutsXor2, &vCutsXor, &vCutsMaj, fVerbose );
    qsort( Vec_IntArray(vCutsXor), Vec_IntSize(vCutsXor)/4, 16, (int (*)(const void *, const void *))Dtc_ManCompare );
    qsort( Vec_IntArray(vCutsMaj), Vec_IntSize(vCutsMaj)/4, 16, (int (*)(const void *, const void *))Dtc_ManCompare );
    vFadds = Dtc_ManFindCommonCuts( p, vCutsXor, vCutsMaj );
    qsort( Vec_IntArray(vFadds), Vec_IntSize(vFadds)/5, 20, (int (*)(const void *, const void *))Dtc_ManCompare2 );
    if ( fVerbose )
        printf( "XOR3 cuts = %d.  MAJ cuts = %d.  Full-adders = %d.\n", Vec_IntSize(vCutsXor)/4, Vec_IntSize(vCutsMaj)/4, Vec_IntSize(vFadds)/5 );
    if ( fVerbose )
        Dtc_ManPrintFadds( vFadds );
    Vec_IntFree( vCutsXor );
    Vec_IntFree( vCutsMaj );
    return vFadds;
}
Vec_Int_t * Gia_ManDetectFullAdders ( Gia_Man_t * p , int fVerbose , Vec_Int_t * * pvCutsXor2 ) { Vec_Int_t * vCutsXor , * vCutsMaj , * vFadds ; Dtc_ManComputeCuts ( p , pvCutsXor2 , & vCutsXor , & vCutsMaj , fVerbose ) ; qsort ( Vec_IntArray ( vCutsXor ) , Vec_IntSize ( vCutsXor ) / 4 , 16 , ( int ( * ) ( const void * , const void * ) ) Dtc_ManCompare ) ; qsort ( Vec_IntArray ( vCutsMaj ) , Vec_IntSize ( vCutsMaj ) / 4 , 16 , ( int ( * ) ( const void * , const void * ) ) Dtc_ManCompare ) ; vFadds = Dtc_ManFindCommonCuts ( p , vCutsXor , vCutsMaj ) ; qsort ( Vec_IntArray ( vFadds ) , Vec_IntSize ( vFadds ) / 5 , 20 , ( int ( * ) ( const void * , const void * ) ) Dtc_ManCompare2 ) ; if ( fVerbose ) printf ( " \n " , Vec_IntSize ( vCutsXor ) / 4 , Vec_IntSize ( vCutsMaj ) / 4 , Vec_IntSize ( vFadds ) / 5 ) ; if ( fVerbose ) Dtc_ManPrintFadds ( vFadds ) ; Vec_IntFree ( vCutsXor ) ; Vec_IntFree ( vCutsMaj ) ; return vFadds ; }
returns array of 5-tuples containing inputs/sum/cout of each full adder
returns array of 5 - tuples containing inputs / sum / cout of each full adder