From 6130e39b18b5f53902e4eab14f6d5cdde5219563 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Mon, 1 Nov 2010 01:35:04 -0700 Subject: initial commit of public abc --- src/map/if/ifReduce.c | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) (limited to 'src/map/if/ifReduce.c') diff --git a/src/map/if/ifReduce.c b/src/map/if/ifReduce.c index b3130600..622688e7 100644 --- a/src/map/if/ifReduce.c +++ b/src/map/if/ifReduce.c @@ -20,6 +20,9 @@ #include "if.h" +ABC_NAMESPACE_IMPL_START + + //////////////////////////////////////////////////////////////////////// /// DECLARATIONS /// //////////////////////////////////////////////////////////////////////// @@ -55,9 +58,9 @@ void If_ManImproveMapping( If_Man_t * p ) If_ManComputeRequired( p ); if ( p->pPars->fVerbose ) { - printf( "E: Del = %7.2f. Ar = %9.1f. Edge = %8d. Switch = %7.2f. Cut = %8d. ", + Abc_Print( 1, "E: Del = %7.2f. Ar = %9.1f. Edge = %8d. Switch = %7.2f. Cut = %8d. ", p->RequiredGlo, p->AreaGlo, p->nNets, p->dPower, p->nCutsMerged ); - ABC_PRT( "T", clock() - clk ); + Abc_PrintTime( 1, "T", clock() - clk ); } /* @@ -66,9 +69,9 @@ void If_ManImproveMapping( If_Man_t * p ) If_ManComputeRequired( p, 0 ); if ( p->pPars->fVerbose ) { - printf( "R: Del = %6.2f. Area = %8.2f. Nets = %6d. Cuts = %8d. Lim = %2d. Ave = %5.2f. ", + Abc_Print( 1, "R: Del = %6.2f. Area = %8.2f. Nets = %6d. Cuts = %8d. Lim = %2d. Ave = %5.2f. ", p->RequiredGlo, p->AreaGlo, p->nNets, p->nCutsMerged, p->nCutsUsed, 1.0 * p->nCutsMerged / If_ManAndNum(p) ); - ABC_PRT( "T", clock() - clk ); + Abc_PrintTime( 1, "T", clock() - clk ); } */ /* @@ -77,9 +80,9 @@ void If_ManImproveMapping( If_Man_t * p ) If_ManComputeRequired( p, 0 ); if ( p->pPars->fVerbose ) { - printf( "E: Del = %6.2f. Area = %8.2f. Nets = %6d. Cuts = %8d. Lim = %2d. Ave = %5.2f. ", + Abc_Print( 1, "E: Del = %6.2f. Area = %8.2f. Nets = %6d. Cuts = %8d. Lim = %2d. Ave = %5.2f. ", p->RequiredGlo, p->AreaGlo, p->nNets, p->nCutsMerged, p->nCutsUsed, 1.0 * p->nCutsMerged / If_ManAndNum(p) ); - ABC_PRT( "T", clock() - clk ); + Abc_PrintTime( 1, "T", clock() - clk ); } */ } @@ -126,7 +129,7 @@ int If_ManImproveCutCost( If_Man_t * p, Vec_Ptr_t * vFront ) { If_Obj_t * pFanin; int i, Counter = 0; - Vec_PtrForEachEntry( vFront, pFanin, i ) + Vec_PtrForEachEntry( If_Obj_t *, vFront, pFanin, i ) if ( pFanin->nRefs == 0 ) Counter++; return Counter; @@ -170,7 +173,7 @@ void If_ManImproveNodeExpand( If_Man_t * p, If_Obj_t * pObj, int nLimit, Vec_Ptr If_CutAreaRef( p, pCut ); assert( CostBef >= CostAft ); // clean up - Vec_PtrForEachEntry( vVisited, pFanin, i ) + Vec_PtrForEachEntry( If_Obj_t *, vVisited, pFanin, i ) pFanin->fMark = 0; // update the node If_ManImproveNodeUpdate( p, pObj, vFront ); @@ -261,7 +264,7 @@ void If_ManImproveNodeUpdate( If_Man_t * p, If_Obj_t * pObj, Vec_Ptr_t * vFront If_CutAreaDeref( p, pCut ); // update the node's cut pCut->nLeaves = Vec_PtrSize(vFront); - Vec_PtrForEachEntry( vFront, pFanin, i ) + Vec_PtrForEachEntry( If_Obj_t *, vFront, pFanin, i ) pCut->pLeaves[i] = pFanin->Id; If_CutOrder( pCut ); // ref the new cut @@ -363,7 +366,7 @@ int If_ManImproveNodeFaninCompact0( If_Man_t * p, If_Obj_t * pObj, int nLimit, V { If_Obj_t * pFanin; int i; - Vec_PtrForEachEntry( vFront, pFanin, i ) + Vec_PtrForEachEntry( If_Obj_t *, vFront, pFanin, i ) { if ( If_ObjIsCi(pFanin) ) continue; @@ -393,7 +396,7 @@ int If_ManImproveNodeFaninCompact1( If_Man_t * p, If_Obj_t * pObj, int nLimit, V { If_Obj_t * pFanin; int i; - Vec_PtrForEachEntry( vFront, pFanin, i ) + Vec_PtrForEachEntry( If_Obj_t *, vFront, pFanin, i ) { if ( If_ObjIsCi(pFanin) ) continue; @@ -421,7 +424,7 @@ int If_ManImproveNodeFaninCompact2( If_Man_t * p, If_Obj_t * pObj, int nLimit, V { If_Obj_t * pFanin; int i; - Vec_PtrForEachEntry( vFront, pFanin, i ) + Vec_PtrForEachEntry( If_Obj_t *, vFront, pFanin, i ) { if ( If_ObjIsCi(pFanin) ) continue; @@ -574,3 +577,5 @@ void If_ManImproveReduce( If_Man_t * p, int nLimit ) //////////////////////////////////////////////////////////////////////// +ABC_NAMESPACE_IMPL_END + -- cgit v1.2.3