diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2013-05-27 15:09:23 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2013-05-27 15:09:23 -0700 |
commit | 19c25fd6aab057b2373717f996fe538507c1b1e1 (patch) | |
tree | 7aa7cd7609a5de31d11b3455b6388fd9300c8d0f /src/map/if/ifMap.c | |
parent | 94356f0d1fa8e671303299717f631ecf0ca2f17e (diff) | |
download | abc-19c25fd6aab057b2373717f996fe538507c1b1e1.tar.gz abc-19c25fd6aab057b2373717f996fe538507c1b1e1.tar.bz2 abc-19c25fd6aab057b2373717f996fe538507c1b1e1.zip |
Adding a wrapper around clock() for more accurate time counting in ABC.
Diffstat (limited to 'src/map/if/ifMap.c')
-rw-r--r-- | src/map/if/ifMap.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/map/if/ifMap.c b/src/map/if/ifMap.c index 8fb2962e..220570e1 100644 --- a/src/map/if/ifMap.c +++ b/src/map/if/ifMap.c @@ -259,10 +259,10 @@ void If_ObjPerformMappingAnd( If_Man_t * p, If_Obj_t * pObj, int Mode, int fPrep pCut->fCompl = 0; if ( p->pPars->fTruth ) { -// clock_t clk = clock(); +// abctime clk = Abc_Clock(); // int RetValue = If_CutComputeTruth( p, pCut, pCut0, pCut1, pObj->fCompl0, pObj->fCompl1 ); int RetValue = If_CutComputeTruth2( p, pCut, pCut0, pCut1, pObj->fCompl0, pObj->fCompl1 ); -// p->timeTruth += clock() - clk; +// p->timeTruth += Abc_Clock() - clk; pCut->fUseless = 0; if ( p->pPars->pFuncCell && RetValue < 2 ) @@ -491,7 +491,7 @@ int If_ManPerformMappingRound( If_Man_t * p, int nCutsUsed, int Mode, int fPrepr // ProgressBar * pProgress; If_Obj_t * pObj; int i; - clock_t clk = clock(); + abctime clk = Abc_Clock(); float arrTime; assert( Mode >= 0 && Mode <= 2 ); // set the sorting function @@ -561,7 +561,7 @@ int If_ManPerformMappingRound( If_Man_t * p, int nCutsUsed, int Mode, int fPrepr char Symb = fPreprocess? 'P' : ((Mode == 0)? 'D' : ((Mode == 1)? 'F' : 'A')); Abc_Print( 1, "%c: Del = %7.2f. Ar = %9.1f. Edge = %8d. Switch = %7.2f. Cut = %8d. ", Symb, p->RequiredGlo, p->AreaGlo, p->nNets, p->dPower, p->nCutsMerged ); - Abc_PrintTime( 1, "T", clock() - clk ); + Abc_PrintTime( 1, "T", Abc_Clock() - clk ); // Abc_Print( 1, "Max number of cuts = %d. Average number of cuts = %5.2f.\n", // p->nCutsMax, 1.0 * p->nCutsMerged / If_ManAndNum(p) ); } |