summaryrefslogtreecommitdiffstats
path: root/src/map/if/ifTruth.c
diff options
context:
space:
mode:
authorMathias Soeken <mathias.soeken@epfl.ch>2016-08-09 10:54:26 +0200
committerMathias Soeken <mathias.soeken@epfl.ch>2016-08-09 10:54:26 +0200
commit4b2881bce6602ebac26a7d57b704b61b2d03d4d6 (patch)
tree8efe7c447e5b5ae5d5d5690ef9d201627fc16463 /src/map/if/ifTruth.c
parentca8256fb4d7e8806b72ec0be31d9fd94f8b35678 (diff)
parent97d5d5d2f6fa7c2f32f8f61b298d6dcdc9351949 (diff)
downloadabc-4b2881bce6602ebac26a7d57b704b61b2d03d4d6.tar.gz
abc-4b2881bce6602ebac26a7d57b704b61b2d03d4d6.tar.bz2
abc-4b2881bce6602ebac26a7d57b704b61b2d03d4d6.zip
Merge with parent.
Diffstat (limited to 'src/map/if/ifTruth.c')
-rw-r--r--src/map/if/ifTruth.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/map/if/ifTruth.c b/src/map/if/ifTruth.c
index 91e6adcf..7c8892d3 100644
--- a/src/map/if/ifTruth.c
+++ b/src/map/if/ifTruth.c
@@ -244,10 +244,15 @@ p->timeCache[3] += Abc_Clock() - clk;
else
assert( pCut->uSign == If_ObjCutSignCompute( pCut ) );
+ assert( Vec_IntSize(p->vTtOccurs[pCut->nLeaves]) == Vec_MemEntryNum(p->vTtMem[pCut->nLeaves]) );
// hash function
fCompl = ((p->uCanonPhase >> pCut->nLeaves) & 1);
truthId = Vec_MemHashInsert( p->vTtMem[pCut->nLeaves], pTruth );
pCut->iCutFunc = Abc_Var2Lit( truthId, fCompl );
+ // count how many time this truth table is used
+ if ( Vec_IntSize(p->vTtOccurs[pCut->nLeaves]) < Vec_MemEntryNum(p->vTtMem[pCut->nLeaves]) )
+ Vec_IntPush( p->vTtOccurs[pCut->nLeaves], 0 );
+ Vec_IntAddToEntry( p->vTtOccurs[pCut->nLeaves], truthId, 1 );
if ( fVerbose )
{