abc/src/bool/lucky/luckyFast16.c
// this function finds minimal for all TIED(and tied only) iVars 
//it finds tied vars based on rearranged  Store info - group of tied vars has the same bit count in Store
this function finds minimal for all TIED(and tied only) iVars
it finds tied vars based on rearranged  Store info - group of tied vars has the same bit count in Store
this function finds minimal for all TIED ( and tied only ) iVars it finds tied vars based on rearranged Store info - group of tied vars has the same bit count in Store
int minimalSwapAndFlipIVar_superFast_all(word* pInOut, int nVars, int nWords, int * pStore, char * pCanonPerm, unsigned* pCanonPhase)
{
    int i;
    word pDuplicate[1024];  
    int bitInfoTemp = pStore[0];
    memcpy(pDuplicate,pInOut,nWords*sizeof(word));
    for(i=0;i<5;i++)
    {
        if(bitInfoTemp == pStore[i+1])
            minimalSwapAndFlipIVar_superFast_lessThen5(pInOut, i, nWords, pCanonPerm, pCanonPhase);
        else
        {
            bitInfoTemp = pStore[i+1];
            continue;
        }
    }
    if(bitInfoTemp == pStore[i+1])
        minimalSwapAndFlipIVar_superFast_iVar5((unsigned*) pInOut, nWords, pCanonPerm, pCanonPhase);
    else    
        bitInfoTemp = pStore[i+1];
    for(i=6;i<nVars-1;i++)
    {
        if(bitInfoTemp == pStore[i+1])
            minimalSwapAndFlipIVar_superFast_moreThen5(pInOut, i, nWords, pCanonPerm, pCanonPhase);
        else
        {
            bitInfoTemp = pStore[i+1];
            continue;
        }
    }
    if(memcmp(pInOut,pDuplicate , nWords*sizeof(word)) == 0)
        return 0;
    else
        return 1;
}
int minimalSwapAndFlipIVar_superFast_all ( word * pInOut , int nVars , int nWords , int * pStore , char * pCanonPerm , unsigned * pCanonPhase ) { int i ; word pDuplicate [ 1024 ] ; int bitInfoTemp = pStore [ 0 ] ; memcpy ( pDuplicate , pInOut , nWords * sizeof ( word ) ) ; for ( i = 0 ; i < 5 ; i ++ ) { if ( bitInfoTemp == pStore [ i + 1 ] ) minimalSwapAndFlipIVar_superFast_lessThen5 ( pInOut , i , nWords , pCanonPerm , pCanonPhase ) ; else { bitInfoTemp = pStore [ i + 1 ] ; continue ; } } if ( bitInfoTemp == pStore [ i + 1 ] ) minimalSwapAndFlipIVar_superFast_iVar5 ( ( unsigned * ) pInOut , nWords , pCanonPerm , pCanonPhase ) ; else bitInfoTemp = pStore [ i + 1 ] ; for ( i = 6 ; i < nVars - 1 ; i ++ ) { if ( bitInfoTemp == pStore [ i + 1 ] ) minimalSwapAndFlipIVar_superFast_moreThen5 ( pInOut , i , nWords , pCanonPerm , pCanonPhase ) ; else { bitInfoTemp = pStore [ i + 1 ] ; continue ; } } if ( memcmp ( pInOut , pDuplicate , nWords * sizeof ( word ) ) == 0 ) return 0 ; else return 1 ; }
this function finds minimal for all TIED(and tied only) iVars
it finds tied vars based on rearranged  Store info - group of tied vars has the same bit count in Store
this function finds minimal for all TIED ( and tied only ) iVars it finds tied vars based on rearranged Store info - group of tied vars has the same bit count in Store
//    printf("in minimalSwapAndFlipIVar_superFast_all\n"); //    printf("out minimalSwapAndFlipIVar_superFast_all\n");