diff options
author | Bruno Schmitt <bruno@oschmitt.com> | 2016-05-19 22:10:30 -0300 |
---|---|---|
committer | Bruno Schmitt <bruno@oschmitt.com> | 2016-05-19 22:10:30 -0300 |
commit | f93fbc230389f0842d77eec639e225ba57589821 (patch) | |
tree | 3935211f6cb503fbab4a64121073f244bf7d30d6 /src/opt | |
parent | 4ffbd0b2dff9d6a3ccc1d4f009220996b3c6814a (diff) | |
download | abc-f93fbc230389f0842d77eec639e225ba57589821.tar.gz abc-f93fbc230389f0842d77eec639e225ba57589821.tar.bz2 abc-f93fbc230389f0842d77eec639e225ba57589821.zip |
Fix the problem of not identifying divisors when its originating cubes had only 2 literals.
With this change, 'empty' sub-cubes (sub-cubes with an ID equal to zero) are inserted in the 0th bin of the hash table.
Diffstat (limited to 'src/opt')
-rw-r--r-- | src/opt/fxch/FxchMan.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/opt/fxch/FxchMan.c b/src/opt/fxch/FxchMan.c index 4fcd8e51..a54e6c9a 100644 --- a/src/opt/fxch/FxchMan.c +++ b/src/opt/fxch/FxchMan.c @@ -120,7 +120,7 @@ static inline void Fxch_ManDivDoubleCube( Fxch_Man_t* pFxchMan, iCube, iLit0, 0, (char)fAdd, (char)fUpdate ); - if ( Vec_IntSize( vCube ) > 3 ) + if ( Vec_IntSize( vCube ) >= 3 ) { int Lit1, iLit1; @@ -266,7 +266,7 @@ void Fxch_ManSCHashTablesInit( Fxch_Man_t* pFxchMan ) Vec_WecForEachLevel( vCubes, vCube, iCube ) { int nLits = Vec_IntSize( vCube ) - 1, - nSubCubes = nLits == 2? nLits : ( nLits * nLits + nLits ) / 2; + nSubCubes = nLits <= 2? nLits + 1: ( nLits * nLits + nLits ) / 2; Vec_IntPush( vCubeLinks, ( nTotalHashed + 1 ) ); nTotalHashed += nSubCubes + 1; |