diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2005-08-07 08:01:00 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2005-08-07 08:01:00 -0700 |
commit | bd640142e0fe2260e3d28e187f21a36d3cc8e08f (patch) | |
tree | 1d834271b729e18017519631edc73335b6d32553 /src/opt/fxu/fxuMatrix.c | |
parent | d0e834d1a615f8e0e9d04c2ac97811f63562bd0b (diff) | |
download | abc-bd640142e0fe2260e3d28e187f21a36d3cc8e08f.tar.gz abc-bd640142e0fe2260e3d28e187f21a36d3cc8e08f.tar.bz2 abc-bd640142e0fe2260e3d28e187f21a36d3cc8e08f.zip |
Version abc50807
Diffstat (limited to 'src/opt/fxu/fxuMatrix.c')
-rw-r--r-- | src/opt/fxu/fxuMatrix.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/src/opt/fxu/fxuMatrix.c b/src/opt/fxu/fxuMatrix.c index 0b732aef..503ba2f1 100644 --- a/src/opt/fxu/fxuMatrix.c +++ b/src/opt/fxu/fxuMatrix.c @@ -77,6 +77,7 @@ Fxu_Matrix * Fxu_MatrixAllocate() #endif p->pHeapDouble = Fxu_HeapDoubleStart(); p->pHeapSingle = Fxu_HeapSingleStart(); + p->vPairs = Vec_PtrAlloc( 100 ); return p; } @@ -132,9 +133,10 @@ void Fxu_MatrixDelete( Fxu_Matrix * p ) Extra_MmFixedStop( p->pMemMan, 0 ); #endif + Vec_PtrFree( p->vPairs ); FREE( p->pppPairs ); FREE( p->ppPairs ); - FREE( p->pPairsTemp ); +// FREE( p->pPairsTemp ); FREE( p->pTable ); FREE( p->ppVars ); FREE( p ); @@ -305,20 +307,8 @@ void Fxu_MatrixAddDivisor( Fxu_Matrix * p, Fxu_Cube * pCube1, Fxu_Cube * pCube2 // canonicize the pair Fxu_PairCanonicize( &pCube1, &pCube2 ); - -/* // compute the hash key - if ( p->fMvNetwork ) -// if ( 0 ) - { // in case of MV network, if all the values in the cube-free divisor - // belong to the same MV variable, this cube pair is not a divisor - Key = Fxu_PairHashKeyMv( p, pCube1, pCube2, &nBase, &nLits1, &nLits2 ); - if ( Key == 0 ) - return; - } - else -*/ - Key = Fxu_PairHashKey( p, pCube1, pCube2, &nBase, &nLits1, &nLits2 ); + Key = Fxu_PairHashKey( p, pCube1, pCube2, &nBase, &nLits1, &nLits2 ); // create the cube pair pPair = Fxu_PairAlloc( p, pCube1, pCube2 ); @@ -330,11 +320,13 @@ void Fxu_MatrixAddDivisor( Fxu_Matrix * p, Fxu_Cube * pCube1, Fxu_Cube * pCube2 fFound = 0; Key %= p->nTableSize; Fxu_TableForEachDouble( p, Key, pDiv ) + { if ( Fxu_PairCompare( pPair, pDiv->lPairs.pTail ) ) // they are equal { fFound = 1; break; } + } if ( !fFound ) { // create the new divisor |