summaryrefslogtreecommitdiffstats
path: root/src/aig/gia
diff options
context:
space:
mode:
Diffstat (limited to 'src/aig/gia')
-rw-r--r--src/aig/gia/giaAig.c4
-rw-r--r--src/aig/gia/giaBidec.c4
-rw-r--r--src/aig/gia/giaCCof.c14
-rw-r--r--src/aig/gia/giaCSat.c20
-rw-r--r--src/aig/gia/giaCSatOld.c20
-rw-r--r--src/aig/gia/giaCTas.c32
-rw-r--r--src/aig/gia/giaCof.c4
-rw-r--r--src/aig/gia/giaCone.c4
-rw-r--r--src/aig/gia/giaDfs.c12
-rw-r--r--src/aig/gia/giaEmbed.c50
-rw-r--r--src/aig/gia/giaEra.c6
-rw-r--r--src/aig/gia/giaEra2.c32
-rw-r--r--src/aig/gia/giaForce.c24
-rw-r--r--src/aig/gia/giaFrames.c8
-rw-r--r--src/aig/gia/giaFront.c4
-rw-r--r--src/aig/gia/giaGlitch.c4
-rw-r--r--src/aig/gia/giaIso.c70
-rw-r--r--src/aig/gia/giaIso2.c32
-rw-r--r--src/aig/gia/giaRetime.c10
-rw-r--r--src/aig/gia/giaShrink.c4
-rw-r--r--src/aig/gia/giaShrink6.c10
-rw-r--r--src/aig/gia/giaSim.c14
-rw-r--r--src/aig/gia/giaSim2.c10
-rw-r--r--src/aig/gia/giaSort.c14
-rw-r--r--src/aig/gia/giaSweeper.c64
-rw-r--r--src/aig/gia/giaSwitch.c8
-rw-r--r--src/aig/gia/giaTest.c12
-rw-r--r--src/aig/gia/giaTruth.c4
-rw-r--r--src/aig/gia/giaTsim.c8
-rw-r--r--src/aig/gia/giaUtil.c14
30 files changed, 258 insertions, 258 deletions
diff --git a/src/aig/gia/giaAig.c b/src/aig/gia/giaAig.c
index 6256b7fd..0128ed91 100644
--- a/src/aig/gia/giaAig.c
+++ b/src/aig/gia/giaAig.c
@@ -629,7 +629,7 @@ int Gia_ManSolveSat( Gia_Man_t * p )
{
// extern int Fra_FraigSat( Aig_Man_t * pMan, ABC_INT64_T nConfLimit, ABC_INT64_T nInsLimit, int fFlipBits, int fAndOuts, int fNewSolver, int fVerbose );
Aig_Man_t * pNew;
- int RetValue;//, clk = clock();
+ int RetValue;//, clk = Abc_Clock();
pNew = Gia_ManToAig( p, 0 );
RetValue = Fra_FraigSat( pNew, 10000000, 0, 0, 0, 0, 1, 1, 0, 0 );
if ( RetValue == 0 )
@@ -657,7 +657,7 @@ int Gia_ManSolveSat( Gia_Man_t * p )
Abc_Print( 1, "The SAT problem is unsatisfiable. " );
else if ( RetValue == -1 )
Abc_Print( 1, "The SAT problem is undecided. " );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
*/
Aig_ManStop( pNew );
return RetValue;
diff --git a/src/aig/gia/giaBidec.c b/src/aig/gia/giaBidec.c
index 183f0e48..4c807cde 100644
--- a/src/aig/gia/giaBidec.c
+++ b/src/aig/gia/giaBidec.c
@@ -237,7 +237,7 @@ Gia_Man_t * Gia_ManPerformBidec( Gia_Man_t * p, int fVerbose )
Vec_Int_t * vLeaves, * vTruth, * vVisited;
Gia_Man_t * pNew, * pTemp;
Gia_Obj_t * pObj;
- int i;//, clk = clock();
+ int i;//, clk = Abc_Clock();
pPars->nVarsMax = Gia_ManLutSizeMax( p );
pPars->fVerbose = fVerbose;
if ( pPars->nVarsMax < 2 )
@@ -291,7 +291,7 @@ Gia_Man_t * Gia_ManPerformBidec( Gia_Man_t * p, int fVerbose )
if ( fVerbose )
{
// printf( "Total gain in AIG nodes = %d. ", Gia_ManObjNum(p)-Gia_ManObjNum(pNew) );
-// ABC_PRT( "Total runtime", clock() - clk );
+// ABC_PRT( "Total runtime", Abc_Clock() - clk );
}
return pNew;
}
diff --git a/src/aig/gia/giaCCof.c b/src/aig/gia/giaCCof.c
index fd704635..71a6547d 100644
--- a/src/aig/gia/giaCCof.c
+++ b/src/aig/gia/giaCCof.c
@@ -221,7 +221,7 @@ int Gia_ManCofGetReachable( Ccf_Man_t * p, int Lit )
{
int ObjPrev = 0, ConfPrev = 0;
int Count = 0, LitOut, RetValue;
- clock_t clk;
+ abctime clk;
// try solving for the first time and quit if converged
RetValue = sat_solver_solve( p->pSat, &Lit, &Lit + 1, p->nConfMax, 0, 0, 0 );
if ( RetValue == l_False )
@@ -229,7 +229,7 @@ int Gia_ManCofGetReachable( Ccf_Man_t * p, int Lit )
// iterate circuit cofactoring
while ( RetValue == l_True )
{
- clk = clock();
+ clk = Abc_Clock();
// derive cofactor
LitOut = Gia_ManCofOneDerive( p, Lit );
// add the blocking clause
@@ -242,7 +242,7 @@ int Gia_ManCofGetReachable( Ccf_Man_t * p, int Lit )
{
printf( "%3d : AIG =%7d Conf =%7d. ", Count++,
Gia_ManObjNum(p->pFrames) - ObjPrev, sat_solver_nconflicts(p->pSat) - ConfPrev );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
ObjPrev = Gia_ManObjNum(p->pFrames);
ConfPrev = sat_solver_nconflicts(p->pSat);
}
@@ -269,8 +269,8 @@ Gia_Man_t * Gia_ManCofTest( Gia_Man_t * pGia, int nFrameMax, int nConfMax, int n
Ccf_Man_t * p;
Gia_Obj_t * pObj;
int f, i, Lit, RetValue = -1, fFailed = 0;
- clock_t nTimeToStop = clock() + nTimeMax * CLOCKS_PER_SEC;
- clock_t clk = clock();
+ abctime nTimeToStop = Abc_Clock() + nTimeMax * CLOCKS_PER_SEC;
+ abctime clk = Abc_Clock();
assert( Gia_ManPoNum(pGia) == 1 );
// create reachability manager
@@ -310,7 +310,7 @@ Gia_Man_t * Gia_ManCofTest( Gia_Man_t * pGia, int nFrameMax, int nConfMax, int n
}
// report the result
- if ( nTimeToStop && clock() > nTimeToStop )
+ if ( nTimeToStop && Abc_Clock() > nTimeToStop )
printf( "Runtime limit (%d sec) is reached after %d frames. ", nTimeMax, f );
else if ( f == nFrameMax )
printf( "Completed %d frames without converging. ", f );
@@ -318,7 +318,7 @@ Gia_Man_t * Gia_ManCofTest( Gia_Man_t * pGia, int nFrameMax, int nConfMax, int n
printf( "Backward reachability converged after %d iterations. ", f-1 );
else if ( RetValue == -1 )
printf( "Conflict limit or timeout is reached after %d frames. ", f-1 );
- Abc_PrintTime( 1, "Runtime", clock() - clk );
+ Abc_PrintTime( 1, "Runtime", Abc_Clock() - clk );
if ( !fFailed && RetValue == 1 )
printf( "Property holds.\n" );
diff --git a/src/aig/gia/giaCSat.c b/src/aig/gia/giaCSat.c
index 6d7df6b5..65cf2961 100644
--- a/src/aig/gia/giaCSat.c
+++ b/src/aig/gia/giaCSat.c
@@ -81,10 +81,10 @@ struct Cbs_Man_t_
int nConfSat; // conflicts in sat problems
int nConfUndec; // conflicts in undec problems
// runtime stats
- clock_t timeSatUnsat; // unsat
- clock_t timeSatSat; // sat
- clock_t timeSatUndec; // undecided
- clock_t timeTotal; // total runtime
+ abctime timeSatUnsat; // unsat
+ abctime timeSatSat; // sat
+ abctime timeSatUndec; // undecided
+ abctime timeTotal; // total runtime
};
static inline int Cbs_VarIsAssigned( Gia_Obj_t * pVar ) { return pVar->fMark0; }
@@ -1004,7 +1004,7 @@ Vec_Int_t * Cbs_ManSolveMiterNc( Gia_Man_t * pAig, int nConfs, Vec_Str_t ** pvSt
Vec_Str_t * vStatus;
Gia_Obj_t * pRoot;
int i, status;
- clock_t clk, clkTotal = clock();
+ abctime clk, clkTotal = Abc_Clock();
assert( Gia_ManRegNum(pAig) == 0 );
// Gia_ManCollectTest( pAig );
// prepare AIG
@@ -1043,7 +1043,7 @@ Vec_Int_t * Cbs_ManSolveMiterNc( Gia_Man_t * pAig, int nConfs, Vec_Str_t ** pvSt
}
continue;
}
- clk = clock();
+ clk = Abc_Clock();
p->Pars.fUseHighest = 1;
p->Pars.fUseLowest = 0;
status = Cbs_ManSolve( p, Gia_ObjChild0(pRoot) );
@@ -1062,25 +1062,25 @@ Vec_Int_t * Cbs_ManSolveMiterNc( Gia_Man_t * pAig, int nConfs, Vec_Str_t ** pvSt
p->nSatUndec++;
p->nConfUndec += p->Pars.nBTThis;
Cec_ManSatAddToStore( vCexStore, NULL, i ); // timeout
- p->timeSatUndec += clock() - clk;
+ p->timeSatUndec += Abc_Clock() - clk;
continue;
}
if ( status == 1 )
{
p->nSatUnsat++;
p->nConfUnsat += p->Pars.nBTThis;
- p->timeSatUnsat += clock() - clk;
+ p->timeSatUnsat += Abc_Clock() - clk;
continue;
}
p->nSatSat++;
p->nConfSat += p->Pars.nBTThis;
// Gia_SatVerifyPattern( pAig, pRoot, vCex, vVisit );
Cec_ManSatAddToStore( vCexStore, vCex, i );
- p->timeSatSat += clock() - clk;
+ p->timeSatSat += Abc_Clock() - clk;
}
Vec_IntFree( vVisit );
p->nSatTotal = Gia_ManPoNum(pAig);
- p->timeTotal = clock() - clkTotal;
+ p->timeTotal = Abc_Clock() - clkTotal;
if ( fVerbose )
Cbs_ManSatPrintStats( p );
// printf( "RecCalls = %8d. RecClause = %8d. RecNonChro = %8d.\n", p->nRecCall, p->nRecClause, p->nRecNonChro );
diff --git a/src/aig/gia/giaCSatOld.c b/src/aig/gia/giaCSatOld.c
index 75b4c3e0..a562c8ae 100644
--- a/src/aig/gia/giaCSatOld.c
+++ b/src/aig/gia/giaCSatOld.c
@@ -73,10 +73,10 @@ struct Cbs0_Man_t_
int nConfSat; // conflicts in sat problems
int nConfUndec; // conflicts in undec problems
// runtime stats
- clock_t timeSatUnsat; // unsat
- clock_t timeSatSat; // sat
- clock_t timeSatUndec; // undecided
- clock_t timeTotal; // total runtime
+ abctime timeSatUnsat; // unsat
+ abctime timeSatSat; // sat
+ abctime timeSatUndec; // undecided
+ abctime timeTotal; // total runtime
};
static inline int Cbs0_VarIsAssigned( Gia_Obj_t * pVar ) { return pVar->fMark0; }
@@ -713,7 +713,7 @@ Vec_Int_t * Cbs_ManSolveMiter( Gia_Man_t * pAig, int nConfs, Vec_Str_t ** pvStat
Vec_Str_t * vStatus;
Gia_Obj_t * pRoot;
int i, status;
- clock_t clk, clkTotal = clock();
+ abctime clk, clkTotal = Abc_Clock();
assert( Gia_ManRegNum(pAig) == 0 );
// prepare AIG
Gia_ManCreateRefs( pAig );
@@ -747,7 +747,7 @@ Vec_Int_t * Cbs_ManSolveMiter( Gia_Man_t * pAig, int nConfs, Vec_Str_t ** pvStat
}
continue;
}
- clk = clock();
+ clk = Abc_Clock();
p->Pars.fUseHighest = 1;
p->Pars.fUseLowest = 0;
status = Cbs0_ManSolve( p, Gia_ObjChild0(pRoot) );
@@ -765,25 +765,25 @@ Vec_Int_t * Cbs_ManSolveMiter( Gia_Man_t * pAig, int nConfs, Vec_Str_t ** pvStat
p->nSatUndec++;
p->nConfUndec += p->Pars.nBTThis;
Cec_ManSatAddToStore( vCexStore, NULL, i ); // timeout
- p->timeSatUndec += clock() - clk;
+ p->timeSatUndec += Abc_Clock() - clk;
continue;
}
if ( status == 1 )
{
p->nSatUnsat++;
p->nConfUnsat += p->Pars.nBTThis;
- p->timeSatUnsat += clock() - clk;
+ p->timeSatUnsat += Abc_Clock() - clk;
continue;
}
p->nSatSat++;
p->nConfSat += p->Pars.nBTThis;
// Gia_SatVerifyPattern( pAig, pRoot, vCex, vVisit );
Cec_ManSatAddToStore( vCexStore, vCex, i );
- p->timeSatSat += clock() - clk;
+ p->timeSatSat += Abc_Clock() - clk;
}
Vec_IntFree( vVisit );
p->nSatTotal = Gia_ManPoNum(pAig);
- p->timeTotal = clock() - clkTotal;
+ p->timeTotal = Abc_Clock() - clkTotal;
if ( fVerbose )
Cbs0_ManSatPrintStats( p );
Cbs0_ManStop( p );
diff --git a/src/aig/gia/giaCTas.c b/src/aig/gia/giaCTas.c
index 79b42c66..73575733 100644
--- a/src/aig/gia/giaCTas.c
+++ b/src/aig/gia/giaCTas.c
@@ -108,10 +108,10 @@ struct Tas_Man_t_
int nConfSat; // conflicts in sat problems
int nConfUndec; // conflicts in undec problems
// runtime stats
- clock_t timeSatUnsat; // unsat
- clock_t timeSatSat; // sat
- clock_t timeSatUndec; // undecided
- clock_t timeTotal; // total runtime
+ abctime timeSatUnsat; // unsat
+ abctime timeSatSat; // sat
+ abctime timeSatUndec; // undecided
+ abctime timeTotal; // total runtime
};
static inline int Tas_VarIsAssigned( Gia_Obj_t * pVar ) { return pVar->fMark0; }
@@ -1525,7 +1525,7 @@ Vec_Int_t * Tas_ManSolveMiterNc( Gia_Man_t * pAig, int nConfs, Vec_Str_t ** pvSt
// Gia_Man_t * pAigCopy = Gia_ManDup( pAig ), * pAigTemp;
int i, status;
- clock_t clk, clkTotal = clock();
+ abctime clk, clkTotal = Abc_Clock();
assert( Gia_ManRegNum(pAig) == 0 );
// Gia_ManCollectTest( pAig );
// prepare AIG
@@ -1563,7 +1563,7 @@ Vec_Int_t * Tas_ManSolveMiterNc( Gia_Man_t * pAig, int nConfs, Vec_Str_t ** pvSt
}
continue;
}
- clk = clock();
+ clk = Abc_Clock();
// p->Pars.fUseActive = 1;
p->Pars.fUseHighest = 1;
p->Pars.fUseLowest = 0;
@@ -1585,7 +1585,7 @@ Vec_Int_t * Tas_ManSolveMiterNc( Gia_Man_t * pAig, int nConfs, Vec_Str_t ** pvSt
p->nSatUndec++;
p->nConfUndec += p->Pars.nBTThis;
Cec_ManSatAddToStore( vCexStore, NULL, i ); // timeout
- p->timeSatUndec += clock() - clk;
+ p->timeSatUndec += Abc_Clock() - clk;
continue;
}
@@ -1597,14 +1597,14 @@ Vec_Int_t * Tas_ManSolveMiterNc( Gia_Man_t * pAig, int nConfs, Vec_Str_t ** pvSt
{
p->nSatUnsat++;
p->nConfUnsat += p->Pars.nBTThis;
- p->timeSatUnsat += clock() - clk;
+ p->timeSatUnsat += Abc_Clock() - clk;
continue;
}
p->nSatSat++;
p->nConfSat += p->Pars.nBTThis;
// Gia_SatVerifyPattern( pAig, pRoot, vCex, vVisit );
Cec_ManSatAddToStore( vCexStore, vCex, i );
- p->timeSatSat += clock() - clk;
+ p->timeSatSat += Abc_Clock() - clk;
// printf( "%d ", Vec_IntSize(vCex) );
}
@@ -1615,7 +1615,7 @@ Vec_Int_t * Tas_ManSolveMiterNc( Gia_Man_t * pAig, int nConfs, Vec_Str_t ** pvSt
Vec_IntFree( vVisit );
p->nSatTotal = Gia_ManPoNum(pAig);
- p->timeTotal = clock() - clkTotal;
+ p->timeTotal = Abc_Clock() - clkTotal;
if ( fVerbose )
Tas_ManSatPrintStats( p );
// printf( "RecCalls = %8d. RecClause = %8d. RecNonChro = %8d.\n", p->nRecCall, p->nRecClause, p->nRecNonChro );
@@ -1705,7 +1705,7 @@ void Tas_ManSolveMiterNc2( Gia_Man_t * pAig, int nConfs, Gia_Man_t * pAigOld, Ve
Vec_Str_t * vStatus;
Gia_Obj_t * pRoot, * pOldRoot;
int i, status;
- clock_t clk, clkTotal = clock();
+ abctime clk, clkTotal = Abc_Clock();
int Tried = 0, Stored = 0, Step = Gia_ManCoNum(pAig) / nPatMax;
assert( Gia_ManRegNum(pAig) == 0 );
// Gia_ManCollectTest( pAig );
@@ -1731,7 +1731,7 @@ void Tas_ManSolveMiterNc2( Gia_Man_t * pAig, int nConfs, Gia_Man_t * pAigOld, Ve
{
assert( !Gia_ObjIsConst0(Gia_ObjFanin0(pRoot)) );
Vec_IntClear( vCex );
- clk = clock();
+ clk = Abc_Clock();
p->Pars.fUseHighest = 1;
p->Pars.fUseLowest = 0;
status = Tas_ManSolve( p, Gia_ObjChild0(pRoot), NULL );
@@ -1741,7 +1741,7 @@ void Tas_ManSolveMiterNc2( Gia_Man_t * pAig, int nConfs, Gia_Man_t * pAigOld, Ve
p->nSatUndec++;
p->nConfUndec += p->Pars.nBTThis;
// Cec_ManSatAddToStore( vCexStore, NULL, i ); // timeout
- p->timeSatUndec += clock() - clk;
+ p->timeSatUndec += Abc_Clock() - clk;
i += Step;
continue;
@@ -1750,7 +1750,7 @@ void Tas_ManSolveMiterNc2( Gia_Man_t * pAig, int nConfs, Gia_Man_t * pAigOld, Ve
{
p->nSatUnsat++;
p->nConfUnsat += p->Pars.nBTThis;
- p->timeSatUnsat += clock() - clk;
+ p->timeSatUnsat += Abc_Clock() - clk;
// record proved
pOldRoot = (Gia_Obj_t *)Vec_PtrEntry( vOldRoots, i );
assert( !Gia_ObjProved( pAigOld, Gia_ObjId(pAigOld, pOldRoot) ) );
@@ -1767,13 +1767,13 @@ void Tas_ManSolveMiterNc2( Gia_Man_t * pAig, int nConfs, Gia_Man_t * pAigOld, Ve
// save pattern
Tried++;
Stored += Tas_StorePattern( vSimInfo, vPres, vCex );
- p->timeSatSat += clock() - clk;
+ p->timeSatSat += Abc_Clock() - clk;
i += Step;
}
printf( "Tried = %d Stored = %d\n", Tried, Stored );
Vec_IntFree( vVisit );
p->nSatTotal = Gia_ManPoNum(pAig);
- p->timeTotal = clock() - clkTotal;
+ p->timeTotal = Abc_Clock() - clkTotal;
if ( fVerbose )
Tas_ManSatPrintStats( p );
Tas_ManStop( p );
diff --git a/src/aig/gia/giaCof.c b/src/aig/gia/giaCof.c
index 522589aa..ceaa8daa 100644
--- a/src/aig/gia/giaCof.c
+++ b/src/aig/gia/giaCof.c
@@ -672,7 +672,7 @@ void Cof_ManPrintFanio( Cof_Man_t * p )
void Gia_ManPrintFanio( Gia_Man_t * pGia, int nNodes )
{
Cof_Man_t * p;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
p = Cof_ManCreateLogicSimple( pGia );
p->nLevels = 1 + Gia_ManLevelNum( pGia );
p->pLevels = ABC_CALLOC( int, p->nLevels );
@@ -683,7 +683,7 @@ void Gia_ManPrintFanio( Gia_Man_t * pGia, int nNodes )
Cof_ManPrintHighFanout( p, nNodes );
Gia_ManHashStop( pGia );
ABC_PRMn( "Memory for logic network", 4*p->nObjData );
-ABC_PRT( "Time", clock() - clk );
+ABC_PRT( "Time", Abc_Clock() - clk );
Cof_ManStop( p );
}
diff --git a/src/aig/gia/giaCone.c b/src/aig/gia/giaCone.c
index ba0a8a2e..cd43a65e 100644
--- a/src/aig/gia/giaCone.c
+++ b/src/aig/gia/giaCone.c
@@ -559,7 +559,7 @@ Gia_Man_t * Gia_ManFindPoPartition( Gia_Man_t * p, int SelectShift, int fOnlyCis
Vec_Wrd_t * vSigns;
Vec_Ptr_t * vParts;
Vec_Int_t * vPart;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
vPivots = Gia_ManFindPivots( p, SelectShift, fOnlyCis, fVerbose );
vSigns = Gia_ManDeriveSigns( p, vPivots, fVerbose );
Vec_IntFree( vPivots );
@@ -574,7 +574,7 @@ Gia_Man_t * Gia_ManFindPoPartition( Gia_Man_t * p, int SelectShift, int fOnlyCis
{
*pvPosEquivs = vParts;
printf( "The algorithm divided %d POs into %d partitions. ", Gia_ManPoNum(p), Vec_PtrSize(vParts) );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
}
else
Vec_VecFree( (Vec_Vec_t *)vParts );
diff --git a/src/aig/gia/giaDfs.c b/src/aig/gia/giaDfs.c
index bb79337f..940eaf46 100644
--- a/src/aig/gia/giaDfs.c
+++ b/src/aig/gia/giaDfs.c
@@ -210,7 +210,7 @@ void Gia_ManCollectTest( Gia_Man_t * p )
Vec_Int_t * vNodes;
Gia_Obj_t * pObj;
int i, iNode;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
vNodes = Vec_IntAlloc( 100 );
Gia_ManIncrementTravId( p );
Gia_ManForEachCo( p, pObj, i )
@@ -219,7 +219,7 @@ void Gia_ManCollectTest( Gia_Man_t * p )
Gia_ManCollectAnds( p, &iNode, 1, vNodes );
}
Vec_IntFree( vNodes );
- ABC_PRT( "DFS from each output", clock() - clk );
+ ABC_PRT( "DFS from each output", Abc_Clock() - clk );
}
/**Function*************************************************************
@@ -277,12 +277,12 @@ int Gia_ManSuppSizeTest( Gia_Man_t * p )
{
Gia_Obj_t * pObj;
int i, Counter = 0;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
Gia_ManForEachObj( p, pObj, i )
if ( Gia_ObjIsAnd(pObj) )
Counter += (Gia_ManSuppSizeOne(p, pObj) <= 16);
printf( "Nodes with small support %d (out of %d)\n", Counter, Gia_ManAndNum(p) );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
return Counter;
}
@@ -487,7 +487,7 @@ void Gia_ManCollectSeqTest( Gia_Man_t * p )
{
Vec_Int_t * vObjs;
int i;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
for ( i = 0; i < Gia_ManPoNum(p); i++ )
{
if ( i % 10000 == 0 )
@@ -497,7 +497,7 @@ void Gia_ManCollectSeqTest( Gia_Man_t * p )
// printf( "%d ", Vec_IntSize(vObjs) );
Vec_IntFree( vObjs );
}
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
}
diff --git a/src/aig/gia/giaEmbed.c b/src/aig/gia/giaEmbed.c
index b6c4655e..b646a311 100644
--- a/src/aig/gia/giaEmbed.c
+++ b/src/aig/gia/giaEmbed.c
@@ -839,12 +839,12 @@ void Gia_ManTestDistanceInternal( Emb_Man_t * p )
{
int nAttempts = 20;
int i, iNode, Dist;
- clock_t clk;
+ abctime clk;
Emb_Obj_t * pPivot, * pNext;
Gia_ManRandom( 1 );
Emb_ManResetTravId( p );
// compute distances from several randomly selected PIs
- clk = clock();
+ clk = Abc_Clock();
printf( "From inputs: " );
for ( i = 0; i < nAttempts; i++ )
{
@@ -858,9 +858,9 @@ void Gia_ManTestDistanceInternal( Emb_Man_t * p )
Dist = Emb_ManComputeDistance_old( p, pPivot );
printf( "%d ", Dist );
}
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
// compute distances from several randomly selected POs
- clk = clock();
+ clk = Abc_Clock();
printf( "From outputs: " );
for ( i = 0; i < nAttempts; i++ )
{
@@ -872,9 +872,9 @@ void Gia_ManTestDistanceInternal( Emb_Man_t * p )
Dist = Emb_ManComputeDistance_old( p, pPivot );
printf( "%d ", Dist );
}
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
// compute distances from several randomly selected nodes
- clk = clock();
+ clk = Abc_Clock();
printf( "From nodes: " );
for ( i = 0; i < nAttempts; i++ )
{
@@ -887,7 +887,7 @@ void Gia_ManTestDistanceInternal( Emb_Man_t * p )
Dist = Emb_ManComputeDistance_old( p, pPivot );
printf( "%d ", Dist );
}
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
}
/**Function*************************************************************
@@ -904,11 +904,11 @@ void Gia_ManTestDistanceInternal( Emb_Man_t * p )
void Gia_ManTestDistance( Gia_Man_t * pGia )
{
Emb_Man_t * p;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
p = Emb_ManStart( pGia );
// Emb_ManPrintFanio( p );
Emb_ManPrintStats( p );
-ABC_PRT( "Time", clock() - clk );
+ABC_PRT( "Time", Abc_Clock() - clk );
Gia_ManTestDistanceInternal( p );
Emb_ManStop( p );
}
@@ -1530,7 +1530,7 @@ void Emb_ManPlacementRefine( Emb_Man_t * p, int nIters, int fVerbose )
float VertX, VertY;
int * pPermX, * pPermY;
int i, k, Iter, iMinX, iMaxX, iMinY, iMaxY;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
if ( p->pPlacement == NULL )
return;
pEdgeX = ABC_ALLOC( float, p->nObjs );
@@ -1585,7 +1585,7 @@ void Emb_ManPlacementRefine( Emb_Man_t * p, int nIters, int fVerbose )
if ( fVerbose )
{
printf( "%2d : HPWL = %e ", Iter+1, CostThis );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
}
}
ABC_FREE( pEdgeX );
@@ -1792,12 +1792,12 @@ void Gia_ManSolveProblem( Gia_Man_t * pGia, Emb_Par_t * pPars )
{
Emb_Man_t * p;
int i;
- clock_t clkSetup;
- clock_t clk;
+ abctime clkSetup;
+ abctime clk;
// Gia_ManTestDistance( pGia );
// transform AIG into internal data-structure
-clk = clock();
+clk = Abc_Clock();
if ( pPars->fCluster )
{
p = Emb_ManStart( pGia );
@@ -1816,41 +1816,41 @@ clk = clock();
Gia_ManRandom( 1 ); // reset random numbers for deterministic behavior
Emb_ManResetTravId( p );
Emb_ManSetValue( p );
-clkSetup = clock() - clk;
+clkSetup = Abc_Clock() - clk;
-clk = clock();
+clk = Abc_Clock();
Emb_ManComputeDimensions( p, pPars->nDims );
if ( pPars->fVerbose )
ABC_PRT( "Setup ", clkSetup );
if ( pPars->fVerbose )
-ABC_PRT( "Dimensions", clock() - clk );
+ABC_PRT( "Dimensions", Abc_Clock() - clk );
-clk = clock();
+clk = Abc_Clock();
Emb_ManComputeCovariance( p, pPars->nDims );
if ( pPars->fVerbose )
-ABC_PRT( "Matrix ", clock() - clk );
+ABC_PRT( "Matrix ", Abc_Clock() - clk );
-clk = clock();
+clk = Abc_Clock();
Emb_ManComputeEigenvectors( p, pPars->nDims, pPars->nSols );
Emb_ManComputeSolutions( p, pPars->nDims, pPars->nSols );
Emb_ManDerivePlacement( p, pPars->nSols );
if ( pPars->fVerbose )
-ABC_PRT( "Eigenvecs ", clock() - clk );
+ABC_PRT( "Eigenvecs ", Abc_Clock() - clk );
if ( pPars->fRefine )
{
-clk = clock();
+clk = Abc_Clock();
Emb_ManPlacementRefine( p, pPars->nIters, pPars->fVerbose );
if ( pPars->fVerbose )
-ABC_PRT( "Refinement", clock() - clk );
+ABC_PRT( "Refinement", Abc_Clock() - clk );
}
if ( (pPars->fDump || pPars->fDumpLarge) && pPars->nSols == 2 )
{
-clk = clock();
+clk = Abc_Clock();
Emb_ManDumpGnuplot( p, pGia->pName, pPars->fDumpLarge, pPars->fShowImage );
if ( pPars->fVerbose )
-ABC_PRT( "Image dump", clock() - clk );
+ABC_PRT( "Image dump", Abc_Clock() - clk );
}
// transfer placement
diff --git a/src/aig/gia/giaEra.c b/src/aig/gia/giaEra.c
index 8f0e2b07..b5b94cb5 100644
--- a/src/aig/gia/giaEra.c
+++ b/src/aig/gia/giaEra.c
@@ -529,7 +529,7 @@ int Gia_ManCollectReachable( Gia_Man_t * pAig, int nStatesMax, int fMiter, int f
Gia_ManEra_t * p;
Gia_ObjEra_t * pState;
int Hash;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
int RetValue = 1;
assert( Gia_ManPiNum(pAig) <= 12 );
assert( Gia_ManRegNum(pAig) > 0 );
@@ -571,11 +571,11 @@ int Gia_ManCollectReachable( Gia_Man_t * pAig, int nStatesMax, int fMiter, int f
p->iCurState, Vec_PtrSize(p->vStates), 1.0*p->iCurState/Vec_PtrSize(p->vStates), Gia_ManCountDepth(p),
(1.0/(1<<20))*(1.0*Vec_PtrSize(p->vStates)*(sizeof(Gia_ObjEra_t) + sizeof(unsigned) * p->nWordsDat) +
1.0*p->nBins*sizeof(unsigned) + 1.0*p->vStates->nCap * sizeof(void*)) );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
}
}
printf( "Reachability analysis traversed %d states with depth %d. ", p->iCurState-1, Gia_ManCountDepth(p) );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
if ( fDumpFile )
{
char * pFileName = "test.stg";
diff --git a/src/aig/gia/giaEra2.c b/src/aig/gia/giaEra2.c
index 060c83a5..b8ca65cc 100644
--- a/src/aig/gia/giaEra2.c
+++ b/src/aig/gia/giaEra2.c
@@ -1537,13 +1537,13 @@ int Gia_ManAreDeriveNexts_rec( Gia_ManAre_t * p, Gia_PtrAre_t Sta )
Vec_Int_t * vLits, * vTfos;
Gia_Obj_t * pObj;
int i;
- clock_t clk;
+ abctime clk;
if ( ++p->nRecCalls == MAX_CALL_NUM )
return 0;
if ( (pPivot = Gia_ManAreMostUsedPi(p)) == NULL )
{
Gia_StaAre_t * pNew;
- clk = clock();
+ clk = Abc_Clock();
pNew = Gia_ManAreCreateStaNew( p );
pNew->iPrev = Sta;
p->fStopped = (p->fMiter && (Gia_ManCheckPOstatus(p) & 1));
@@ -1554,7 +1554,7 @@ int Gia_ManAreDeriveNexts_rec( Gia_ManAre_t * p, Gia_PtrAre_t Sta )
return 1;
}
Gia_ManAreCubeProcess( p, pNew );
- p->timeCube += clock() - clk;
+ p->timeCube += Abc_Clock() - clk;
return p->fStopped;
}
// remember values in the cone and perform update
@@ -1613,7 +1613,7 @@ int Gia_ManAreDeriveNexts( Gia_ManAre_t * p, Gia_PtrAre_t Sta )
Gia_StaAre_t * pSta;
Gia_Obj_t * pObj;
int i, RetValue;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
pSta = Gia_ManAreSta( p, Sta );
if ( Gia_StaIsUnused(pSta) )
return 0;
@@ -1657,7 +1657,7 @@ int Gia_ManAreDeriveNexts( Gia_ManAre_t * p, Gia_PtrAre_t Sta )
}
// printf( "%d ", p->nRecCalls );
//printf( "%d ", Gia_ManObjNum(p->pNew) );
- p->timeAig += clock() - clk;
+ p->timeAig += Abc_Clock() - clk;
return RetValue;
}
@@ -1673,7 +1673,7 @@ int Gia_ManAreDeriveNexts( Gia_ManAre_t * p, Gia_PtrAre_t Sta )
SeeAlso []
***********************************************************************/
-void Gia_ManArePrintReport( Gia_ManAre_t * p, clock_t Time, int fFinal )
+void Gia_ManArePrintReport( Gia_ManAre_t * p, abctime Time, int fFinal )
{
printf( "States =%10d. Reached =%10d. R = %5.3f. Depth =%6d. Mem =%9.2f MB. ",
p->iStaCur, p->nStas, 1.0*p->iStaCur/p->nStas, Gia_ManAreDepth(p, p->iStaCur),
@@ -1681,11 +1681,11 @@ void Gia_ManArePrintReport( Gia_ManAre_t * p, clock_t Time, int fFinal )
4.0*p->nStaPages*p->nSize*MAX_ITEM_NUM + 16.0*p->nObjPages*MAX_ITEM_NUM)/(1<<20) );
if ( fFinal )
{
- ABC_PRT( "Time", clock() - Time );
+ ABC_PRT( "Time", Abc_Clock() - Time );
}
else
{
- ABC_PRTr( "Time", clock() - Time );
+ ABC_PRTr( "Time", Abc_Clock() - Time );
}
}
@@ -1705,7 +1705,7 @@ int Gia_ManArePerform( Gia_Man_t * pAig, int nStatesMax, int fMiter, int fVerbos
// extern Gia_Man_t * Gia_ManCompress2( Gia_Man_t * p, int fUpdateLevel, int fVerbose );
extern Abc_Cex_t * Gia_ManAreDeriveCex( Gia_ManAre_t * p, Gia_StaAre_t * pLast );
Gia_ManAre_t * p;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
int RetValue = 1;
if ( Gia_ManRegNum(pAig) > MAX_VARS_NUM )
{
@@ -1734,22 +1734,22 @@ int Gia_ManArePerform( Gia_Man_t * pAig, int nStatesMax, int fMiter, int fVerbos
p->fStopped ? "Stopped" : "Completed",
p->nStas, Gia_ManAreListCountUsed(p),
Gia_ManAreDepth(p, p->iStaCur-1) );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
if ( pAig->pCexSeq != NULL )
Abc_Print( 1, "Output %d of miter \"%s\" was asserted in frame %d.\n",
p->iStaCur, pAig->pName, Gia_ManAreDepth(p, p->iStaCur)-1 );
if ( fVerbose )
{
- ABC_PRTP( "Cofactoring", p->timeAig - p->timeCube, clock() - clk );
- ABC_PRTP( "Containment", p->timeCube, clock() - clk );
- ABC_PRTP( "Other ", clock() - clk - p->timeAig, clock() - clk );
- ABC_PRTP( "TOTAL ", clock() - clk, clock() - clk );
+ ABC_PRTP( "Cofactoring", p->timeAig - p->timeCube, Abc_Clock() - clk );
+ ABC_PRTP( "Containment", p->timeCube, Abc_Clock() - clk );
+ ABC_PRTP( "Other ", Abc_Clock() - clk - p->timeAig, Abc_Clock() - clk );
+ ABC_PRTP( "TOTAL ", Abc_Clock() - clk, Abc_Clock() - clk );
}
if ( Gia_ManRegNum(pAig) <= 30 )
{
- clk = clock();
+ clk = Abc_Clock();
printf( "The number of unique state minterms in computed state cubes is %d. ", Gia_ManCountMinterms(p) );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
}
// printf( "Compares = %d. Equals = %d. Disj = %d. Disj2 = %d. Disj3 = %d.\n",
// p->nCompares, p->nEquals, p->nDisjs, p->nDisjs2, p->nDisjs3 );
diff --git a/src/aig/gia/giaForce.c b/src/aig/gia/giaForce.c
index d37fa455..0b3003a8 100644
--- a/src/aig/gia/giaForce.c
+++ b/src/aig/gia/giaForce.c
@@ -714,7 +714,7 @@ Vec_Int_t * Frc_ManCollectCos( Frc_Man_t * p )
void Frc_ManCrossCutTest( Frc_Man_t * p, Vec_Int_t * vOrderInit )
{
Vec_Int_t * vOrder;
-// clock_t clk = clock();
+// abctime clk = Abc_Clock();
vOrder = vOrderInit? vOrderInit : Frc_ManCollectCos( p );
printf( "CrossCut = %6d\n", Frc_ManCrossCut( p, vOrder, 0 ) );
printf( "CrossCut = %6d\n", Frc_ManCrossCut( p, vOrder, 1 ) );
@@ -724,7 +724,7 @@ void Frc_ManCrossCutTest( Frc_Man_t * p, Vec_Int_t * vOrderInit )
Vec_IntReverseOrder( vOrder );
if ( vOrder != vOrderInit )
Vec_IntFree( vOrder );
-// ABC_PRT( "Time", clock() - clk );
+// ABC_PRT( "Time", Abc_Clock() - clk );
}
@@ -892,7 +892,7 @@ void Frc_ManPlacementRefine( Frc_Man_t * p, int nIters, int fVerbose )
float * pVertX, VertX;
int * pPermX, * pHandles;
int k, h, Iter, iMinX, iMaxX, Counter, nCutStart, nCutCur, nCutCur2, nCutPrev;
- clock_t clk = clock(), clk2, clk2Total = 0;
+ abctime clk = Abc_Clock(), clk2, clk2Total = 0;
// create starting one-dimensional placement
vCoOrder = Frc_ManCollectCos( p );
if ( fRandomize )
@@ -930,9 +930,9 @@ void Frc_ManPlacementRefine( Frc_Man_t * p, int nIters, int fVerbose )
}
assert( Counter == Frc_ManObjNum(p) );
// sort these numbers
- clk2 = clock();
+ clk2 = Abc_Clock();
pPermX = Gia_SortFloats( pVertX, pHandles, p->nObjs );
- clk2Total += clock() - clk2;
+ clk2Total += Abc_Clock() - clk2;
assert( pPermX == pHandles );
Vec_IntClear( vCoOrder );
for ( k = 0; k < p->nObjs; k++ )
@@ -954,7 +954,7 @@ void Frc_ManPlacementRefine( Frc_Man_t * p, int nIters, int fVerbose )
{
printf( "%2d : Span = %e ", Iter+1, CostThis );
printf( "Cut = %6d (%5.2f %%) CutR = %6d ", nCutCur, 100.0*(nCutStart-nCutCur)/nCutStart, nCutCur2 );
- ABC_PRTn( "Total", clock() - clk );
+ ABC_PRTn( "Total", Abc_Clock() - clk );
ABC_PRT( "Sort", clk2Total );
// Frc_ManCrossCutTest( p, vCoOrder );
}
@@ -1068,7 +1068,7 @@ void For_ManFileExperiment()
FILE * pFile;
int * pBuffer;
int i, Size, Exp = 25;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
int RetValue;
Size = (1 << Exp);
@@ -1077,19 +1077,19 @@ void For_ManFileExperiment()
pBuffer = ABC_ALLOC( int, Size );
for ( i = 0; i < Size; i++ )
pBuffer[i] = i;
-ABC_PRT( "Fillup", clock() - clk );
+ABC_PRT( "Fillup", Abc_Clock() - clk );
-clk = clock();
+clk = Abc_Clock();
pFile = fopen( "test.txt", "rb" );
RetValue = fread( pBuffer, 1, sizeof(int) * Size, pFile );
fclose( pFile );
-ABC_PRT( "Read ", clock() - clk );
+ABC_PRT( "Read ", Abc_Clock() - clk );
-clk = clock();
+clk = Abc_Clock();
pFile = fopen( "test.txt", "wb" );
fwrite( pBuffer, 1, sizeof(int) * Size, pFile );
fclose( pFile );
-ABC_PRT( "Write ", clock() - clk );
+ABC_PRT( "Write ", Abc_Clock() - clk );
/*
2^25 machine words (134217728 bytes).
Fillup = 0.06 sec
diff --git a/src/aig/gia/giaFrames.c b/src/aig/gia/giaFrames.c
index 23caacc4..ae832af9 100644
--- a/src/aig/gia/giaFrames.c
+++ b/src/aig/gia/giaFrames.c
@@ -227,7 +227,7 @@ Gia_ManUnr_t * Gia_ManUnrStart( Gia_Man_t * pAig, Gia_ParFra_t * pPars )
Gia_ManUnr_t * p;
Gia_Obj_t * pObj;
int i, k, iRank, iFanin, Degree, Shift;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
p = ABC_CALLOC( Gia_ManUnr_t, 1 );
p->pAig = pAig;
@@ -291,7 +291,7 @@ Gia_ManUnr_t * Gia_ManUnrStart( Gia_Man_t * pAig, Gia_ParFra_t * pPars )
Vec_IntSize(p->vLimit) - 1,
Gia_ManObjNum(pAig) - Gia_ManObjNum(p->pOrder),
1.0*Vec_IntSize(p->vStore)/Gia_ManObjNum(p->pOrder) - 1.0 );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
}
return p;
}
@@ -608,10 +608,10 @@ Gia_Man_t * Gia_ManUnroll( Gia_ManUnr_t * p )
Gia_Man_t * Gia_ManFrames2( Gia_Man_t * pAig, Gia_ParFra_t * pPars )
{
Gia_Man_t * pNew;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
pNew = Gia_ManUnroll( pAig, pPars );
if ( pPars->fVerbose )
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
return pNew;
}
diff --git a/src/aig/gia/giaFront.c b/src/aig/gia/giaFront.c
index fc99cfe9..8c7e06e5 100644
--- a/src/aig/gia/giaFront.c
+++ b/src/aig/gia/giaFront.c
@@ -151,7 +151,7 @@ Gia_Man_t * Gia_ManFront( Gia_Man_t * p )
char * pFront; // places used for the frontier
int i, iLit, nCrossCut = 0, nCrossCutMax = 0;
int nCrossCutMaxInit = Gia_ManCrossCutSimple( p );
- int iFront = 0;//, clk = clock();
+ int iFront = 0;//, clk = Abc_Clock();
// set references for all objects
Gia_ManCreateValueRefs( p );
// start the new manager
@@ -243,7 +243,7 @@ Gia_Man_t * Gia_ManFront( Gia_Man_t * p )
assert( pFront[i] == 0 );
ABC_FREE( pFront );
//printf( "Crosscut = %6d. Frontier = %6d. ", nCrossCutMaxInit, pNew->nFront );
-//ABC_PRT( "Time", clock() - clk );
+//ABC_PRT( "Time", Abc_Clock() - clk );
Gia_ManSetRegNum( pNew, Gia_ManRegNum(p) );
return pNew;
}
diff --git a/src/aig/gia/giaGlitch.c b/src/aig/gia/giaGlitch.c
index 2b958cba..cc69f6b3 100644
--- a/src/aig/gia/giaGlitch.c
+++ b/src/aig/gia/giaGlitch.c
@@ -741,7 +741,7 @@ void Gli_ManSetPiRandomSeq( Gli_Man_t * p, float PiTransProb )
void Gli_ManSwitchesAndGlitches( Gli_Man_t * p, int nPatterns, float PiTransProb, int fVerbose )
{
int i, k;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
Gia_ManRandom( 1 );
Gli_ManFinalize( p );
if ( p->nRegs == 0 )
@@ -774,7 +774,7 @@ void Gli_ManSwitchesAndGlitches( Gli_Man_t * p, int nPatterns, float PiTransProb
{
printf( "\nSimulated %d patterns. ", nPatterns );
ABC_PRMn( "Memory", 4*p->nObjData );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
}
}
diff --git a/src/aig/gia/giaIso.c b/src/aig/gia/giaIso.c
index fcb7f363..5c03d1d2 100644
--- a/src/aig/gia/giaIso.c
+++ b/src/aig/gia/giaIso.c
@@ -82,12 +82,12 @@ struct Gia_IsoMan_t_
Vec_Int_t * vClasses;
Vec_Int_t * vClasses2;
// statistics
- 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;
};
static inline unsigned Gia_IsoGetValue( Gia_IsoMan_t * p, int i ) { return (unsigned)(p->pStoreW[i]); }
@@ -178,7 +178,7 @@ void Gia_IsoPrintClasses( Gia_IsoMan_t * p )
printf( "\n" );
}
}
-void Gia_IsoPrint( Gia_IsoMan_t * p, int Iter, clock_t Time )
+void Gia_IsoPrint( Gia_IsoMan_t * p, int Iter, abctime Time )
{
printf( "Iter %4d : ", Iter );
printf( "Entries =%8d. ", p->nEntries );
@@ -301,7 +301,7 @@ int Gia_IsoSort( Gia_IsoMan_t * p )
Gia_Obj_t * pObj, * pObj0;
int i, k, fSameValue, iBegin, iBeginOld, nSize, nSizeNew;
int fRefined = 0;
- clock_t clk;
+ abctime clk;
// go through the equiv classes
p->nSingles = 0;
@@ -326,9 +326,9 @@ int Gia_IsoSort( Gia_IsoMan_t * p )
}
fRefined = 1;
// sort objects
- clk = clock();
+ clk = Abc_Clock();
Abc_QuickSort3( p->pStoreW + iBegin, nSize, 0 );
- p->timeSort += clock() - clk;
+ p->timeSort += Abc_Clock() - clk;
// divide into new classes
iBeginOld = iBegin;
pObj0 = Gia_ManObj( p->pGia, Gia_IsoGetItem(p,iBegin) );
@@ -725,7 +725,7 @@ Vec_Ptr_t * Gia_IsoDeriveEquivPos( Gia_Man_t * pGia, int fForward, int fVerbose
Vec_Ptr_t * vEquivs = NULL;
int fRefined, fRefinedAll;
int i, c;
- clock_t clk = clock(), clkTotal = clock();
+ abctime clk = Abc_Clock(), clkTotal = Abc_Clock();
assert( Gia_ManCiNum(pGia) > 0 );
assert( Gia_ManPoNum(pGia) > 0 );
@@ -733,9 +733,9 @@ Vec_Ptr_t * Gia_IsoDeriveEquivPos( Gia_Man_t * pGia, int fForward, int fVerbose
p = Gia_IsoManStart( pGia );
Gia_IsoPrepare( p );
Gia_IsoAssignUnique( p );
- p->timeStart = clock() - clk;
+ p->timeStart = Abc_Clock() - clk;
if ( fVerbose )
- Gia_IsoPrint( p, 0, clock() - clkTotal );
+ Gia_IsoPrint( p, 0, Abc_Clock() - clkTotal );
// Gia_IsoRecognizeMuxes( pGia );
@@ -744,10 +744,10 @@ Vec_Ptr_t * Gia_IsoDeriveEquivPos( Gia_Man_t * pGia, int fForward, int fVerbose
{
for ( c = 0; i < nIterMax && c < nFixedPoint+1; i++, c = fRefined ? 0 : c+1 )
{
- clk = clock(); Gia_IsoSimulate( p, i ); p->timeSim += clock() - clk;
- clk = clock(); fRefined = Gia_IsoSort( p ); p->timeRefine += clock() - clk;
+ clk = Abc_Clock(); Gia_IsoSimulate( p, i ); p->timeSim += Abc_Clock() - clk;
+ clk = Abc_Clock(); fRefined = Gia_IsoSort( p ); p->timeRefine += Abc_Clock() - clk;
if ( fVerbose )
- Gia_IsoPrint( p, i+1, clock() - clkTotal );
+ Gia_IsoPrint( p, i+1, Abc_Clock() - clkTotal );
}
}
else
@@ -759,18 +759,18 @@ Vec_Ptr_t * Gia_IsoDeriveEquivPos( Gia_Man_t * pGia, int fForward, int fVerbose
fRefinedAll = 0;
for ( c = 0; i < nIterMax && c < nFixedPoint+1; i++, c = fRefined ? 0 : c+1 )
{
- clk = clock(); Gia_IsoSimulate( p, i ); p->timeSim += clock() - clk;
- clk = clock(); fRefined = Gia_IsoSort( p ); p->timeRefine += clock() - clk;
+ clk = Abc_Clock(); Gia_IsoSimulate( p, i ); p->timeSim += Abc_Clock() - clk;
+ clk = Abc_Clock(); fRefined = Gia_IsoSort( p ); p->timeRefine += Abc_Clock() - clk;
if ( fVerbose )
- Gia_IsoPrint( p, i+1, clock() - clkTotal );
+ Gia_IsoPrint( p, i+1, Abc_Clock() - clkTotal );
fRefinedAll |= fRefined;
}
for ( c = 0; i < nIterMax && c < nFixedPoint+1; i++, c = fRefined ? 0 : c+1 )
{
- clk = clock(); Gia_IsoSimulateBack( p, i ); p->timeSim += clock() - clk;
- clk = clock(); fRefined = Gia_IsoSort( p ); p->timeRefine += clock() - clk;
+ clk = Abc_Clock(); Gia_IsoSimulateBack( p, i ); p->timeSim += Abc_Clock() - clk;
+ clk = Abc_Clock(); fRefined = Gia_IsoSort( p ); p->timeRefine += Abc_Clock() - clk;
if ( fVerbose )
- Gia_IsoPrint( p, i+1, clock() - clkTotal );
+ Gia_IsoPrint( p, i+1, Abc_Clock() - clkTotal );
fRefinedAll |= fRefined;
}
}
@@ -788,18 +788,18 @@ Vec_Ptr_t * Gia_IsoDeriveEquivPos( Gia_Man_t * pGia, int fForward, int fVerbose
fRefinedAll = 0;
for ( c = 0; i < nIterMax && c < nFixedPoint; i++, c = fRefined ? 0 : c+1 )
{
- clk = clock(); Gia_IsoSimulateBack( p, i ); p->timeSim += clock() - clk;
- clk = clock(); fRefined = Gia_IsoSort( p ); p->timeRefine += clock() - clk;
+ clk = Abc_Clock(); Gia_IsoSimulateBack( p, i ); p->timeSim += Abc_Clock() - clk;
+ clk = Abc_Clock(); fRefined = Gia_IsoSort( p ); p->timeRefine += Abc_Clock() - clk;
if ( fVerbose )
- Gia_IsoPrint( p, i+1, clock() - clkTotal );
+ Gia_IsoPrint( p, i+1, Abc_Clock() - clkTotal );
fRefinedAll |= fRefined;
}
for ( c = 0; i < nIterMax && c < nFixedPoint; i++, c = fRefined ? 0 : c+1 )
{
- clk = clock(); Gia_IsoSimulate( p, i ); p->timeSim += clock() - clk;
- clk = clock(); fRefined = Gia_IsoSort( p ); p->timeRefine += clock() - clk;
+ clk = Abc_Clock(); Gia_IsoSimulate( p, i ); p->timeSim += Abc_Clock() - clk;
+ clk = Abc_Clock(); fRefined = Gia_IsoSort( p ); p->timeRefine += Abc_Clock() - clk;
if ( fVerbose )
- Gia_IsoPrint( p, i+1, clock() - clkTotal );
+ Gia_IsoPrint( p, i+1, Abc_Clock() - clkTotal );
fRefinedAll |= fRefined;
// if ( fRefined )
// printf( "Refinedment happened.\n" );
@@ -808,12 +808,12 @@ Vec_Ptr_t * Gia_IsoDeriveEquivPos( Gia_Man_t * pGia, int fForward, int fVerbose
}
if ( fVerbose )
- Gia_IsoPrint( p, i+2, clock() - clkTotal );
+ Gia_IsoPrint( p, i+2, Abc_Clock() - clkTotal );
}
// Gia_IsoPrintClasses( p );
if ( fVerbose )
{
- p->timeTotal = clock() - clkTotal;
+ p->timeTotal = Abc_Clock() - clkTotal;
p->timeOther = p->timeTotal - p->timeStart - p->timeSim - p->timeRefine;
ABC_PRTP( "Start ", p->timeStart, p->timeTotal );
ABC_PRTP( "Simulate ", p->timeSim, p->timeTotal );
@@ -1080,7 +1080,7 @@ Gia_Man_t * Gia_ManIsoReduce( Gia_Man_t * pInit, Vec_Ptr_t ** pvPosEquivs, Vec_P
Vec_Str_t * vStr, * vStr2;
int i, k, s, sStart, iPo, Counter;
int nClasses, nUsedPos;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
if ( pvPosEquivs )
*pvPosEquivs = NULL;
if ( pvPiPerms )
@@ -1113,7 +1113,7 @@ Gia_Man_t * Gia_ManIsoReduce( Gia_Man_t * pInit, Vec_Ptr_t ** pvPosEquivs, Vec_P
nClasses = Vec_IntCountNonTrivial( vEquivs, &nUsedPos );
printf( "Reduced %d outputs to %d candidate classes (%d outputs are in %d non-trivial classes). ",
Gia_ManPoNum(p), Vec_PtrSize(vEquivs), nUsedPos, nClasses );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
if ( fEstimate )
{
Vec_VecFree( (Vec_Vec_t *)vEquivs );
@@ -1212,7 +1212,7 @@ Gia_Man_t * Gia_ManIsoReduce( Gia_Man_t * pInit, Vec_Ptr_t ** pvPosEquivs, Vec_P
Gia_ManPoNum(p), Vec_PtrSize(vEquivs), nUsedPos, nClasses );
else
printf( "Reduced %d dual outputs to %d dual outputs. ", Gia_ManPoNum(p)/2, Gia_ManPoNum(pPart)/2 );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
if ( fVerbose )
{
printf( "Nontrivial classes:\n" );
@@ -1241,10 +1241,10 @@ Gia_Man_t * Gia_ManIsoReduce( Gia_Man_t * pInit, Vec_Ptr_t ** pvPosEquivs, Vec_P
void Gia_IsoTestOld( Gia_Man_t * p, int fVerbose )
{
Vec_Ptr_t * vEquivs;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
vEquivs = Gia_IsoDeriveEquivPos( p, 0, fVerbose );
printf( "Reduced %d outputs to %d. ", Gia_ManPoNum(p), vEquivs ? Vec_PtrSize(vEquivs) : 1 );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
if ( fVerbose && vEquivs && Gia_ManPoNum(p) != Vec_PtrSize(vEquivs) )
{
printf( "Nontrivial classes:\n" );
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" );
diff --git a/src/aig/gia/giaRetime.c b/src/aig/gia/giaRetime.c
index 3f68c0d1..c229adae 100644
--- a/src/aig/gia/giaRetime.c
+++ b/src/aig/gia/giaRetime.c
@@ -268,27 +268,27 @@ Gia_Man_t * Gia_ManRetimeForward( Gia_Man_t * p, int nMaxIters, int fVerbose )
{
Gia_Man_t * pNew, * pTemp;
int i, nRegFixed, nRegMoves = 1;
- clock_t clk;
+ abctime clk;
pNew = p;
for ( i = 0; i < nMaxIters && nRegMoves > 0; i++ )
{
- clk = clock();
+ clk = Abc_Clock();
pNew = Gia_ManRetimeForwardOne( pTemp = pNew, &nRegFixed, &nRegMoves );
if ( fVerbose )
{
printf( "%2d : And = %6d. Reg = %5d. Unret = %5d. Move = %6d. ",
i + 1, Gia_ManAndNum(pTemp), Gia_ManRegNum(pTemp), nRegFixed, nRegMoves );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
}
if ( pTemp != p )
Gia_ManStop( pTemp );
}
/*
- clk = clock();
+ clk = Abc_Clock();
pNew = Gia_ManReduceLaches( pNew, fVerbose );
if ( fVerbose )
{
- ABC_PRT( "Register sharing time", clock() - clk );
+ ABC_PRT( "Register sharing time", Abc_Clock() - clk );
}
*/
return pNew;
diff --git a/src/aig/gia/giaShrink.c b/src/aig/gia/giaShrink.c
index 65fed129..af727726 100644
--- a/src/aig/gia/giaShrink.c
+++ b/src/aig/gia/giaShrink.c
@@ -53,7 +53,7 @@ Gia_Man_t * Gia_ManMapShrink4( Gia_Man_t * p, int fKeepLevel, int fVerbose )
Gia_Obj_t * pObj, * pFanin;
unsigned * pTruth;
int i, k, iFan;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// int ClassCounts[222] = {0};
int * pLutClass, Counter = 0;
assert( p->pMapping != NULL );
@@ -139,7 +139,7 @@ Gia_Man_t * Gia_ManMapShrink4( Gia_Man_t * p, int fKeepLevel, int fVerbose )
if ( fVerbose )
{
printf( "Total gain in AIG nodes = %d. ", Gia_ManObjNum(p)-Gia_ManObjNum(pNew) );
- ABC_PRT( "Total runtime", clock() - clk );
+ ABC_PRT( "Total runtime", Abc_Clock() - clk );
}
ABC_FREE( pLutClass );
return pNew;
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 );
diff --git a/src/aig/gia/giaSim.c b/src/aig/gia/giaSim.c
index 52ffd6e1..4871f17d 100644
--- a/src/aig/gia/giaSim.c
+++ b/src/aig/gia/giaSim.c
@@ -109,7 +109,7 @@ Vec_Int_t * Gia_ManSimDeriveResets( Gia_Man_t * pGia )
int i, k, Lit, Count;
int Counter0 = 0, Counter1 = 0;
int CounterPi0 = 0, CounterPi1 = 0;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// create reset counters for each literal
vCountLits = Vec_IntStart( 2 * Gia_ManObjNum(pGia) );
@@ -155,7 +155,7 @@ Vec_Int_t * Gia_ManSimDeriveResets( Gia_Man_t * pGia )
Vec_IntFree( vCountLits );
printf( "Logic0 = %d (%d). Logic1 = %d (%d). ", Counter0, CounterPi0, Counter1, CounterPi1 );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
return vResult;
}
@@ -609,9 +609,9 @@ int Gia_ManSimSimulate( Gia_Man_t * pAig, Gia_ParSim_t * pPars )
{
extern int Gia_ManSimSimulateEquiv( Gia_Man_t * pAig, Gia_ParSim_t * pPars );
Gia_ManSim_t * p;
- clock_t clkTotal = clock();
+ abctime clkTotal = Abc_Clock();
int i, iOut, iPat, RetValue = 0;
- clock_t nTimeToStop = pPars->TimeLimit ? pPars->TimeLimit * CLOCKS_PER_SEC + clock(): 0;
+ abctime nTimeToStop = pPars->TimeLimit ? pPars->TimeLimit * CLOCKS_PER_SEC + Abc_Clock(): 0;
if ( pAig->pReprs && pAig->pNexts )
return Gia_ManSimSimulateEquiv( pAig, pPars );
ABC_FREE( pAig->pCexSeq );
@@ -624,7 +624,7 @@ int Gia_ManSimSimulate( Gia_Man_t * pAig, Gia_ParSim_t * pPars )
if ( pPars->fVerbose )
{
Abc_Print( 1, "Frame %4d out of %4d and timeout %3d sec. ", i+1, pPars->nIters, pPars->TimeLimit );
- Abc_Print( 1, "Time = %7.2f sec\r", (1.0*clock()-clkTotal)/CLOCKS_PER_SEC );
+ Abc_Print( 1, "Time = %7.2f sec\r", (1.0*Abc_Clock()-clkTotal)/CLOCKS_PER_SEC );
}
if ( pPars->fCheckMiter && Gia_ManCheckPos( p, &iOut, &iPat ) )
{
@@ -648,7 +648,7 @@ int Gia_ManSimSimulate( Gia_Man_t * pAig, Gia_ParSim_t * pPars )
RetValue = 1;
break;
}
- if ( clock() > nTimeToStop )
+ if ( Abc_Clock() > nTimeToStop )
{
i++;
break;
@@ -659,7 +659,7 @@ int Gia_ManSimSimulate( Gia_Man_t * pAig, Gia_ParSim_t * pPars )
Gia_ManSimDelete( p );
if ( pAig->pCexSeq == NULL )
Abc_Print( 1, "No bug detected after simulating %d frames with %d words. ", i, pPars->nWords );
- Abc_PrintTime( 1, "Time", clock() - clkTotal );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clkTotal );
return RetValue;
}
diff --git a/src/aig/gia/giaSim2.c b/src/aig/gia/giaSim2.c
index 85428769..349f8732 100644
--- a/src/aig/gia/giaSim2.c
+++ b/src/aig/gia/giaSim2.c
@@ -639,9 +639,9 @@ int Gia_ManSimSimulateEquiv( Gia_Man_t * pAig, Gia_ParSim_t * pPars )
{
Gia_Sim2_t * p;
Gia_Obj_t * pObj;
- clock_t clkTotal = clock();
+ abctime clkTotal = Abc_Clock();
int i, RetValue = 0, iOut, iPat;
- clock_t nTimeToStop = pPars->TimeLimit ? pPars->TimeLimit * CLOCKS_PER_SEC + clock(): 0;
+ abctime nTimeToStop = pPars->TimeLimit ? pPars->TimeLimit * CLOCKS_PER_SEC + Abc_Clock(): 0;
assert( pAig->pReprs && pAig->pNexts );
ABC_FREE( pAig->pCexSeq );
p = Gia_Sim2Create( pAig, pPars );
@@ -656,7 +656,7 @@ int Gia_ManSimSimulateEquiv( Gia_Man_t * pAig, Gia_ParSim_t * pPars )
Abc_Print( 1, "Frame %4d out of %4d and timeout %3d sec. ", i+1, pPars->nIters, pPars->TimeLimit );
if ( pAig->pReprs && pAig->pNexts )
Abc_Print( 1, "Lits = %4d. ", Gia_ManEquivCountLitsAll(pAig) );
- Abc_Print( 1, "Time = %7.2f sec\r", (1.0*clock()-clkTotal)/CLOCKS_PER_SEC );
+ Abc_Print( 1, "Time = %7.2f sec\r", (1.0*Abc_Clock()-clkTotal)/CLOCKS_PER_SEC );
}
if ( pPars->fCheckMiter && Gia_Sim2CheckPos( p, &iOut, &iPat ) )
{
@@ -682,7 +682,7 @@ int Gia_ManSimSimulateEquiv( Gia_Man_t * pAig, Gia_ParSim_t * pPars )
}
if ( pAig->pReprs && pAig->pNexts )
Gia_Sim2InfoRefineEquivs( p );
- if ( clock() > nTimeToStop )
+ if ( Abc_Clock() > nTimeToStop )
{
i++;
break;
@@ -693,7 +693,7 @@ int Gia_ManSimSimulateEquiv( Gia_Man_t * pAig, Gia_ParSim_t * pPars )
Gia_Sim2Delete( p );
if ( pAig->pCexSeq == NULL )
Abc_Print( 1, "No bug detected after simulating %d frames with %d words. ", i, pPars->nWords );
- Abc_PrintTime( 1, "Time", clock() - clkTotal );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clkTotal );
return RetValue;
}
diff --git a/src/aig/gia/giaSort.c b/src/aig/gia/giaSort.c
index 5183c441..7586be65 100644
--- a/src/aig/gia/giaSort.c
+++ b/src/aig/gia/giaSort.c
@@ -160,27 +160,27 @@ void Gia_SortTest()
{
int nSize = 100000000;
int * pArray;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
printf( "Sorting %d integers\n", nSize );
pArray = Gia_SortGetTest( nSize );
-clk = clock();
+clk = Abc_Clock();
qsort( pArray, nSize, 4, (int (*)(const void *, const void *)) num_cmp1 );
-ABC_PRT( "qsort ", clock() - clk );
+ABC_PRT( "qsort ", Abc_Clock() - clk );
Gia_SortVerifySorted( pArray, nSize );
ABC_FREE( pArray );
pArray = Gia_SortGetTest( nSize );
-clk = clock();
+clk = Abc_Clock();
minisat_sort( pArray, nSize, (int (*)(const void *, const void *)) num_cmp2 );
-ABC_PRT( "minisat", clock() - clk );
+ABC_PRT( "minisat", Abc_Clock() - clk );
Gia_SortVerifySorted( pArray, nSize );
ABC_FREE( pArray );
pArray = Gia_SortGetTest( nSize );
-clk = clock();
+clk = Abc_Clock();
minisat_sort2( pArray, nSize );
-ABC_PRT( "minisat with inlined comparison", clock() - clk );
+ABC_PRT( "minisat with inlined comparison", Abc_Clock() - clk );
Gia_SortVerifySorted( pArray, nSize );
ABC_FREE( pArray );
}
diff --git a/src/aig/gia/giaSweeper.c b/src/aig/gia/giaSweeper.c
index 5ff05a37..f1295990 100644
--- a/src/aig/gia/giaSweeper.c
+++ b/src/aig/gia/giaSweeper.c
@@ -83,13 +83,13 @@ struct Swp_Man_t_
int nSatCallsUnsat;
int nSatCallsUndec;
int nSatProofs;
- clock_t timeStart;
- clock_t timeTotal;
- clock_t timeCnf;
- clock_t timeSat;
- clock_t timeSatSat;
- clock_t timeSatUnsat;
- clock_t timeSatUndec;
+ abctime timeStart;
+ abctime timeTotal;
+ abctime timeCnf;
+ abctime timeSat;
+ abctime timeSatSat;
+ abctime timeSatUnsat;
+ abctime timeSatUndec;
};
static inline int Swp_ManObj2Lit( Swp_Man_t * p, int Id ) { return Vec_IntGetEntry( p->vId2Lit, Id ); }
@@ -134,7 +134,7 @@ static inline Swp_Man_t * Swp_ManStart( Gia_Man_t * pGia )
Swp_ManSetObj2Lit( p, 0, (Lit = Abc_Var2Lit(p->nSatVars++, 0)) );
Lit = Abc_LitNot(Lit);
sat_solver_addclause( p->pSat, &Lit, &Lit + 1 );
- p->timeStart = clock();
+ p->timeStart = Abc_Clock();
return p;
}
static inline void Swp_ManStop( Gia_Man_t * pGia )
@@ -205,7 +205,7 @@ void Gia_SweeperPrintStats( Gia_Man_t * pGia )
ABC_PRMP( "SAT solver ", nMemSat, nMemTot );
ABC_PRMP( "TOTAL ", nMemTot, nMemTot );
printf( "Runtime usage:\n" );
- p->timeTotal = clock() - p->timeStart;
+ p->timeTotal = Abc_Clock() - p->timeStart;
ABC_PRTP( "CNF construction", p->timeCnf, p->timeTotal );
ABC_PRTP( "SAT solving ", p->timeSat, p->timeTotal );
ABC_PRTP( " Sat ", p->timeSatSat, p->timeTotal );
@@ -492,7 +492,7 @@ Gia_Man_t * Gia_SweeperCleanup( Gia_Man_t * p, char * pCommLime )
Swp_ManSetObj2Lit( pSwp, 0, (iLit = Abc_Var2Lit(pSwp->nSatVars++, 0)) );
iLit = Abc_LitNot(iLit);
sat_solver_addclause( pSwp->pSat, &iLit, &iLit + 1 );
- pSwp->timeStart = clock();
+ pSwp->timeStart = Abc_Clock();
// return the result
pNew->pData = p->pData; p->pData = NULL;
Gia_ManStop( p );
@@ -673,11 +673,11 @@ static void Gia_ManCnfNodeAddToSolver( Swp_Man_t * p, int NodeId )
{
Gia_Obj_t * pNode;
int i, k, Id, Lit;
- clock_t clk;
+ abctime clk;
// quit if CNF is ready
if ( NodeId == 0 || Swp_ManObj2Lit(p, NodeId) )
return;
-clk = clock();
+clk = Abc_Clock();
// start the frontier
Vec_IntClear( p->vFront );
Gia_ManObjAddToFrontier( p, NodeId, p->vFront );
@@ -706,7 +706,7 @@ clk = clock();
}
assert( Vec_IntSize(p->vFanins) > 1 );
}
-p->timeCnf += clock() - clk;
+p->timeCnf += Abc_Clock() - clk;
}
@@ -756,7 +756,7 @@ int Gia_SweeperCheckEquiv( Gia_Man_t * pGia, int Probe1, int Probe2 )
{
Swp_Man_t * p = (Swp_Man_t *)pGia->pData;
int iLitOld, iLitNew, iLitAig, pLitsSat[2], RetValue, RetValue1, ProbeId, i;
- clock_t clk;
+ abctime clk;
p->nSatCalls++;
assert( p->pSat != NULL );
p->vCexUser = NULL;
@@ -802,32 +802,32 @@ int Gia_SweeperCheckEquiv( Gia_Man_t * pGia, int Probe1, int Probe2 )
// set runtime limit for this call
if ( p->nTimeOut )
- sat_solver_set_runtime_limit( p->pSat, p->nTimeOut * CLOCKS_PER_SEC + clock() );
+ sat_solver_set_runtime_limit( p->pSat, p->nTimeOut * CLOCKS_PER_SEC + Abc_Clock() );
-clk = clock();
+clk = Abc_Clock();
RetValue1 = sat_solver_solve( p->pSat, Vec_IntArray(p->vCondAssump), Vec_IntArray(p->vCondAssump) + Vec_IntSize(p->vCondAssump),
(ABC_INT64_T)p->nConfMax, (ABC_INT64_T)0, (ABC_INT64_T)0, (ABC_INT64_T)0 );
Vec_IntShrink( p->vCondAssump, Vec_IntSize(p->vCondAssump) - 2 );
-p->timeSat += clock() - clk;
+p->timeSat += Abc_Clock() - clk;
if ( RetValue1 == l_False )
{
pLitsSat[0] = Abc_LitNot( pLitsSat[0] );
RetValue = sat_solver_addclause( p->pSat, pLitsSat, pLitsSat + 2 );
assert( RetValue );
pLitsSat[0] = Abc_LitNot( pLitsSat[0] );
-p->timeSatUnsat += clock() - clk;
+p->timeSatUnsat += Abc_Clock() - clk;
p->nSatCallsUnsat++;
}
else if ( RetValue1 == l_True )
{
p->vCexUser = Gia_ManGetCex( p->pGia, p->vId2Lit, p->pSat, p->vCexSwp );
-p->timeSatSat += clock() - clk;
+p->timeSatSat += Abc_Clock() - clk;
p->nSatCallsSat++;
return 0;
}
else // if ( RetValue1 == l_Undef )
{
-p->timeSatUndec += clock() - clk;
+p->timeSatUndec += Abc_Clock() - clk;
p->nSatCallsUndec++;
return -1;
}
@@ -844,30 +844,30 @@ p->timeSatUndec += clock() - clk;
Vec_IntPush( p->vCondAssump, Abc_LitNot(pLitsSat[0]) );
Vec_IntPush( p->vCondAssump, pLitsSat[1] );
-clk = clock();
+clk = Abc_Clock();
RetValue1 = sat_solver_solve( p->pSat, Vec_IntArray(p->vCondAssump), Vec_IntArray(p->vCondAssump) + Vec_IntSize(p->vCondAssump),
(ABC_INT64_T)p->nConfMax, (ABC_INT64_T)0, (ABC_INT64_T)0, (ABC_INT64_T)0 );
Vec_IntShrink( p->vCondAssump, Vec_IntSize(p->vCondAssump) - 2 );
-p->timeSat += clock() - clk;
+p->timeSat += Abc_Clock() - clk;
if ( RetValue1 == l_False )
{
pLitsSat[1] = Abc_LitNot( pLitsSat[1] );
RetValue = sat_solver_addclause( p->pSat, pLitsSat, pLitsSat + 2 );
assert( RetValue );
pLitsSat[1] = Abc_LitNot( pLitsSat[1] );
-p->timeSatUnsat += clock() - clk;
+p->timeSatUnsat += Abc_Clock() - clk;
p->nSatCallsUnsat++;
}
else if ( RetValue1 == l_True )
{
p->vCexUser = Gia_ManGetCex( p->pGia, p->vId2Lit, p->pSat, p->vCexSwp );
-p->timeSatSat += clock() - clk;
+p->timeSatSat += Abc_Clock() - clk;
p->nSatCallsSat++;
return 0;
}
else // if ( RetValue1 == l_Undef )
{
-p->timeSatUndec += clock() - clk;
+p->timeSatUndec += Abc_Clock() - clk;
p->nSatCallsUndec++;
return -1;
}
@@ -891,7 +891,7 @@ int Gia_SweeperCondCheckUnsat( Gia_Man_t * pGia )
{
Swp_Man_t * p = (Swp_Man_t *)pGia->pData;
int RetValue, ProbeId, iLitAig, i;
- clock_t clk;
+ abctime clk;
assert( p->pSat != NULL );
p->nSatCalls++;
p->vCexUser = NULL;
@@ -908,16 +908,16 @@ int Gia_SweeperCondCheckUnsat( Gia_Man_t * pGia )
// set runtime limit for this call
if ( p->nTimeOut )
- sat_solver_set_runtime_limit( p->pSat, p->nTimeOut * CLOCKS_PER_SEC + clock() );
+ sat_solver_set_runtime_limit( p->pSat, p->nTimeOut * CLOCKS_PER_SEC + Abc_Clock() );
-clk = clock();
+clk = Abc_Clock();
RetValue = sat_solver_solve( p->pSat, Vec_IntArray(p->vCondAssump), Vec_IntArray(p->vCondAssump) + Vec_IntSize(p->vCondAssump),
(ABC_INT64_T)p->nConfMax, (ABC_INT64_T)0, (ABC_INT64_T)0, (ABC_INT64_T)0 );
-p->timeSat += clock() - clk;
+p->timeSat += Abc_Clock() - clk;
if ( RetValue == l_False )
{
assert( Vec_IntSize(p->vCondProbes) > 0 );
-p->timeSatUnsat += clock() - clk;
+p->timeSatUnsat += Abc_Clock() - clk;
p->nSatCallsUnsat++;
p->nSatProofs++;
return 1;
@@ -925,13 +925,13 @@ p->timeSatUnsat += clock() - clk;
else if ( RetValue == l_True )
{
p->vCexUser = Gia_ManGetCex( p->pGia, p->vId2Lit, p->pSat, p->vCexSwp );
-p->timeSatSat += clock() - clk;
+p->timeSatSat += Abc_Clock() - clk;
p->nSatCallsSat++;
return 0;
}
else // if ( RetValue1 == l_Undef )
{
-p->timeSatUndec += clock() - clk;
+p->timeSatUndec += Abc_Clock() - clk;
p->nSatCallsUndec++;
return -1;
}
diff --git a/src/aig/gia/giaSwitch.c b/src/aig/gia/giaSwitch.c
index 8bf027a4..d5307461 100644
--- a/src/aig/gia/giaSwitch.c
+++ b/src/aig/gia/giaSwitch.c
@@ -560,11 +560,11 @@ Vec_Int_t * Gia_ManSwiSimulate( Gia_Man_t * pAig, Gia_ParSwi_t * pPars )
Vec_Int_t * vSwitching;
float * pSwitching;
int i;
- clock_t clk, clkTotal = clock();
+ abctime clk, clkTotal = Abc_Clock();
if ( pPars->fProbOne && pPars->fProbTrans )
printf( "Conflict of options: Can either compute probability of 1, or probability of switching by observing transitions.\n" );
// create manager
- clk = clock();
+ clk = Abc_Clock();
p = Gia_ManSwiCreate( pAig, pPars );
if ( pPars->fVerbose )
{
@@ -574,7 +574,7 @@ Vec_Int_t * Gia_ManSwiSimulate( Gia_Man_t * pAig, Gia_ParSwi_t * pPars )
12.0*Gia_ManObjNum(p->pAig)/(1<<20),
4.0*p->nWords*p->pAig->nFront/(1<<20),
4.0*p->nWords*(Gia_ManCiNum(p->pAig) + Gia_ManCoNum(p->pAig))/(1<<20) );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
}
// perform simulation
Gia_ManRandom( 1 );
@@ -592,7 +592,7 @@ Vec_Int_t * Gia_ManSwiSimulate( Gia_Man_t * pAig, Gia_ParSwi_t * pPars )
if ( pPars->fVerbose )
{
printf( "Simulated %d frames with %d words. ", pPars->nIters, pPars->nWords );
- ABC_PRT( "Simulation time", clock() - clkTotal );
+ ABC_PRT( "Simulation time", Abc_Clock() - clkTotal );
}
// derive the result
vSwitching = Vec_IntStart( Gia_ManObjNum(pAig) );
diff --git a/src/aig/gia/giaTest.c b/src/aig/gia/giaTest.c
index c41e5013..d662382d 100644
--- a/src/aig/gia/giaTest.c
+++ b/src/aig/gia/giaTest.c
@@ -379,7 +379,7 @@ void Mig_ManSetRefs( Mig_Man_t * p )
{
Mig_Obj_t * pObj;
int i, iFanin;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
Vec_IntFill( &p->vRefs, Mig_ManObjNum(p), 0 );
// increment references
Mig_ManForEachObj( p, pObj )
@@ -389,7 +389,7 @@ void Mig_ManSetRefs( Mig_Man_t * p )
// check that internal nodes have fanins
Mig_ManForEachNode( p, pObj )
assert( Vec_IntEntry(&p->vRefs, Mig_ObjId(pObj)) > 0 );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
}
/**Function*************************************************************
@@ -443,12 +443,12 @@ int Mig_ManSuppSizeTest( Mig_Man_t * p )
{
Mig_Obj_t * pObj;
int Counter = 0;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
Mig_ManForEachObj( p, pObj )
if ( Mig_ObjIsNode(pObj) )
Counter += (Mig_ManSuppSizeOne(pObj) <= 16);
printf( "Nodes with small support %d (out of %d)\n", Counter, Mig_ManNodeNum(p) );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
return Counter;
}
@@ -1343,13 +1343,13 @@ finish:
void Mpm_ManPerform( Mpm_Man_t * p )
{
Mig_Obj_t * pObj;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
int i;
Mig_ManForEachCi( p->pMig, pObj, i )
Mpm_ManObj(p, pObj)->iCutList = Mpm_CutCreateUnit( p, pObj );
Mig_ManForEachNode( p->pMig, pObj )
Mpm_ManDeriveCuts( p, pObj );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
}
void Mpm_ManPerformTest( Mig_Man_t * pMig )
{
diff --git a/src/aig/gia/giaTruth.c b/src/aig/gia/giaTruth.c
index 3f09d480..26a380d7 100644
--- a/src/aig/gia/giaTruth.c
+++ b/src/aig/gia/giaTruth.c
@@ -223,14 +223,14 @@ void Gia_ObjComputeTruthTableTest( Gia_Man_t * p )
{
Gia_Obj_t * pObj;
unsigned * pTruth;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
int i;
Gia_ManForEachPo( p, pObj, i )
{
pTruth = (unsigned *)Gia_ObjComputeTruthTable( p, pObj );
// Extra_PrintHex( stdout, pTruth, Gia_ManPiNum(p) ); printf( "\n" );
}
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
}
diff --git a/src/aig/gia/giaTsim.c b/src/aig/gia/giaTsim.c
index 4a3d5342..7f93c542 100644
--- a/src/aig/gia/giaTsim.c
+++ b/src/aig/gia/giaTsim.c
@@ -670,10 +670,10 @@ Gia_ManTer_t * Gia_ManTerSimulate( Gia_Man_t * pAig, int fVerbose )
Gia_ManTer_t * p;
unsigned * pState, * pPrev, * pLoop;
int i, Counter;
- clock_t clk, clkTotal = clock();
+ abctime clk, clkTotal = Abc_Clock();
assert( Gia_ManRegNum(pAig) > 0 );
// create manager
- clk = clock();
+ clk = Abc_Clock();
p = Gia_ManTerCreate( pAig );
if ( 0 )
{
@@ -683,7 +683,7 @@ Gia_ManTer_t * Gia_ManTerSimulate( Gia_Man_t * pAig, int fVerbose )
12.0*Gia_ManObjNum(p->pAig)/(1<<20),
4.0*Abc_BitWordNum(2 * p->pAig->nFront)/(1<<20),
4.0*Abc_BitWordNum(2 * (Gia_ManCiNum(pAig) + Gia_ManCoNum(pAig)))/(1<<20) );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
}
// perform simulation
Gia_ManTerSimInfoInit( p );
@@ -718,7 +718,7 @@ Gia_ManTer_t * Gia_ManTerSimulate( Gia_Man_t * pAig, int fVerbose )
if ( fVerbose )
{
printf( "Ternary simulation saturated after %d iterations. ", i+1 );
- ABC_PRT( "Time", clock() - clkTotal );
+ ABC_PRT( "Time", Abc_Clock() - clkTotal );
}
return p;
}
diff --git a/src/aig/gia/giaUtil.c b/src/aig/gia/giaUtil.c
index 10bfa154..bec23f8c 100644
--- a/src/aig/gia/giaUtil.c
+++ b/src/aig/gia/giaUtil.c
@@ -1255,7 +1255,7 @@ unsigned * Gia_ManComputePoTruthTables( Gia_Man_t * p, int nBytesMax )
int nTotalNodes = 0, nRounds = 0;
Vec_Int_t * vObjs;
Gia_Obj_t * pObj;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
int i;
printf( "Var = %d. Words = %d. Truths = %d.\n", nVars, nTruthWords, nTruths );
vObjs = Vec_IntAlloc( nTruths );
@@ -1277,7 +1277,7 @@ unsigned * Gia_ManComputePoTruthTables( Gia_Man_t * p, int nBytesMax )
Vec_IntFree( vObjs );
printf( "Rounds = %d. Objects = %d. Total = %d. ", nRounds, Gia_ManObjNum(p), nTotalNodes );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
return NULL;
}
@@ -1427,8 +1427,8 @@ Vec_Int_t * Gia_ManMultiProve( Gia_Man_t * pInit, char * pCommLine, int nGroupSi
Vec_Int_t * vOutMap;
Vec_Ptr_t * vCexes;
int i, k, nGroupCur, nGroups;
- clock_t clk, timeComm = 0;
- clock_t timeStart = clock();
+ abctime clk, timeComm = 0;
+ abctime timeStart = Abc_Clock();
// pre-conditions
assert( nGroupSize > 0 );
assert( pCommLine != NULL );
@@ -1448,9 +1448,9 @@ Vec_Int_t * Gia_ManMultiProve( Gia_Man_t * pInit, char * pCommLine, int nGroupSi
// set the current GIA
Abc_FrameUpdateGia( pAbc, pGroup );
// solve the group
- clk = clock();
+ clk = Abc_Clock();
Cmd_CommandExecute( pAbc, pCommLine );
- timeComm += clock() - clk;
+ timeComm += Abc_Clock() - clk;
// get the solution status
if ( nGroupSize == 1 )
{
@@ -1485,7 +1485,7 @@ Vec_Int_t * Gia_ManMultiProve( Gia_Man_t * pInit, char * pCommLine, int nGroupSi
Abc_Print( 1, "UNDEC = %6d. ", Vec_IntCountEntry(vOutMap, -1) );
Abc_Print( 1, "\n" );
Abc_PrintTime( 1, "Command time", timeComm );
- Abc_PrintTime( 1, "Total time ", clock() - timeStart );
+ Abc_PrintTime( 1, "Total time ", Abc_Clock() - timeStart );
// cleanup
Vec_IntFree( vOuts );
Gia_ManStop( p );