Commit c890440f by Alan Mishchenko

C++ portability changes.

parent 0175e1a9
...@@ -157,7 +157,7 @@ void freeArrayB(word* b) ...@@ -157,7 +157,7 @@ void freeArrayB(word* b)
// if highest bit in F ( all ones min term ) is one => inverse // if highest bit in F ( all ones min term ) is one => inverse
// 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) // 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 );
...@@ -169,7 +169,7 @@ void freeArrayB(word* b) ...@@ -169,7 +169,7 @@ void freeArrayB(word* b)
// } // }
// return 0; // return 0;
// } // }
// inline int minimalFlip(word* pInOut, word* pMinimal, word* PDuplicat, int nVars) // 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);
...@@ -188,7 +188,7 @@ void freeArrayB(word* b) ...@@ -188,7 +188,7 @@ void freeArrayB(word* b)
// else // else
// return 1; // return 1;
// } // }
// inline int minimalSwap(word* pInOut, word* pMinimal, word* PDuplicat, int nVars) // 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);
...@@ -561,7 +561,7 @@ int luckyCheck(word* pAfter, word* pBefore, int nVars, char * pCanonPerm, unsign ...@@ -561,7 +561,7 @@ int luckyCheck(word* pAfter, word* pBefore, int nVars, char * pCanonPerm, unsign
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
inline void luckyCanonicizer(word* pInOut, word* pAux, word* pAux1, int nVars, char * pCanonPerm, char * tempArray, unsigned* p_uCanonPhase) void luckyCanonicizer(word* pInOut, word* pAux, word* pAux1, int nVars, char * pCanonPerm, char * tempArray, unsigned* p_uCanonPhase)
{ {
int counter=1; int counter=1;
assert( nVars <= 16 ); assert( nVars <= 16 );
......
...@@ -35,7 +35,7 @@ static word mask[6][2] = { ...@@ -35,7 +35,7 @@ static word mask[6][2] = {
int Kit_TruthWordNum_64bit( int nVars ) { return nVars <= 6 ? 1 : (1 << (nVars - 6));} int Kit_TruthWordNum_64bit( int nVars ) { return nVars <= 6 ? 1 : (1 << (nVars - 6));}
inline int Kit_WordCountOnes_64bit(word x) int Kit_WordCountOnes_64bit(word x)
{ {
x = x - ((x >> 1) & 0x5555555555555555); x = x - ((x >> 1) & 0x5555555555555555);
x = (x & 0x3333333333333333) + ((x >> 2) & 0x3333333333333333); x = (x & 0x3333333333333333) + ((x >> 2) & 0x3333333333333333);
...@@ -46,7 +46,7 @@ inline int Kit_WordCountOnes_64bit(word x) ...@@ -46,7 +46,7 @@ inline int Kit_WordCountOnes_64bit(word x)
return (int)(x & 0xFF); return (int)(x & 0xFF);
} }
inline int Kit_TruthCountOnes_64bit( word* pIn, int nVars ) int Kit_TruthCountOnes_64bit( word* pIn, int nVars )
{ {
int w, Counter = 0; int w, Counter = 0;
for ( w = Kit_TruthWordNum_64bit(nVars)-1; w >= 0; w-- ) for ( w = Kit_TruthWordNum_64bit(nVars)-1; w >= 0; w-- )
...@@ -54,7 +54,7 @@ inline int Kit_TruthCountOnes_64bit( word* pIn, int nVars ) ...@@ -54,7 +54,7 @@ inline int Kit_TruthCountOnes_64bit( word* pIn, int nVars )
return Counter; return Counter;
} }
inline void Kit_TruthCountOnesInCofs_64bit( word * pTruth, int nVars, int * pStore ) void Kit_TruthCountOnesInCofs_64bit( word * pTruth, int nVars, int * pStore )
{ {
int nWords = Kit_TruthWordNum_64bit( nVars ); int nWords = Kit_TruthWordNum_64bit( nVars );
int i, k, Counter; int i, k, Counter;
...@@ -97,7 +97,7 @@ inline void Kit_TruthCountOnesInCofs_64bit( word * pTruth, int nVars, int * pSto ...@@ -97,7 +97,7 @@ inline void Kit_TruthCountOnesInCofs_64bit( word * pTruth, int nVars, int * pSto
} }
} }
inline void Kit_TruthChangePhase_64bit( word * pInOut, int nVars, int iVar ) void Kit_TruthChangePhase_64bit( word * pInOut, int nVars, int iVar )
{ {
int nWords = Kit_TruthWordNum_64bit( nVars ); int nWords = Kit_TruthWordNum_64bit( nVars );
int i, Step,SizeOfBlock; int i, Step,SizeOfBlock;
...@@ -127,18 +127,18 @@ inline void Kit_TruthChangePhase_64bit( word * pInOut, int nVars, int iVar ) ...@@ -127,18 +127,18 @@ inline void Kit_TruthChangePhase_64bit( word * pInOut, int nVars, int iVar )
} }
inline void Kit_TruthNot_64bit(word * pIn, int nVars ) void Kit_TruthNot_64bit(word * pIn, int nVars )
{ {
int w; int w;
for ( w = Kit_TruthWordNum_64bit(nVars)-1; w >= 0; w-- ) for ( w = Kit_TruthWordNum_64bit(nVars)-1; w >= 0; w-- )
pIn[w] = ~pIn[w]; pIn[w] = ~pIn[w];
} }
inline void Kit_TruthCopy_64bit( word * pOut, word * pIn, int nVars ) void Kit_TruthCopy_64bit( word * pOut, word * pIn, int nVars )
{ {
memcpy(pOut,pIn,Kit_TruthWordNum_64bit(nVars)*sizeof(word)); memcpy(pOut,pIn,Kit_TruthWordNum_64bit(nVars)*sizeof(word));
} }
inline void Kit_TruthSwapAdjacentVars_64bit( word * pInOut, int nVars, int iVar ) void Kit_TruthSwapAdjacentVars_64bit( word * pInOut, int nVars, int iVar )
{ {
int i, Step, Shift, SizeOfBlock; // int i, Step, Shift, SizeOfBlock; //
word temp[256]; // to make only pInOut possible word temp[256]; // to make only pInOut possible
...@@ -183,7 +183,7 @@ inline void Kit_TruthSwapAdjacentVars_64bit( word * pInOut, int nVars, int iVar ...@@ -183,7 +183,7 @@ inline void Kit_TruthSwapAdjacentVars_64bit( word * pInOut, int nVars, int iVar
} }
} }
inline unsigned Kit_TruthSemiCanonicize_Yasha( word* pInOut, int nVars, char * pCanonPerm ) unsigned Kit_TruthSemiCanonicize_Yasha( word* pInOut, int nVars, char * pCanonPerm )
{ {
int pStore[16]; int pStore[16];
int nWords = Kit_TruthWordNum_64bit( nVars ); int nWords = Kit_TruthWordNum_64bit( nVars );
...@@ -242,7 +242,7 @@ inline unsigned Kit_TruthSemiCanonicize_Yasha( word* pInOut, int nVars, char * ...@@ -242,7 +242,7 @@ inline unsigned Kit_TruthSemiCanonicize_Yasha( word* pInOut, int nVars, char *
return uCanonPhase; return uCanonPhase;
} }
inline unsigned Kit_TruthSemiCanonicize_Yasha1( word* pInOut, int nVars, char * pCanonPerm, int * pStore ) unsigned Kit_TruthSemiCanonicize_Yasha1( word* pInOut, int nVars, char * pCanonPerm, int * pStore )
{ {
int nWords = Kit_TruthWordNum_64bit( nVars ); int nWords = Kit_TruthWordNum_64bit( nVars );
int i, fChange, nOnes; int i, fChange, nOnes;
...@@ -309,7 +309,7 @@ inline unsigned Kit_TruthSemiCanonicize_Yasha1( word* pInOut, int nVars, char * ...@@ -309,7 +309,7 @@ inline unsigned Kit_TruthSemiCanonicize_Yasha1( word* pInOut, int nVars, char *
} }
// inline unsigned Kit_TruthSemiCanonicize_Yasha_simple( word* pInOut, int nVars, char * pCanonPerm ) // unsigned Kit_TruthSemiCanonicize_Yasha_simple( word* pInOut, int nVars, char * pCanonPerm )
// { // {
// unsigned uCanonPhase = 0; // unsigned uCanonPhase = 0;
// int pStore[16]; // int pStore[16];
...@@ -355,7 +355,7 @@ inline unsigned Kit_TruthSemiCanonicize_Yasha1( word* pInOut, int nVars, char * ...@@ -355,7 +355,7 @@ inline unsigned Kit_TruthSemiCanonicize_Yasha1( word* pInOut, int nVars, char *
// return uCanonPhase; // return uCanonPhase;
// } // }
inline void Kit_TruthSemiCanonicize_Yasha_simple( word* pInOut, int nVars, int * pStore ) void Kit_TruthSemiCanonicize_Yasha_simple( word* pInOut, int nVars, int * pStore )
{ {
int nWords = Kit_TruthWordNum_64bit( nVars ); int nWords = Kit_TruthWordNum_64bit( nVars );
int i, Temp, fChange, nOnes; int i, Temp, fChange, nOnes;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment