diff options
Diffstat (limited to 'src/base/exor/exorLink.c')
-rw-r--r-- | src/base/exor/exorLink.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/base/exor/exorLink.c b/src/base/exor/exorLink.c index fef0d4ca..2d260a27 100644 --- a/src/base/exor/exorLink.c +++ b/src/base/exor/exorLink.c @@ -335,7 +335,6 @@ static int DiffVarBits[5]; static drow MaskLiterals; // the base for counting literals static int StartingLiterals; -static int StartingQCost; // the number of literals in each cube static int CubeLiterals[32]; static int BitShift; @@ -525,9 +524,6 @@ int ExorLinkCubeIteratorStart( Cube** pGroup, Cube* pC1, Cube* pC2, cubedist Dis NewZ += BIT_COUNT(Temp); } } - // set the number of literals - ELCubes[CubeNum]->a = StartingLiterals + CubeLiterals[CubeNum]; - ELCubes[CubeNum]->z = NewZ; // set the variables that should be there for ( i = 0; i < nDiffVarsIn; i++ ) @@ -536,6 +532,11 @@ int ExorLinkCubeIteratorStart( Cube** pGroup, Cube* pC1, Cube* pC2, cubedist Dis ELCubes[CubeNum]->pCubeDataIn[ DiffVarWords[i] ] |= ( Value << DiffVarBits[i] ); } + // set the number of literals + ELCubes[CubeNum]->a = StartingLiterals + CubeLiterals[CubeNum]; + ELCubes[CubeNum]->z = NewZ; + ELCubes[CubeNum]->q = ComputeQCostBits( ELCubes[CubeNum] ); + // assign the ID ELCubes[CubeNum]->ID = g_CoverInfo.cIDs++; // skip through zero-ID @@ -645,11 +646,6 @@ int ExorLinkCubeIteratorNext( Cube** pGroup ) NewZ += BIT_COUNT(Temp); } } - // set the number of literals and output ones - ELCubes[CubeNum]->a = StartingLiterals + CubeLiterals[CubeNum]; - ELCubes[CubeNum]->z = NewZ; - - assert( NewZ != 255 ); // set the variables that should be there for ( i = 0; i < nDiffVarsIn; i++ ) @@ -658,6 +654,12 @@ int ExorLinkCubeIteratorNext( Cube** pGroup ) ELCubes[CubeNum]->pCubeDataIn[ DiffVarWords[i] ] |= ( Value << DiffVarBits[i] ); } + // set the number of literals and output ones + ELCubes[CubeNum]->a = StartingLiterals + CubeLiterals[CubeNum]; + ELCubes[CubeNum]->z = NewZ; + ELCubes[CubeNum]->q = ComputeQCostBits( ELCubes[CubeNum] ); + assert( NewZ != 255 ); + // assign the ID ELCubes[CubeNum]->ID = g_CoverInfo.cIDs++; // skip through zero-ID |