summaryrefslogtreecommitdiffstats
path: root/src/aig/gia/giaIso2.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/giaIso2.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/giaIso2.c')
-rw-r--r--src/aig/gia/giaIso2.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/aig/gia/giaIso2.c b/src/aig/gia/giaIso2.c
index 17b3ec40..79e0bb10 100644
--- a/src/aig/gia/giaIso2.c
+++ b/src/aig/gia/giaIso2.c
@@ -89,12 +89,12 @@ struct Gia_Iso2Man_t_
Vec_Int_t * vMap1; // isomorphism map
// statistics
int nIters;
- clock_t timeStart;
- clock_t timeSim;
- clock_t timeRefine;
- clock_t timeSort;
- clock_t timeOther;
- clock_t timeTotal;
+ abctime timeStart;
+ abctime timeSim;
+ abctime timeRefine;
+ abctime timeSort;
+ abctime timeOther;
+ abctime timeTotal;
};
////////////////////////////////////////////////////////////////////////
@@ -245,7 +245,7 @@ void Gia_Iso2ManStop( Gia_Iso2Man_t * p )
Vec_IntFree( p->vVec1 );
ABC_FREE( p );
}
-void Gia_Iso2ManPrint( Gia_Iso2Man_t * p, clock_t Time, int fVerbose )
+void Gia_Iso2ManPrint( Gia_Iso2Man_t * p, abctime Time, int fVerbose )
{
if ( !fVerbose )
return;
@@ -611,25 +611,25 @@ Vec_Wec_t * Gia_Iso2ManCheckIsoClasses( Gia_Man_t * p, Vec_Wec_t * vEquivs )
Vec_Wec_t * Gia_Iso2ManPerform( Gia_Man_t * pGia, int fVerbose )
{
Gia_Iso2Man_t * p;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
p = Gia_Iso2ManStart( pGia );
Gia_Iso2ManPrepare( pGia );
Gia_Iso2ManPropagate( pGia );
- Gia_Iso2ManPrint( p, clock() - clk, fVerbose );
+ Gia_Iso2ManPrint( p, Abc_Clock() - clk, fVerbose );
while ( Gia_Iso2ManUniqify( p ) )
{
- Gia_Iso2ManPrint( p, clock() - clk, fVerbose );
+ Gia_Iso2ManPrint( p, Abc_Clock() - clk, fVerbose );
Gia_Iso2ManPropagate( pGia );
}
- Gia_Iso2ManPrint( p, clock() - clk, fVerbose );
+ Gia_Iso2ManPrint( p, Abc_Clock() - clk, fVerbose );
/*
Gia_Iso2ManUpdate( p, 20 );
while ( Gia_Iso2ManUniqify( p ) )
{
- Gia_Iso2ManPrint( p, clock() - clk, fVerbose );
+ Gia_Iso2ManPrint( p, Abc_Clock() - clk, fVerbose );
Gia_Iso2ManPropagate( pGia );
}
- Gia_Iso2ManPrint( p, clock() - clk, fVerbose );
+ Gia_Iso2ManPrint( p, Abc_Clock() - clk, fVerbose );
*/
Gia_Iso2ManStop( p );
return Gia_Iso2ManDerivePoClasses( pGia );
@@ -652,13 +652,13 @@ Gia_Man_t * Gia_ManIsoReduce2( Gia_Man_t * pGia, Vec_Ptr_t ** pvPosEquivs, Vec_P
Vec_Wec_t * vEquivs, * vEquivs2;
Vec_Int_t * vRemains;
int nClasses, nUsedPos;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
vEquivs = Gia_Iso2ManPerform( pGia, fVeryVerbose );
// report class stats
nClasses = Vec_WecCountNonTrivial( vEquivs, &nUsedPos );
printf( "Reduced %d outputs to %d candidate classes (%d outputs are in %d non-trivial classes). ",
Gia_ManPoNum(pGia), Vec_WecSize(vEquivs), nUsedPos, nClasses );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
if ( fEstimate )
{
Vec_WecFree( vEquivs );
@@ -677,7 +677,7 @@ Gia_Man_t * Gia_ManIsoReduce2( Gia_Man_t * pGia, Vec_Ptr_t ** pvPosEquivs, Vec_P
nClasses = Vec_WecCountNonTrivial( vEquivs, &nUsedPos );
printf( "Reduced %d outputs to %d equivalence classes (%d outputs are in %d non-trivial classes). ",
Gia_ManPoNum(pGia), Vec_WecSize(vEquivs), nUsedPos, nClasses );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
if ( fVerbose )
{
printf( "Nontrivial classes:\n" );