diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2005-08-27 08:01:00 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2005-08-27 08:01:00 -0700 |
commit | 28db025b8393e307328d51ff6901c4ebab669e95 (patch) | |
tree | 3866dd659505646c64eccdb672930bf0ebb849c2 /src/opt/cut/cutNode.c | |
parent | 9093ca53201519ef03dedb7044345fc716cc0643 (diff) | |
download | abc-28db025b8393e307328d51ff6901c4ebab669e95.tar.gz abc-28db025b8393e307328d51ff6901c4ebab669e95.tar.bz2 abc-28db025b8393e307328d51ff6901c4ebab669e95.zip |
Version abc50827
Diffstat (limited to 'src/opt/cut/cutNode.c')
-rw-r--r-- | src/opt/cut/cutNode.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/opt/cut/cutNode.c b/src/opt/cut/cutNode.c index 6ce3b983..8d16ac8a 100644 --- a/src/opt/cut/cutNode.c +++ b/src/opt/cut/cutNode.c @@ -65,6 +65,8 @@ static void Cut_CutFilter( Cut_Man_t * p, Cut_Cut_t * pList ); ***********************************************************************/ Cut_Cut_t * Cut_NodeReadCuts( Cut_Man_t * p, int Node ) { + if ( Node >= p->vCuts->nSize ) + return NULL; return Vec_PtrEntry( p->vCuts, Node ); } @@ -209,6 +211,7 @@ Cut_Cut_t * Cut_NodeComputeCuts( Cut_Man_t * p, int Node, int Node0, int Node1, } finish : // set the list at the node + Vec_PtrFillExtra( p->vCuts, Node + 1, NULL ); assert( Cut_NodeReadCuts(p, Node) == NULL ); pList0 = Cut_ListFinish( &SuperList ); Cut_NodeWriteCuts( p, Node, pList0 ); @@ -227,6 +230,7 @@ clk = clock(); if ( p->pParams->fFilter ) Cut_CutFilter( p, pList0 ); p->timeFilter += clock() - clk; + p->nNodes++; return pList0; } @@ -387,6 +391,7 @@ clk = clock(); if ( p->pParams->fFilter ) Cut_CutFilter( p, pList ); p->timeFilter += clock() - clk; + p->nNodes -= vNodes->nSize - 1; return pList; } @@ -498,7 +503,7 @@ void Cut_NodeTryDroppingCuts( Cut_Man_t * p, int Node ) void Cut_CutPrint( Cut_Cut_t * pCut ) { int i; - assert( pCut->nLeaves > 1 ); + assert( pCut->nLeaves > 0 ); printf( "%d : {", pCut->nLeaves ); for ( i = 0; i < (int)pCut->nLeaves; i++ ) printf( " %d", pCut->pLeaves[i] ); |