summaryrefslogtreecommitdiffstats
path: root/src/aig/gia/giaShrink6.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2013-05-27 15:09:23 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2013-05-27 15:09:23 -0700
commit19c25fd6aab057b2373717f996fe538507c1b1e1 (patch)
tree7aa7cd7609a5de31d11b3455b6388fd9300c8d0f /src/aig/gia/giaShrink6.c
parent94356f0d1fa8e671303299717f631ecf0ca2f17e (diff)
downloadabc-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/aig/gia/giaShrink6.c')
-rw-r--r--src/aig/gia/giaShrink6.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/aig/gia/giaShrink6.c b/src/aig/gia/giaShrink6.c
index e7873d91..5ca95fd3 100644
--- a/src/aig/gia/giaShrink6.c
+++ b/src/aig/gia/giaShrink6.c
@@ -402,8 +402,8 @@ Gia_Man_t * Gia_ManMapShrink6( Gia_Man_t * p, int nFanoutMax, int fKeepLevel, in
word uTruth, uTruth0, uTruth1;
int i, k, nDivs, iNode;
int RetValue, Counter1 = 0, Counter2 = 0;
- clock_t clk2, clk = clock();
- clock_t timeFanout = 0;
+ abctime clk2, clk = Abc_Clock();
+ abctime timeFanout = 0;
assert( p->pMapping != NULL );
pMan = Shr_ManAlloc( p );
Gia_ManFillValue( p );
@@ -446,10 +446,10 @@ Gia_Man_t * Gia_ManMapShrink6( Gia_Man_t * p, int nFanoutMax, int fKeepLevel, in
Vec_IntWriteEntry( pMan->vLeaves, k, Abc_Lit2Var(pFanin->Value) );
}
// compute divisors
- clk2 = clock();
+ clk2 = Abc_Clock();
nDivs = Shr_ManCollectDivisors( pMan, pMan->vLeaves, pMan->nDivMax, nFanoutMax );
assert( nDivs <= pMan->nDivMax );
- timeFanout += clock() - clk2;
+ timeFanout += Abc_Clock() - clk2;
// compute truth tables
Shr_ManComputeTruths( pMan->pNew, Vec_IntSize(pMan->vLeaves), pMan->vDivs, pMan->vDivTruths, pMan->vTruths );
// perform resubstitution
@@ -474,7 +474,7 @@ Gia_Man_t * Gia_ManMapShrink6( Gia_Man_t * p, int nFanoutMax, int fKeepLevel, in
{
printf( "Performed %d resubs and %d decomps. ", Counter1, Counter2 );
printf( "Gain in AIG nodes = %d. ", Gia_ManObjNum(p)-Gia_ManObjNum(pMan->pNew) );
- ABC_PRT( "Runtime", clock() - clk );
+ ABC_PRT( "Runtime", Abc_Clock() - clk );
// ABC_PRT( "Divisors", timeFanout );
}
return Shr_ManFree( pMan );