Commit c6a290ee by Alan Mishchenko

Merged in boschmitt/abc (pull request #26)

Fix the problem of not identifying divisors when its originating cubes had only 2 literals.
parents 2ded89cc fe6bb87e
...@@ -120,7 +120,7 @@ static inline void Fxch_ManDivDoubleCube( Fxch_Man_t* pFxchMan, ...@@ -120,7 +120,7 @@ static inline void Fxch_ManDivDoubleCube( Fxch_Man_t* pFxchMan,
iCube, iLit0, 0, iCube, iLit0, 0,
(char)fAdd, (char)fUpdate ); (char)fAdd, (char)fUpdate );
if ( Vec_IntSize( vCube ) > 3 ) if ( Vec_IntSize( vCube ) >= 3 )
{ {
int Lit1, int Lit1,
iLit1; iLit1;
...@@ -266,7 +266,7 @@ void Fxch_ManSCHashTablesInit( Fxch_Man_t* pFxchMan ) ...@@ -266,7 +266,7 @@ void Fxch_ManSCHashTablesInit( Fxch_Man_t* pFxchMan )
Vec_WecForEachLevel( vCubes, vCube, iCube ) Vec_WecForEachLevel( vCubes, vCube, iCube )
{ {
int nLits = Vec_IntSize( vCube ) - 1, 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 ) ); Vec_IntPush( vCubeLinks, ( nTotalHashed + 1 ) );
nTotalHashed += nSubCubes + 1; nTotalHashed += nSubCubes + 1;
......
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