diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2016-08-17 21:26:16 +0900 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2016-08-17 21:26:16 +0900 |
commit | 118eea846560750b60f69f11a9e546378a7c9bc7 (patch) | |
tree | c5de929c2a8bb717a97474f7c38eb7de785364bd /src/base/exor/exorLink.c | |
parent | b83c6aaf97bcb2782dd8167c5bc343e887ef0aea (diff) | |
download | abc-118eea846560750b60f69f11a9e546378a7c9bc7.tar.gz abc-118eea846560750b60f69f11a9e546378a7c9bc7.tar.bz2 abc-118eea846560750b60f69f11a9e546378a7c9bc7.zip |
Changes to report quantum cost in Exorcism.
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 |