abc/src/bool/lucky/luckyFast16.c
// we need next two functions only for verification of lucky method in debugging mode 
we need next two functions only for verification of lucky method in debugging mode
we need next two functions only for verification of lucky method in debugging mode
void swapAndFlip(word* pAfter, int nVars, int iVarInPosition, int jVar, char * pCanonPerm, unsigned* pUCanonPhase)
{
    int Temp;
    swap_ij(pAfter, nVars, iVarInPosition, jVar);
    Temp = pCanonPerm[iVarInPosition];
    pCanonPerm[iVarInPosition] = pCanonPerm[jVar];
    pCanonPerm[jVar] = Temp;
    if ( ((*pUCanonPhase & (1 << iVarInPosition)) > 0) != ((*pUCanonPhase & (1 << jVar)) > 0) )
    {
        *pUCanonPhase ^= (1 << iVarInPosition);
        *pUCanonPhase ^= (1 << jVar);
    }
    if((*pUCanonPhase>>iVarInPosition) & 1)
        Kit_TruthChangePhase_64bit( pAfter, nVars, iVarInPosition );
}
void swapAndFlip ( word * pAfter , int nVars , int iVarInPosition , int jVar , char * pCanonPerm , unsigned * pUCanonPhase ) { int Temp ; swap_ij ( pAfter , nVars , iVarInPosition , jVar ) ; Temp = pCanonPerm [ iVarInPosition ] ; pCanonPerm [ iVarInPosition ] = pCanonPerm [ jVar ] ; pCanonPerm [ jVar ] = Temp ; if ( ( ( * pUCanonPhase & ( 1 << iVarInPosition ) ) > 0 ) != ( ( * pUCanonPhase & ( 1 << jVar ) ) > 0 ) ) { * pUCanonPhase ^= ( 1 << iVarInPosition ) ; * pUCanonPhase ^= ( 1 << jVar ) ; } if ( ( * pUCanonPhase >> iVarInPosition ) & 1 ) Kit_TruthChangePhase_64bit ( pAfter , nVars , iVarInPosition ) ; }
we need next two functions only for verification of lucky method in debugging mode
we need next two functions only for verification of lucky method in debugging mode