diff options
Diffstat (limited to 'src/aig/ivy/ivyCut.c')
-rw-r--r-- | src/aig/ivy/ivyCut.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/src/aig/ivy/ivyCut.c b/src/aig/ivy/ivyCut.c index e3651645..d5a31dee 100644 --- a/src/aig/ivy/ivyCut.c +++ b/src/aig/ivy/ivyCut.c @@ -20,6 +20,9 @@ #include "ivy.h" +ABC_NAMESPACE_IMPL_START + + //////////////////////////////////////////////////////////////////////// /// DECLARATIONS /// //////////////////////////////////////////////////////////////////////// @@ -332,7 +335,7 @@ int Ivy_ManFindBoolCut( Ivy_Man_t * p, Ivy_Obj_t * pRoot, Vec_Ptr_t * vFront, Ve while ( 1 ) { // find the next node to expand on this level - Vec_PtrForEachEntry( vFront, pObj, k ) + Vec_PtrForEachEntry( Ivy_Obj_t *, vFront, pObj, k ) if ( (int)pObj->Level == Lev ) break; if ( k == Vec_PtrSize(vFront) ) @@ -399,11 +402,11 @@ int Ivy_ManFindBoolCut( Ivy_Man_t * p, Ivy_Obj_t * pRoot, Vec_Ptr_t * vFront, Ve if ( pFaninC && !pFaninC->fMarkA && !pFaninC->fMarkB ) Vec_PtrPush( vFront, pFaninC ); // clean the markings - Vec_PtrForEachEntry( vVolume, pObj, k ) + Vec_PtrForEachEntry( Ivy_Obj_t *, vVolume, pObj, k ) pObj->fMarkA = pObj->fMarkB = 0; // mark the nodes on the frontier (including the pivot) - Vec_PtrForEachEntry( vFront, pObj, k ) + Vec_PtrForEachEntry( Ivy_Obj_t *, vFront, pObj, k ) pObj->fMarkA = 1; // cut exists, collect all the nodes on the shortest path to the pivot Vec_PtrClear( vLeaves ); @@ -411,16 +414,16 @@ int Ivy_ManFindBoolCut( Ivy_Man_t * p, Ivy_Obj_t * pRoot, Vec_Ptr_t * vFront, Ve RetValue = Ivy_ManFindBoolCut_rec( p, pRoot, vLeaves, vVolume, pPivot ); assert( RetValue == 1 ); // unmark the nodes on the frontier (including the pivot) - Vec_PtrForEachEntry( vFront, pObj, k ) + Vec_PtrForEachEntry( Ivy_Obj_t *, vFront, pObj, k ) pObj->fMarkA = 0; // mark the nodes in the volume - Vec_PtrForEachEntry( vVolume, pObj, k ) + Vec_PtrForEachEntry( Ivy_Obj_t *, vVolume, pObj, k ) pObj->fMarkA = 1; // expand the cut without increasing its size while ( 1 ) { - Vec_PtrForEachEntry( vLeaves, pObj, k ) + Vec_PtrForEachEntry( Ivy_Obj_t *, vLeaves, pObj, k ) if ( Ivy_ManFindBoolCutCost(pObj) < 2 ) break; if ( k == Vec_PtrSize(vLeaves) ) @@ -448,7 +451,7 @@ int Ivy_ManFindBoolCut( Ivy_Man_t * p, Ivy_Obj_t * pRoot, Vec_Ptr_t * vFront, Ve } } // unmark the nodes in the volume - Vec_PtrForEachEntry( vVolume, pObj, k ) + Vec_PtrForEachEntry( Ivy_Obj_t *, vVolume, pObj, k ) pObj->fMarkA = 0; return 1; } @@ -491,7 +494,7 @@ void Ivy_ManTestCutsBool( Ivy_Man_t * p ) printf( "%d ", Vec_PtrSize(vLeaves) ); /* printf( "( " ); - Vec_PtrForEachEntry( vFront, pTemp, k ) + Vec_PtrForEachEntry( Ivy_Obj_t *, vFront, pTemp, k ) printf( "%d ", Ivy_ObjRefs(Ivy_Regular(pTemp)) ); printf( ")\n" ); */ @@ -988,3 +991,5 @@ void Ivy_ManTestCutsAll( Ivy_Man_t * p ) //////////////////////////////////////////////////////////////////////// +ABC_NAMESPACE_IMPL_END + |