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/opt/csw/cswCut.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/opt/csw/cswCut.c')
-rw-r--r-- | src/opt/csw/cswCut.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/opt/csw/cswCut.c b/src/opt/csw/cswCut.c index 0b1d9254..0474d8a5 100644 --- a/src/opt/csw/cswCut.c +++ b/src/opt/csw/cswCut.c @@ -498,7 +498,7 @@ Aig_Obj_t * Csw_ObjSweep( Csw_Man_t * p, Aig_Obj_t * pObj, int fTriv ) Aig_Obj_t * pObjNew; unsigned * pTruth; int i, k, nVars, nFanins, iVar; - clock_t clk; + abctime clk; assert( !Aig_IsComplement(pObj) ); if ( !Aig_ObjIsNode(pObj) ) @@ -523,7 +523,7 @@ Aig_Obj_t * Csw_ObjSweep( Csw_Man_t * p, Aig_Obj_t * pObj, int fTriv ) continue; // get the next cut of this node pCut = Csw_CutFindFree( p, pObj ); -clk = clock(); +clk = Abc_Clock(); // assemble the new cut if ( !Csw_CutMerge( p, pCut0, pCut1, pCut ) ) { @@ -542,7 +542,7 @@ clk = clock(); nFanins = pCut->nFanins; // nVars = Csw_CutSupportMinimize( p, pCut ); // leads to quality degradation nVars = Kit_TruthSupportSize( pTruth, p->nLeafMax ); -p->timeCuts += clock() - clk; +p->timeCuts += Abc_Clock() - clk; // check for trivial truth tables if ( nVars == 0 ) @@ -567,9 +567,9 @@ p->timeCuts += clock() - clk; } // check if an equivalent node with the same cut exists -clk = clock(); +clk = Abc_Clock(); pObjNew = pCut->nFanins > 2 ? Csw_TableCutLookup( p, pCut ) : NULL; -p->timeHash += clock() - clk; +p->timeHash += Abc_Clock() - clk; if ( pObjNew ) { p->nNodesCuts++; @@ -584,7 +584,7 @@ p->timeHash += clock() - clk; p->nNodesTried++; // load the resulting cuts into the table -clk = clock(); +clk = Abc_Clock(); Csw_ObjForEachCut( p, pObj, pCut, i ) { if ( pCut->nFanins > 2 ) @@ -593,7 +593,7 @@ clk = clock(); Csw_TableCutInsert( p, pCut ); } } -p->timeHash += clock() - clk; +p->timeHash += Abc_Clock() - clk; // return the node if could not replace it return pObj; |