Integrated new fast semi-canonical form for Boolean functions up to 16 inputs.

This commit is contained in:
Alan Mishchenko 2012-09-06 15:52:54 -07:00
parent 7a6cf9f48c
commit 39fe23f079
7 changed files with 188 additions and 188 deletions

View File

@ -1619,8 +1619,8 @@ s_pMan->timeBuild += clock() - timeBuild;
timeInsert = clock(); timeInsert = clock();
Abc_NtkRecInsertToLookUpTable2(s_pMan, ppSpot, pPO, nLeaves, pTruth, s_pMan->fTrim); Abc_NtkRecInsertToLookUpTable2(s_pMan, ppSpot, pPO, nLeaves, pTruth, s_pMan->fTrim);
s_pMan->timeInsert += clock() - timeInsert; s_pMan->timeInsert += clock() - timeInsert;
// if (pIfMan->pPars->fDelayOpt) // if (pIfMan->pPars->fDelayOpt)
// Abc_NtkRecAddSOPB(pIfMan, pCut, pTruth, pCanonPerm, uCanonPhase ); // Abc_NtkRecAddSOPB(pIfMan, pCut, pTruth, pCanonPerm, uCanonPhase );
return 1; return 1;
} }

View File

@ -159,117 +159,117 @@ void freeArrayB(word* b)
// if pInOnt changed(minimized) by function return 1 if not 0 // if pInOnt changed(minimized) by function return 1 if not 0
// inline int minimalInitialFlip_propper(word* pInOut, word* pDuplicat, int nVars) // inline int minimalInitialFlip_propper(word* pInOut, word* pDuplicat, int nVars)
// { // {
// word oneWord=1; // word oneWord=1;
// Kit_TruthCopy_64bit( pDuplicat, pInOut, nVars ); // Kit_TruthCopy_64bit( pDuplicat, pInOut, nVars );
// Kit_TruthNot_64bit( pDuplicat, nVars ); // Kit_TruthNot_64bit( pDuplicat, nVars );
// if( memCompare(pDuplicat,pInOut,nVars) == -1) // if( memCompare(pDuplicat,pInOut,nVars) == -1)
// { // {
// Kit_TruthCopy_64bit(pInOut, pDuplicat, nVars ); // Kit_TruthCopy_64bit(pInOut, pDuplicat, nVars );
// return 1; // return 1;
// } // }
// return 0; // return 0;
// } // }
// inline int minimalFlip(word* pInOut, word* pMinimal, word* PDuplicat, int nVars) // inline int minimalFlip(word* pInOut, word* pMinimal, word* PDuplicat, int nVars)
// { // {
// int i; // int i;
// int blockSize = Kit_TruthWordNum_64bit( nVars )*sizeof(word); // int blockSize = Kit_TruthWordNum_64bit( nVars )*sizeof(word);
// memcpy(pMinimal, pInOut, blockSize); // memcpy(pMinimal, pInOut, blockSize);
// memcpy(PDuplicat, pInOut, blockSize); // memcpy(PDuplicat, pInOut, blockSize);
// for(i=0;i<nVars;i++) // for(i=0;i<nVars;i++)
// { // {
// Kit_TruthChangePhase_64bit( pInOut, nVars, i ); // Kit_TruthChangePhase_64bit( pInOut, nVars, i );
// if( memCompare(pMinimal,pInOut,nVars) == 1) // if( memCompare(pMinimal,pInOut,nVars) == 1)
// memcpy(pMinimal, pInOut, blockSize); // memcpy(pMinimal, pInOut, blockSize);
// memcpy(pInOut,PDuplicat,blockSize); // memcpy(pInOut,PDuplicat,blockSize);
// } // }
// memcpy(pInOut,pMinimal,blockSize); // memcpy(pInOut,pMinimal,blockSize);
// if(memCompare(pMinimal,PDuplicat,nVars) == 0) // if(memCompare(pMinimal,PDuplicat,nVars) == 0)
// return 0; // return 0;
// else // else
// return 1; // return 1;
// } // }
// inline int minimalSwap(word* pInOut, word* pMinimal, word* PDuplicat, int nVars) // inline int minimalSwap(word* pInOut, word* pMinimal, word* PDuplicat, int nVars)
// { // {
// int i; // int i;
// int blockSize = Kit_TruthWordNum_64bit( nVars )*sizeof(word); // int blockSize = Kit_TruthWordNum_64bit( nVars )*sizeof(word);
// memcpy(pMinimal, pInOut, blockSize); // memcpy(pMinimal, pInOut, blockSize);
// memcpy(PDuplicat, pInOut, blockSize); // memcpy(PDuplicat, pInOut, blockSize);
// for(i=0;i<nVars-1;i++) // for(i=0;i<nVars-1;i++)
// { // {
// Kit_TruthSwapAdjacentVars_64bit( pInOut, nVars, i ); // Kit_TruthSwapAdjacentVars_64bit( pInOut, nVars, i );
// if(memCompare(pMinimal,pInOut,nVars) == 1) // if(memCompare(pMinimal,pInOut,nVars) == 1)
// memcpy(pMinimal, pInOut, blockSize); // memcpy(pMinimal, pInOut, blockSize);
// memcpy(pInOut,PDuplicat,blockSize); // memcpy(pInOut,PDuplicat,blockSize);
// } // }
// memcpy(pInOut,pMinimal,blockSize); // memcpy(pInOut,pMinimal,blockSize);
// if(memCompare(pMinimal,PDuplicat,nVars) == 0) // if(memCompare(pMinimal,PDuplicat,nVars) == 0)
// return 0; // return 0;
// else // else
// return 1; // return 1;
// } // }
// //
// void luckyCanonicizer(word* pInOut, word* pAux, word* pAux1, int nVars, cycleCtr* cCtr) // void luckyCanonicizer(word* pInOut, word* pAux, word* pAux1, int nVars, cycleCtr* cCtr)
// { // {
// int counter=1, cycles=0; // int counter=1, cycles=0;
// assert( nVars <= 16 ); // assert( nVars <= 16 );
// while(counter>0 ) // && cycles < 10 if we wanna limit cycles // while(counter>0 ) // && cycles < 10 if we wanna limit cycles
// { // {
// counter=0; // counter=0;
// counter += minimalInitialFlip(pInOut, nVars); // counter += minimalInitialFlip(pInOut, nVars);
// counter += minimalFlip(pInOut, pAux, pAux1, nVars); // counter += minimalFlip(pInOut, pAux, pAux1, nVars);
// counter += minimalSwap(pInOut, pAux, pAux1, nVars); // counter += minimalSwap(pInOut, pAux, pAux1, nVars);
// cCtr->totalCycles++; // cCtr->totalCycles++;
// cycles++; // cycles++;
// } // }
// if(cycles < cCtr->minNCycles) // if(cycles < cCtr->minNCycles)
// cCtr->minNCycles = cycles; // cCtr->minNCycles = cycles;
// else if(cycles > cCtr->maxNCycles) // else if(cycles > cCtr->maxNCycles)
// cCtr->maxNCycles = cycles; // cCtr->maxNCycles = cycles;
// } // }
// runs paralel F and ~F in luckyCanonicizer // runs paralel F and ~F in luckyCanonicizer
// void luckyCanonicizer2(word* pInOut, word* pAux, word* pAux1, word* temp, int nVars) // void luckyCanonicizer2(word* pInOut, word* pAux, word* pAux1, word* temp, int nVars)
// { // {
// int nWords = Kit_TruthWordNum_64bit( nVars ); // int nWords = Kit_TruthWordNum_64bit( nVars );
// int counter=1, nOnes; // int counter=1, nOnes;
// assert( nVars <= 16 ); // assert( nVars <= 16 );
// nOnes = Kit_TruthCountOnes_64bit(pInOut, nVars); // nOnes = Kit_TruthCountOnes_64bit(pInOut, nVars);
// //
// if ( (nOnes*2 == nWords * 32) ) // if ( (nOnes*2 == nWords * 32) )
// { // {
// Kit_TruthCopy_64bit( temp, pInOut, nVars ); // Kit_TruthCopy_64bit( temp, pInOut, nVars );
// Kit_TruthNot_64bit( temp, nVars ); // Kit_TruthNot_64bit( temp, nVars );
// luckyCanonicizer1_simple(pInOut, pAux, pAux1, nVars); // luckyCanonicizer1_simple(pInOut, pAux, pAux1, nVars);
// luckyCanonicizer1_simple(temp, pAux, pAux1, nVars); // luckyCanonicizer1_simple(temp, pAux, pAux1, nVars);
// if( memCompare(temp,pInOut,nVars) == -1) // if( memCompare(temp,pInOut,nVars) == -1)
// Kit_TruthCopy_64bit(pInOut, temp, nVars ); // Kit_TruthCopy_64bit(pInOut, temp, nVars );
// return; // return;
// }
// while(counter>0 ) // && cycles < 10 if we wanna limit cycles
// {
// counter=0;
// counter += minimalInitialFlip_propper(pInOut, pAux, nVars);
// counter += minimalFlip1(pInOut, pAux, pAux1, nVars);
// counter += minimalSwap1(pInOut, pAux, pAux1, nVars);
// } // }
// while(counter>0 ) // && cycles < 10 if we wanna limit cycles
// {
// counter=0;
// counter += minimalInitialFlip_propper(pInOut, pAux, nVars);
// counter += minimalFlip1(pInOut, pAux, pAux1, nVars);
// counter += minimalSwap1(pInOut, pAux, pAux1, nVars);
// }
// } // }
// same as luckyCanonicizer + cycleCtr stutistics // same as luckyCanonicizer + cycleCtr stutistics
// void luckyCanonicizer1(word* pInOut, word* pAux, word* pAux1, int nVars, cycleCtr* cCtr) // void luckyCanonicizer1(word* pInOut, word* pAux, word* pAux1, int nVars, cycleCtr* cCtr)
// { // {
// int counter=1, cycles=0; // int counter=1, cycles=0;
// assert( nVars <= 16 ); // assert( nVars <= 16 );
// while(counter>0 ) // && cycles < 10 if we wanna limit cycles // while(counter>0 ) // && cycles < 10 if we wanna limit cycles
// { // {
// counter=0; // counter=0;
// counter += minimalInitialFlip1(pInOut, nVars); // counter += minimalInitialFlip1(pInOut, nVars);
// counter += minimalFlip1(pInOut, pAux, pAux1, nVars); // counter += minimalFlip1(pInOut, pAux, pAux1, nVars);
// counter += minimalSwap1(pInOut, pAux, pAux1, nVars); // counter += minimalSwap1(pInOut, pAux, pAux1, nVars);
// cCtr->totalCycles++; // cCtr->totalCycles++;
// cycles++; // cycles++;
// } // }
// if(cycles < cCtr->minNCycles) // if(cycles < cCtr->minNCycles)
// cCtr->minNCycles = cycles; // cCtr->minNCycles = cycles;
// else if(cycles > cCtr->maxNCycles) // else if(cycles > cCtr->maxNCycles)
// cCtr->maxNCycles = cycles; // cCtr->maxNCycles = cycles;
// } // }
// luckyCanonicizer // luckyCanonicizer
@ -629,22 +629,22 @@ unsigned Kit_TruthSemiCanonicize_new( unsigned * pInOut, unsigned * pAux, int nV
int main () int main ()
{ {
// char * pFileInput = "nonDSDfunc06var1M.txt"; // char * pFileInput = "nonDSDfunc06var1M.txt";
// char * pFileInput1 = "partDSDfunc06var1M.txt"; // char * pFileInput1 = "partDSDfunc06var1M.txt";
// char * pFileInput2 = "fullDSDfunc06var1M.txt"; // char * pFileInput2 = "fullDSDfunc06var1M.txt";
// char * pFileInput = "nonDSDfunc10var100K.txt"; // char * pFileInput = "nonDSDfunc10var100K.txt";
// char * pFileInput1 = "partDSDfunc10var100K.txt"; // char * pFileInput1 = "partDSDfunc10var100K.txt";
// char * pFileInput2 = "fullDSDfunc10var100K.txt"; // char * pFileInput2 = "fullDSDfunc10var100K.txt";
// char * pFileInput = "partDSDfunc12var100K.txt"; // char * pFileInput = "partDSDfunc12var100K.txt";
// char * pFileInput = "nonDSDfunc12var100K.txt"; // char * pFileInput = "nonDSDfunc12var100K.txt";
// char * pFileInput1 = "partDSDfunc12var100K.txt"; // char * pFileInput1 = "partDSDfunc12var100K.txt";
// char * pFileInput2 = "fullDSDfunc12var100K.txt"; // char * pFileInput2 = "fullDSDfunc12var100K.txt";
// char * pFileInput = "nonDSDfunc14var10K.txt"; // char * pFileInput = "nonDSDfunc14var10K.txt";
// char * pFileInput1 = "partDSDfunc14var10K.txt"; // char * pFileInput1 = "partDSDfunc14var10K.txt";
// char * pFileInput2 = "fullDSDfunc14var10K.txt"; // char * pFileInput2 = "fullDSDfunc14var10K.txt";
char * pFileInput = "nonDSDfunc16var10K.txt"; char * pFileInput = "nonDSDfunc16var10K.txt";
char * pFileInput1 = "partDSDfunc16var10K.txt"; char * pFileInput1 = "partDSDfunc16var10K.txt";
@ -656,7 +656,7 @@ int main ()
Abc_TtStore_t* p; Abc_TtStore_t* p;
word * pAux, * pAux1; word * pAux, * pAux1;
int * pStore; int * pStore;
// cycleCtr* cCtr; // cycleCtr* cCtr;
charArray = (char**)malloc(sizeof(char*)*3); charArray = (char**)malloc(sizeof(char*)*3);
charArray[0] = pFileInput; charArray[0] = pFileInput;
@ -665,34 +665,34 @@ int main ()
for(j=0;j<3;j++) for(j=0;j<3;j++)
{ {
p = setTtStore(charArray[j]); p = setTtStore(charArray[j]);
// p = setTtStore(pFileInput); // p = setTtStore(pFileInput);
a = makeArray(p); a = makeArray(p);
b = makeArray(p); b = makeArray(p);
// cCtr = setCycleCtrPtr(); // cCtr = setCycleCtrPtr();
pAux = (word*)malloc(sizeof(word)*(p->nWords)); pAux = (word*)malloc(sizeof(word)*(p->nWords));
pAux1 = (word*)malloc(sizeof(word)*(p->nWords)); pAux1 = (word*)malloc(sizeof(word)*(p->nWords));
pStore = (int*)malloc(sizeof(int)*(p->nVars)); pStore = (int*)malloc(sizeof(int)*(p->nVars));
printf("In %s Fs at start = %d\n",charArray[j],p->nFuncs); printf("In %s Fs at start = %d\n",charArray[j],p->nFuncs);
tempNF = p->nFuncs; tempNF = p->nFuncs;
TimePrint("start"); TimePrint("start");
for(i=0;i<p->nFuncs;i++) for(i=0;i<p->nFuncs;i++)
luckyCanonicizer_final(a[i], pAux, pAux1, p->nVars, pStore); luckyCanonicizer_final(a[i], pAux, pAux1, p->nVars, pStore);
TimePrint("done with A"); TimePrint("done with A");
sortAndUnique(a, p); sortAndUnique(a, p);
printf("F left in A final = %d\n",p->nFuncs); printf("F left in A final = %d\n",p->nFuncs);
freeArray(a,p); freeArray(a,p);
TimePrint("Done with sort"); TimePrint("Done with sort");
// delete data-structures // delete data-structures
free(pAux); free(pAux);
free(pAux1); free(pAux1);
free(pStore); free(pStore);
// freeCycleCtr(cCtr); // freeCycleCtr(cCtr);
Abc_TruthStoreFree( p ); Abc_TruthStoreFree( p );
} }
return 0; return 0;

View File

@ -176,7 +176,7 @@ inline void minimalSwapAndFlipIVar_superFast_lessThen5(word* pInOut, int iVar, i
int min1, min2, DifStart0, DifStart1, DifStartMin; int min1, min2, DifStart0, DifStart1, DifStartMin;
int M[2]; int M[2];
int blockSize = 1<<iVar; int blockSize = 1<<iVar;
int shiftSize = blockSize*4; // int shiftSize = blockSize*4;
M[0] = minTemp0_fast(pInOut, iVar, nWords, &DifStart0); // 0, 3 M[0] = minTemp0_fast(pInOut, iVar, nWords, &DifStart0); // 0, 3
M[1] = minTemp1_fast(pInOut, iVar, nWords, &DifStart1); // 1, 2 M[1] = minTemp1_fast(pInOut, iVar, nWords, &DifStart1); // 1, 2
@ -513,7 +513,7 @@ inline void minimalSwapAndFlipIVar_superFast_moreThen5(word* pInOut, int iVar, i
int M[2]; int M[2];
word temp[1024]; word temp[1024];
int blockSize = 1<<(iVar-6); int blockSize = 1<<(iVar-6);
int shiftSize = blockSize*4; // int shiftSize = blockSize*4;
M[0] = minTemp0_fast_moreThen5(pInOut, iVar, nWords, &DifStart0); // 0, 3 M[0] = minTemp0_fast_moreThen5(pInOut, iVar, nWords, &DifStart0); // 0, 3
M[1] = minTemp1_fast_moreThen5(pInOut, iVar, nWords, &DifStart1); // 1, 2 M[1] = minTemp1_fast_moreThen5(pInOut, iVar, nWords, &DifStart1); // 1, 2
@ -602,21 +602,21 @@ inline void luckyCanonicizerS_F_first_16Vars(word* pInOut, int nVars, int nWord
inline void luckyCanonicizer_final_fast_16Vars(word* pInOut, int nVars, int nWords, int * pStore, char * pCanonPerm, unsigned* pCanonPhase) inline void luckyCanonicizer_final_fast_16Vars(word* pInOut, int nVars, int nWords, int * pStore, char * pCanonPerm, unsigned* pCanonPhase)
{ {
// word pDuplicateLocal[1024]={0}; // word pDuplicateLocal[1024]={0};
// memcpy(pDuplicateLocal,pInOut,nWords*sizeof(word)); // memcpy(pDuplicateLocal,pInOut,nWords*sizeof(word));
assert( nVars <= 16 ); assert( nVars <= 16 );
assert( nVars > 6 ); assert( nVars > 6 );
(* pCanonPhase) = Kit_TruthSemiCanonicize_Yasha1( pInOut, nVars, pCanonPerm, pStore ); (* pCanonPhase) = Kit_TruthSemiCanonicize_Yasha1( pInOut, nVars, pCanonPerm, pStore );
luckyCanonicizerS_F_first_16Vars(pInOut, nVars, nWords, pStore, pCanonPerm, pCanonPhase ); luckyCanonicizerS_F_first_16Vars(pInOut, nVars, nWords, pStore, pCanonPerm, pCanonPhase );
// memcpy(pDuplicate,pInOut,nWords*sizeof(word)); // memcpy(pDuplicate,pInOut,nWords*sizeof(word));
// assert(!luckyCheck(pDuplicate, pDuplicateLocal, nVars, pCanonPerm, * pCanonPhase)); // assert(!luckyCheck(pDuplicate, pDuplicateLocal, nVars, pCanonPerm, * pCanonPhase));
} }
// top-level procedure calling two special cases (nVars <= 6 and nVars <= 16) // top-level procedure calling two special cases (nVars <= 6 and nVars <= 16)
int luckyCanonicizer_final_fast( word * pInOut, int nVars, char * pCanonPerm ) int luckyCanonicizer_final_fast( word * pInOut, int nVars, char * pCanonPerm )
{ {
int pStore[16]; int pStore[16];
int uCanonPhase = 0; unsigned uCanonPhase = 0;
int nWords = (nVars <= 6) ? 1 : (1 << (nVars - 6)); int nWords = (nVars <= 6) ? 1 : (1 << (nVars - 6));
if ( nVars <= 6 ) if ( nVars <= 6 )
pInOut[0] = luckyCanonicizer_final_fast_6Vars( pInOut[0], pStore, pCanonPerm, &uCanonPhase ); pInOut[0] = luckyCanonicizer_final_fast_6Vars( pInOut[0], pStore, pCanonPerm, &uCanonPhase );

View File

@ -220,9 +220,9 @@ inline word Extra_Truth6MinimumRoundMany( word t, int* pStore, char* pCanonPerm,
inline word luckyCanonicizer_final_fast_6Vars(word InOut, int* pStore, char* pCanonPerm, unsigned* pCanonPhase ) inline word luckyCanonicizer_final_fast_6Vars(word InOut, int* pStore, char* pCanonPerm, unsigned* pCanonPhase )
{ {
// word temp, duplicat = InOut; // word temp, duplicat = InOut;
(* pCanonPhase) = Kit_TruthSemiCanonicize_Yasha1( &InOut, 6, pCanonPerm, pStore); (* pCanonPhase) = Kit_TruthSemiCanonicize_Yasha1( &InOut, 6, pCanonPerm, pStore);
// InOut = Extra_Truth6MinimumRoundMany(InOut, pStore, pCanonPhase, pCanonPerm ); // InOut = Extra_Truth6MinimumRoundMany(InOut, pStore, pCanonPhase, pCanonPerm );
// temp = InOut; // temp = InOut;
// assert(!luckyCheck(&temp, &duplicat, 6, pCanonPerm, * pCanonPhase)); // assert(!luckyCheck(&temp, &duplicat, 6, pCanonPerm, * pCanonPhase));
// return(InOut); // return(InOut);

View File

@ -118,9 +118,9 @@ inline void Kit_TruthChangePhase_64bit( word * pInOut, int nVars, int iVar )
memcpy(Temp,pInOut,SizeOfBlock); memcpy(Temp,pInOut,SizeOfBlock);
memcpy(pInOut,pInOut+Step,SizeOfBlock); memcpy(pInOut,pInOut+Step,SizeOfBlock);
memcpy(pInOut+Step,Temp,SizeOfBlock); memcpy(pInOut+Step,Temp,SizeOfBlock);
// Temp = pInOut[i]; // Temp = pInOut[i];
// pInOut[i] = pInOut[Step+i]; // pInOut[i] = pInOut[Step+i];
// pInOut[Step+i] = Temp; // pInOut[Step+i] = Temp;
pInOut += 2*Step; pInOut += 2*Step;
} }
} }
@ -250,8 +250,8 @@ inline unsigned Kit_TruthSemiCanonicize_Yasha1( word* pInOut, int nVars, char *
assert( nVars <= 16 ); assert( nVars <= 16 );
nOnes = Kit_TruthCountOnes_64bit(pInOut, nVars); nOnes = Kit_TruthCountOnes_64bit(pInOut, nVars);
// if ( (nOnes == nWords * 32) ) // if ( (nOnes == nWords * 32) )
// return 999999; // return 999999;
if ( (nOnes > nWords * 32) ) if ( (nOnes > nWords * 32) )
{ {
@ -266,8 +266,8 @@ inline unsigned Kit_TruthSemiCanonicize_Yasha1( word* pInOut, int nVars, char *
// canonicize phase // canonicize phase
for ( i = 0; i < nVars; i++ ) for ( i = 0; i < nVars; i++ )
{ {
// if ( pStore[i] == nOnes-pStore[i]) // if ( pStore[i] == nOnes-pStore[i])
// return 999999; // return 999999;
if ( pStore[i] >= nOnes-pStore[i]) if ( pStore[i] >= nOnes-pStore[i])
continue; continue;
uCanonPhase |= (1 << i); uCanonPhase |= (1 << i);
@ -311,14 +311,14 @@ inline unsigned Kit_TruthSemiCanonicize_Yasha1( word* pInOut, int nVars, char *
// int pStore[16]; // int pStore[16];
// int nWords = Kit_TruthWordNum_64bit( nVars ); // int nWords = Kit_TruthWordNum_64bit( nVars );
// int i, Temp, fChange, nOnes; // int i, Temp, fChange, nOnes;
// assert( nVars <= 16 ); // assert( nVars <= 16 );
// //
// nOnes = Kit_TruthCountOnes_64bit(pInOut, nVars); // nOnes = Kit_TruthCountOnes_64bit(pInOut, nVars);
// //
// if ( (nOnes > nWords * 32) ) // if ( (nOnes > nWords * 32) )
// { // {
// Kit_TruthNot_64bit( pInOut, nVars ); // Kit_TruthNot_64bit( pInOut, nVars );
// nOnes = nWords*64 - nOnes; // nOnes = nWords*64 - nOnes;
// } // }
// //
// // collect the minterm counts // // collect the minterm counts

View File

@ -24,7 +24,7 @@ void swap_ij_case1( word* f,int totalVars, int i, int j)
{ {
int e,wordsNumber,n,shift; int e,wordsNumber,n,shift;
word maskArray[45]= word maskArray[45]=
{ 0x9999999999999999, 0x2222222222222222, 0x4444444444444444 ,0xA5A5A5A5A5A5A5A5, 0x0A0A0A0A0A0A0A0A, 0x5050505050505050, { 0x9999999999999999, 0x2222222222222222, 0x4444444444444444 ,0xA5A5A5A5A5A5A5A5, 0x0A0A0A0A0A0A0A0A, 0x5050505050505050,
0xAA55AA55AA55AA55, 0x00AA00AA00AA00AA, 0x5500550055005500 ,0xAAAA5555AAAA5555, 0x0000AAAA0000AAAA, 0x5555000055550000 , 0xAA55AA55AA55AA55, 0x00AA00AA00AA00AA, 0x5500550055005500 ,0xAAAA5555AAAA5555, 0x0000AAAA0000AAAA, 0x5555000055550000 ,
0xAAAAAAAA55555555, 0x00000000AAAAAAAA, 0x5555555500000000 ,0xC3C3C3C3C3C3C3C3, 0x0C0C0C0C0C0C0C0C, 0x3030303030303030 , 0xAAAAAAAA55555555, 0x00000000AAAAAAAA, 0x5555555500000000 ,0xC3C3C3C3C3C3C3C3, 0x0C0C0C0C0C0C0C0C, 0x3030303030303030 ,
0xCC33CC33CC33CC33, 0x00CC00CC00CC00CC, 0x3300330033003300 ,0xCCCC3333CCCC3333, 0x0000CCCC0000CCCC, 0x3333000033330000 , 0xCC33CC33CC33CC33, 0x00CC00CC00CC00CC, 0x3300330033003300 ,0xCCCC3333CCCC3333, 0x0000CCCC0000CCCC, 0x3333000033330000 ,
@ -51,7 +51,7 @@ void swap_ij_case2( word* f,int totalVars, int i, int j)
word temp; word temp;
int x,y,wj; int x,y,wj;
int WORDS_IN_TT = Kit_TruthWordNum_64bit(totalVars); int WORDS_IN_TT = Kit_TruthWordNum_64bit(totalVars);
// int forShift = ((Word)1)<<i; // int forShift = ((Word)1)<<i;
int forShift = (1<<i); int forShift = (1<<i);
wj = 1 << (j - 6); wj = 1 << (j - 6);
x = 0; x = 0;