Fixing time primtouts throughout the code.

This commit is contained in:
Alan Mishchenko 2012-07-07 17:46:54 -07:00
parent 16d96fcf53
commit 3aab724573
331 changed files with 1277 additions and 1091 deletions

View File

@ -30,7 +30,6 @@
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <time.h>
#include "src/misc/vec/vec.h"
#include "src/misc/util/utilCex.h"
@ -165,8 +164,8 @@ struct Aig_Man_t_
Vec_Int_t * vCiNumsOrig; // original CI names
int nComplEdges; // complemented edges
// timing statistics
int time1;
int time2;
clock_t time1;
clock_t time2;
};
// cut computation

View File

@ -632,7 +632,8 @@ Aig_ManCut_t * Aig_ComputeCuts( Aig_Man_t * pAig, int nCutsMax, int nLeafMax, in
{
Aig_ManCut_t * p;
Aig_Obj_t * pObj;
int i, clk = clock();
int i;
clock_t clk = clock();
assert( pAig->pManCuts == NULL );
// start the manager
p = Aig_ManCutStart( pAig, nCutsMax, nLeafMax, fTruth, fVerbose );

View File

@ -767,7 +767,8 @@ int Aig_SupportSize( Aig_Man_t * p, Aig_Obj_t * pObj )
int Aig_SupportSizeTest( Aig_Man_t * p )
{
Aig_Obj_t * pObj;
int i, Counter = 0, clk = clock();
int i, Counter = 0;
clock_t clk = clock();
Aig_ManForEachObj( p, pObj, i )
if ( Aig_ObjIsNode(pObj) )
Counter += (Aig_SupportSize(p, pObj) <= 16);

View File

@ -623,7 +623,8 @@ Aig_Sto_t * Aig_ManComputeDomsFlops( Aig_Man_t * pAig, int Limit )
Aig_Sto_t * pSto;
Vec_Ptr_t * vNodes;
Aig_Obj_t * pObj;
int i, clk = clock();
int i;
clock_t clk = clock();
pSto = Aig_ManDomStart( pAig, Limit );
// initialize flop inputs
Saig_ManForEachLi( pAig, pObj, i )
@ -663,7 +664,8 @@ Aig_Sto_t * Aig_ManComputeDomsPis( Aig_Man_t * pAig, int Limit )
Aig_Sto_t * pSto;
Vec_Ptr_t * vNodes;
Aig_Obj_t * pObj;
int i, clk = clock();
int i;
clock_t clk = clock();
pSto = Aig_ManDomStart( pAig, Limit );
// initialize flop inputs
Aig_ManForEachCo( pAig, pObj, i )
@ -703,7 +705,8 @@ Aig_Sto_t * Aig_ManComputeDomsNodes( Aig_Man_t * pAig, int Limit )
Aig_Sto_t * pSto;
Vec_Ptr_t * vNodes;
Aig_Obj_t * pObj;
int i, clk = clock();
int i;
clock_t clk = clock();
pSto = Aig_ManDomStart( pAig, Limit );
// initialize flop inputs
Aig_ManForEachCo( pAig, pObj, i )

View File

@ -29,9 +29,9 @@ ABC_NAMESPACE_IMPL_START
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
extern int timeCnf;
extern int timeSat;
extern int timeInt;
extern clock_t timeCnf;
extern clock_t timeSat;
extern clock_t timeInt;
////////////////////////////////////////////////////////////////////////
/// FUNCTION DEFINITIONS ///
@ -156,7 +156,7 @@ Aig_Man_t * Aig_ManInter( Aig_Man_t * pManOn, Aig_Man_t * pManOff, int fRelation
Vec_Int_t * vVarsAB;
Aig_Obj_t * pObj, * pObj2;
int Lits[3], status, i;
int clk;
clock_t clk;
int iLast = -1; // Suppress "might be used uninitialized"
assert( Aig_ManCiNum(pManOn) == Aig_ManCiNum(pManOff) );

View File

@ -253,7 +253,9 @@ void Aig_ManJustExperiment( Aig_Man_t * pAig )
Aig_ManPack_t * pPack;
Vec_Int_t * vSuppLits, * vNodes;
Aig_Obj_t * pObj;
int i, clk = clock(), Count0 = 0, Count0f = 0, Count1 = 0, Count1f = 0;
int i;
clock_t clk = clock();
int Count0 = 0, Count0f = 0, Count1 = 0, Count1f = 0;
int nTotalLits = 0;
vSuppLits = Vec_IntAlloc( 100 );
pPack = Aig_ManPackStart( pAig );

View File

@ -688,7 +688,8 @@ Vec_Ptr_t * Aig_ManPartitionSmart( Aig_Man_t * p, int nSuppSizeLimit, int fVerbo
Vec_Ptr_t * vPartSuppsBit;
Vec_Ptr_t * vSupports, * vPartsAll, * vPartsAll2, * vPartSuppsAll;//, * vPartPtr;
Vec_Int_t * vOne, * vPart, * vPartSupp, * vTemp;
int i, iPart, iOut, clk;
int i, iPart, iOut;
clock_t clk;
// compute the supports for all outputs
clk = clock();
@ -812,7 +813,8 @@ Vec_Ptr_t * Aig_ManPartitionSmartRegisters( Aig_Man_t * pAig, int nSuppSizeLimit
Vec_Ptr_t * vPartSuppsBit;
Vec_Ptr_t * vSupports, * vPartsAll, * vPartsAll2, * vPartSuppsAll;
Vec_Int_t * vOne, * vPart, * vPartSupp, * vTemp;
int i, iPart, iOut, clk;
int i, iPart, iOut;
clock_t clk;
// add output number to each
clk = clock();

View File

@ -497,7 +497,8 @@ int Aig_ManPartitionedSat( Aig_Man_t * p, int nAlgo, int nPartSize,
Aig_Man_t * pAig, * pTemp;
Vec_Int_t * vNode2Part, * vNode2Var;
int nConfRemaining = nConfTotal, nNodes = 0;
int i, clk, status, RetValue = -1;
int i, status, RetValue = -1;
clock_t clk;
// perform partitioning according to the selected algorithm
clk = clock();

View File

@ -129,7 +129,7 @@ void Aig_ManInterTest( Aig_Man_t * pMan, int fVerbose )
Cnf_Dat_t * pCnf;
Aig_Obj_t * pObj;
int Lit, Cid, Var, status, i;
int clk = clock();
clock_t clk = clock();
assert( Aig_ManRegNum(pMan) == 0 );
assert( Aig_ManCoNum(pMan) == 1 );
@ -251,7 +251,7 @@ Aig_Man_t * Aig_ManInterRepar( Aig_Man_t * pMan, int fVerbose )
int nOuts = Aig_ManCoNum(pMan);
int ShiftP[2], ShiftCnf[2], ShiftOr[2], ShiftAssume;
int Cid, Lit, status, i, k, c;
int clk = clock();
clock_t clk = clock();
assert( Aig_ManRegNum(pMan) == 0 );
// derive CNFs

View File

@ -839,7 +839,7 @@ Aig_Man_t * Rtm_ManRetime( Aig_Man_t * p, int fForward, int nStepsMax, int fVerb
Rtm_Obj_t * pObj, * pNext;
Aig_Obj_t * pObjAig;
int i, k, nAutos, Degree, DegreeMax = 0;
int clk;
clock_t clk;
// create the retiming manager
clk = clock();

View File

@ -258,7 +258,8 @@ Aig_Man_t * Aig_ManSplit( Aig_Man_t * p, int nVars, int fVerbose )
DdNode * bFunc;
DdManager * dd;
Vec_Ptr_t * vSupp, * vSubs, * vCofs;
int i, clk = clock();
int i;
clock_t clk = clock();
if ( Saig_ManPoNum(p) != 1 )
{
printf( "Currently works only for one primary output.\n" );

View File

@ -70,7 +70,8 @@ void Aig_TableResize( Aig_Man_t * p )
{
Aig_Obj_t * pEntry, * pNext;
Aig_Obj_t ** pTableOld, ** ppPlace;
int nTableSizeOld, Counter, i, clk;
int nTableSizeOld, Counter, i;
clock_t clk;
assert( p->pTable != NULL );
clk = clock();
// save the old table

View File

@ -30,7 +30,6 @@
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <time.h>
#include "src/misc/vec/vec.h"
#include "src/misc/util/utilCex.h"

View File

@ -800,13 +800,10 @@ Vec_Int_t * Gla_ManRefinement( Gla_Man_t * p )
// select objects
vSelect = Vec_IntAlloc( 100 );
// Vec_IntFill( p->vPrioSels, Vec_IntSize(vPPis)+1, 0 );
Vec_IntFill( p->vObjCounts, p->pPars->iFrame+1, 0 );
Gla_ManRefSelect_rec( p, Gia_ObjFanin0(Gia_ManPo(p->pGia, 0)), p->pPars->iFrame, vSelect, Sign );
Vec_IntUniqify( vSelect );
// printf( "\nSelected %d.\n", Vec_IntSize(vSelect) );
/*
for ( f = 0; f < p->pPars->iFrame; f++ )
printf( "%2d", Vec_IntEntry(p->vObjCounts, f) );
@ -976,7 +973,6 @@ Gla_Man_t * Gla_ManStart( Gia_Man_t * pGia0, Gia_ParVta_t * pPars )
p->pGia = Gia_ManDupMapped( pGia0, p->pCnf->vMapping );
if ( pPars->fPropFanout )
Gia_ManStaticFanoutStart( p->pGia );
//printf( "Old GIA = %d. New GIA = %d.\n", Gia_ManObjNum(pGia0), Gia_ManObjNum(p->pGia) );
// derive new gate map
assert( pGia0->vGateClasses != 0 );
@ -1797,7 +1793,7 @@ int Gia_GlaPerform( Gia_Man_t * pAig, Gia_ParVta_t * pPars, int fStartVta )
p->timeInit = clock() - clk;
// set runtime limit
if ( p->pPars->nTimeOut )
sat_solver2_set_runtime_limit( p->pSat, time(NULL) + p->pPars->nTimeOut - 1 );
sat_solver2_set_runtime_limit( p->pSat, p->pPars->nTimeOut * CLOCKS_PER_SEC + clock() );
// perform initial abstraction
if ( p->pPars->fVerbose )
{
@ -1831,9 +1827,9 @@ int Gia_GlaPerform( Gia_Man_t * pAig, Gia_ParVta_t * pPars, int fStartVta )
goto finish;
}
// check timeout
if ( p->pSat->nRuntimeLimit && time(NULL) > p->pSat->nRuntimeLimit )
if ( p->pSat->nRuntimeLimit && clock() > p->pSat->nRuntimeLimit )
{
Gla_ManRollBack( p ); // 1155046
Gla_ManRollBack( p );
goto finish;
}
if ( vCore != NULL )
@ -1960,7 +1956,7 @@ finish:
pAig->vGateClasses = Gla_ManTranslate( p );
if ( Status == -1 )
{
if ( p->pPars->nTimeOut && time(NULL) >= p->pSat->nRuntimeLimit )
if ( p->pPars->nTimeOut && clock() >= p->pSat->nRuntimeLimit )
Abc_Print( 1, "SAT solver ran out of time at %d sec in frame %d. ", p->pPars->nTimeOut, f );
else if ( pPars->nConfLimit && sat_solver2_nconflicts(p->pSat) >= pPars->nConfLimit )
Abc_Print( 1, "SAT solver ran out of resources at %d conflicts in frame %d. ", pPars->nConfLimit, f );

View File

@ -1564,7 +1564,7 @@ int Gia_VtaPerformInt( Gia_Man_t * pAig, Gia_ParVta_t * pPars )
p = Vga_ManStart( pAig, pPars );
// set runtime limit
if ( p->pPars->nTimeOut )
sat_solver2_set_runtime_limit( p->pSat, time(NULL) + p->pPars->nTimeOut - 1 );
sat_solver2_set_runtime_limit( p->pSat, p->pPars->nTimeOut * CLOCKS_PER_SEC + clock() );
// perform initial abstraction
if ( p->pPars->fVerbose )
{
@ -1609,7 +1609,7 @@ int Gia_VtaPerformInt( Gia_Man_t * pAig, Gia_ParVta_t * pPars )
goto finish;
}
// check timeout
if ( p->pSat->nRuntimeLimit && time(NULL) > p->pSat->nRuntimeLimit )
if ( p->pSat->nRuntimeLimit && clock() > p->pSat->nRuntimeLimit )
{
Vga_ManRollBack( p, nObjOld );
goto finish;
@ -1716,7 +1716,7 @@ finish:
pAig->vObjClasses = Gia_VtaFramesToAbs( (Vec_Vec_t *)p->vCores );
if ( Status == -1 )
{
if ( p->pPars->nTimeOut && time(NULL) >= p->pSat->nRuntimeLimit )
if ( p->pPars->nTimeOut && clock() >= p->pSat->nRuntimeLimit )
Abc_Print( 1, "SAT solver ran out of time at %d sec in frame %d. ", p->pPars->nTimeOut, f );
else if ( pPars->nConfLimit && sat_solver2_nconflicts(p->pSat) >= pPars->nConfLimit )
Abc_Print( 1, "SAT solver ran out of resources at %d conflicts in frame %d. ", pPars->nConfLimit, f );

View File

@ -219,8 +219,9 @@ int Gia_ManCofOneDerive( Ccf_Man_t * p, int LitProp )
***********************************************************************/
int Gia_ManCofGetReachable( Ccf_Man_t * p, int Lit )
{
int ObjPrev = 0, ConfPrev = 0, clk;
int ObjPrev = 0, ConfPrev = 0;
int Count = 0, LitOut, RetValue;
clock_t 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 )
@ -268,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;
int nTimeToStop = time(NULL) + nTimeMax;
int clk = clock();
clock_t nTimeToStop = clock() + nTimeMax * CLOCKS_PER_SEC;
clock_t clk = clock();
assert( Gia_ManPoNum(pGia) == 1 );
// create reachability manager
@ -309,7 +310,7 @@ Gia_Man_t * Gia_ManCofTest( Gia_Man_t * pGia, int nFrameMax, int nConfMax, int n
}
// report the result
if ( nTimeToStop && time(NULL) > nTimeToStop )
if ( nTimeToStop && 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 );

View File

@ -81,10 +81,10 @@ struct Cbs_Man_t_
int nConfSat; // conflicts in sat problems
int nConfUndec; // conflicts in undec problems
// runtime stats
int timeSatUnsat; // unsat
int timeSatSat; // sat
int timeSatUndec; // undecided
int timeTotal; // total runtime
clock_t timeSatUnsat; // unsat
clock_t timeSatSat; // sat
clock_t timeSatUndec; // undecided
clock_t timeTotal; // total runtime
};
static inline int Cbs_VarIsAssigned( Gia_Obj_t * pVar ) { return pVar->fMark0; }
@ -1003,7 +1003,8 @@ Vec_Int_t * Cbs_ManSolveMiterNc( Gia_Man_t * pAig, int nConfs, Vec_Str_t ** pvSt
Vec_Int_t * vCex, * vVisit, * vCexStore;
Vec_Str_t * vStatus;
Gia_Obj_t * pRoot;
int i, status, clk, clkTotal = clock();
int i, status;
clock_t clk, clkTotal = clock();
assert( Gia_ManRegNum(pAig) == 0 );
// Gia_ManCollectTest( pAig );
// prepare AIG

View File

@ -73,10 +73,10 @@ struct Cbs0_Man_t_
int nConfSat; // conflicts in sat problems
int nConfUndec; // conflicts in undec problems
// runtime stats
int timeSatUnsat; // unsat
int timeSatSat; // sat
int timeSatUndec; // undecided
int timeTotal; // total runtime
clock_t timeSatUnsat; // unsat
clock_t timeSatSat; // sat
clock_t timeSatUndec; // undecided
clock_t timeTotal; // total runtime
};
static inline int Cbs0_VarIsAssigned( Gia_Obj_t * pVar ) { return pVar->fMark0; }
@ -712,7 +712,8 @@ Vec_Int_t * Cbs_ManSolveMiter( Gia_Man_t * pAig, int nConfs, Vec_Str_t ** pvStat
Vec_Int_t * vCex, * vVisit, * vCexStore;
Vec_Str_t * vStatus;
Gia_Obj_t * pRoot;
int i, status, clk, clkTotal = clock();
int i, status;
clock_t clk, clkTotal = clock();
assert( Gia_ManRegNum(pAig) == 0 );
// prepare AIG
Gia_ManCreateRefs( pAig );

View File

@ -108,10 +108,10 @@ struct Tas_Man_t_
int nConfSat; // conflicts in sat problems
int nConfUndec; // conflicts in undec problems
// runtime stats
int timeSatUnsat; // unsat
int timeSatSat; // sat
int timeSatUndec; // undecided
int timeTotal; // total runtime
clock_t timeSatUnsat; // unsat
clock_t timeSatSat; // sat
clock_t timeSatUndec; // undecided
clock_t timeTotal; // total runtime
};
static inline int Tas_VarIsAssigned( Gia_Obj_t * pVar ) { return pVar->fMark0; }
@ -1524,7 +1524,8 @@ Vec_Int_t * Tas_ManSolveMiterNc( Gia_Man_t * pAig, int nConfs, Vec_Str_t ** pvSt
Gia_Obj_t * pRoot;//, * pRootCopy;
// Gia_Man_t * pAigCopy = Gia_ManDup( pAig ), * pAigTemp;
int i, status, clk, clkTotal = clock();
int i, status;
clock_t clk, clkTotal = clock();
assert( Gia_ManRegNum(pAig) == 0 );
// Gia_ManCollectTest( pAig );
// prepare AIG
@ -1703,7 +1704,8 @@ void Tas_ManSolveMiterNc2( Gia_Man_t * pAig, int nConfs, Gia_Man_t * pAigOld, Ve
Vec_Int_t * vCex, * vVisit, * vCexStore;
Vec_Str_t * vStatus;
Gia_Obj_t * pRoot, * pOldRoot;
int i, status, clk, clkTotal = clock();
int i, status;
clock_t clk, clkTotal = clock();
int Tried = 0, Stored = 0, Step = Gia_ManCoNum(pAig) / nPatMax;
assert( Gia_ManRegNum(pAig) == 0 );
// Gia_ManCollectTest( pAig );

View File

@ -115,10 +115,10 @@ struct Tas_Man_t_
int nConfUndec; // conflicts in undec problems
int nConfTotal; // total conflicts
// runtime stats
int timeSatUnsat; // unsat
int timeSatSat; // sat
int timeSatUndec; // undecided
int timeTotal; // total runtime
clock_t timeSatUnsat; // unsat
clock_t timeSatSat; // sat
clock_t timeSatUndec; // undecided
clock_t timeTotal; // total runtime
};
static inline int Tas_VarIsAssigned( Tas_Var_t * pVar ) { return pVar->fAssign; }

View File

@ -672,7 +672,7 @@ void Cof_ManPrintFanio( Cof_Man_t * p )
void Gia_ManPrintFanio( Gia_Man_t * pGia, int nNodes )
{
Cof_Man_t * p;
int clk = clock();
clock_t clk = clock();
p = Cof_ManCreateLogicSimple( pGia );
p->nLevels = 1 + Gia_ManLevelNum( pGia );
p->pLevels = ABC_CALLOC( int, p->nLevels );

View File

@ -209,7 +209,8 @@ void Gia_ManCollectTest( Gia_Man_t * p )
{
Vec_Int_t * vNodes;
Gia_Obj_t * pObj;
int i, iNode, clk = clock();
int i, iNode;
clock_t clk = clock();
vNodes = Vec_IntAlloc( 100 );
Gia_ManIncrementTravId( p );
Gia_ManForEachCo( p, pObj, i )
@ -275,7 +276,8 @@ int Gia_ManSuppSizeOne( Gia_Man_t * p, Gia_Obj_t * pObj )
int Gia_ManSuppSizeTest( Gia_Man_t * p )
{
Gia_Obj_t * pObj;
int i, Counter = 0, clk = clock();
int i, Counter = 0;
clock_t clk = clock();
Gia_ManForEachObj( p, pObj, i )
if ( Gia_ObjIsAnd(pObj) )
Counter += (Gia_ManSuppSizeOne(p, pObj) <= 16);

View File

@ -838,7 +838,8 @@ int Emb_ManComputeDistance_old( Emb_Man_t * p, Emb_Obj_t * pPivot )
void Gia_ManTestDistanceInternal( Emb_Man_t * p )
{
int nAttempts = 20;
int i, iNode, Dist, clk;
int i, iNode, Dist;
clock_t clk;
Emb_Obj_t * pPivot, * pNext;
Gia_ManRandom( 1 );
Emb_ManResetTravId( p );
@ -903,7 +904,7 @@ void Gia_ManTestDistanceInternal( Emb_Man_t * p )
void Gia_ManTestDistance( Gia_Man_t * pGia )
{
Emb_Man_t * p;
int clk = clock();
clock_t clk = clock();
p = Emb_ManStart( pGia );
// Emb_ManPrintFanio( p );
Emb_ManPrintStats( p );
@ -1529,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;
int clk = clock();
clock_t clk = clock();
if ( p->pPlacement == NULL )
return;
pEdgeX = ABC_ALLOC( float, p->nObjs );
@ -1790,7 +1791,8 @@ void Emb_ManDumpGnuplot( Emb_Man_t * p, char * pName, int fDumpLarge, int fShowI
void Gia_ManSolveProblem( Gia_Man_t * pGia, Emb_Par_t * pPars )
{
Emb_Man_t * p;
int i, clk, clkSetup;
int i, clkSetup;
clock_t clk;
// Gia_ManTestDistance( pGia );
// transform AIG into internal data-structure

View File

@ -501,7 +501,8 @@ int Gia_ManCollectReachable( Gia_Man_t * pAig, int nStatesMax, int fMiter, int f
{
Gia_ManEra_t * p;
Gia_ObjEra_t * pState;
int Hash, clk = clock();
int Hash;
clock_t clk = clock();
int RetValue = 1;
assert( Gia_ManPiNum(pAig) <= 12 );
assert( Gia_ManRegNum(pAig) > 0 );

View File

@ -1536,7 +1536,8 @@ int Gia_ManAreDeriveNexts_rec( Gia_ManAre_t * p, Gia_PtrAre_t Sta )
Gia_Obj_t * pPivot;
Vec_Int_t * vLits, * vTfos;
Gia_Obj_t * pObj;
int i, clk;
int i;
clock_t clk;
if ( ++p->nRecCalls == MAX_CALL_NUM )
return 0;
if ( (pPivot = Gia_ManAreMostUsedPi(p)) == NULL )
@ -1611,7 +1612,8 @@ int Gia_ManAreDeriveNexts( Gia_ManAre_t * p, Gia_PtrAre_t Sta )
{
Gia_StaAre_t * pSta;
Gia_Obj_t * pObj;
int i, RetValue, clk = clock();
int i, RetValue;
clock_t clk = clock();
pSta = Gia_ManAreSta( p, Sta );
if ( Gia_StaIsUnused(pSta) )
return 0;
@ -1671,7 +1673,7 @@ int Gia_ManAreDeriveNexts( Gia_ManAre_t * p, Gia_PtrAre_t Sta )
SeeAlso []
***********************************************************************/
void Gia_ManArePrintReport( Gia_ManAre_t * p, int Time, int fFinal )
void Gia_ManArePrintReport( Gia_ManAre_t * p, clock_t 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),
@ -1703,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;
int clk = clock();
clock_t clk = clock();
int RetValue = 1;
if ( Gia_ManRegNum(pAig) > MAX_VARS_NUM )
{

View File

@ -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;
int clk = clock(), clk2, clk2Total = 0;
clock_t clk = clock(), clk2, clk2Total = 0;
// create starting one-dimensional placement
vCoOrder = Frc_ManCollectCos( p );
if ( fRandomize )
@ -1068,7 +1068,7 @@ void For_ManFileExperiment()
FILE * pFile;
int * pBuffer;
int i, Size, Exp = 25;
int clk = clock();
clock_t clk = clock();
int RetValue;
Size = (1 << Exp);

View File

@ -226,7 +226,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;
int clk = clock();
clock_t clk = clock();
p = ABC_CALLOC( Gia_ManUnr_t, 1 );
p->pAig = pAig;
@ -605,7 +605,7 @@ 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;
int clk = clock();
clock_t clk = clock();
pNew = Gia_ManUnroll( pAig, pPars );
if ( pPars->fVerbose )
Abc_PrintTime( 1, "Time", clock() - clk );

View File

@ -764,7 +764,7 @@ int Gia_ComputeEquivalencesLevel( Hcd_Man_t * p, Gia_Man_t * pGiaLev, Vec_Ptr_t
Gia_Obj_t * pRoot, * pMember, * pMemberPrev, * pRepr, * pTempRepr;
int i, k, nIter, iRoot, iRootNew, iMember, iMemberPrev, status, fOneFailed;//, iRepr;//, fTwoMember;
int nSaved = 0, nRecords = 0, nUndec = 0, nClassRefs = 0, nTsat = 0, nMiniSat = 0;
int clk, timeTsat = 0, timeMiniSat = 0, timeSim = 0, timeTotal = clock();
clock_t clk, timeTsat = 0, timeMiniSat = 0, timeSim = 0, timeTotal = clock();
if ( Vec_PtrSize(vOldRoots) == 0 )
return 0;
// start SAT solvers
@ -1031,7 +1031,8 @@ void Gia_ComputeEquivalences( Gia_Man_t * pGia, int nBTLimit, int fUseMiniSat, i
Hcd_Man_t * p;
Vec_Ptr_t * vRoots;
Gia_Man_t * pGiaLev;
int i, Lev, nLevels, nIters, clk;
int i, Lev, nLevels, nIters;
clock_t clk;
Gia_ManRandom( 1 );
Gia_ManSetPhase( pGia );
nLevels = Gia_ManLevelNum( pGia );

View File

@ -740,7 +740,8 @@ 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, clk = clock();
int i, k;
clock_t clk = clock();
Gia_ManRandom( 1 );
Gli_ManFinalize( p );
if ( p->nRegs == 0 )

View File

@ -44,7 +44,7 @@ struct Hcd_Pars_t_
int fUseGia; // uses GIA package
int fUseCSat; // uses circuit-based solver
int fVerbose; // verbose stats
int timeSynth; // synthesis runtime
clock_t timeSynth; // synthesis runtime
int nNodesAhead; // the lookahead in terms of nodes
int nCallsRecycle; // calls to perform before recycling SAT solver
};
@ -610,7 +610,8 @@ Aig_Man_t * Hcd_ComputeChoices( Aig_Man_t * pAig, int nBTLimit, int fSynthesis,
Vec_Ptr_t * vGias;
Gia_Man_t * pGia, * pMiter;
Aig_Man_t * pAigNew;
int i, clk = clock();
int i;
clock_t clk = clock();
// perform synthesis
if ( fSynthesis )
{

View File

@ -82,12 +82,12 @@ struct Gia_IsoMan_t_
Vec_Int_t * vClasses;
Vec_Int_t * vClasses2;
// statistics
int timeStart;
int timeSim;
int timeRefine;
int timeSort;
int timeOther;
int timeTotal;
clock_t timeStart;
clock_t timeSim;
clock_t timeRefine;
clock_t timeSort;
clock_t timeOther;
clock_t 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, int Time )
void Gia_IsoPrint( Gia_IsoMan_t * p, int Iter, clock_t Time )
{
printf( "Iter %4d : ", Iter );
printf( "Entries =%8d. ", p->nEntries );
@ -298,8 +298,9 @@ void Gia_IsoAssignUnique( Gia_IsoMan_t * p )
int Gia_IsoSort( Gia_IsoMan_t * p )
{
Gia_Obj_t * pObj, * pObj0;
int i, k, fSameValue, iBegin, iBeginOld, nSize, nSizeNew, clk;
int i, k, fSameValue, iBegin, iBeginOld, nSize, nSizeNew;
int fRefined = 0;
clock_t clk;
// go through the equiv classes
p->nSingles = 0;
@ -722,7 +723,8 @@ Vec_Ptr_t * Gia_IsoDeriveEquivPos( Gia_Man_t * pGia, int fForward, int fVerbose
Gia_IsoMan_t * p;
Vec_Ptr_t * vEquivs = NULL;
int fRefined, fRefinedAll;
int i, c, clk = clock(), clkTotal = clock();
int i, c;
clock_t clk = clock(), clkTotal = clock();
assert( Gia_ManCiNum(pGia) > 0 );
assert( Gia_ManPoNum(pGia) > 0 );
@ -1070,7 +1072,8 @@ Gia_Man_t * Gia_ManIsoReduce( Gia_Man_t * pInit, Vec_Ptr_t ** pvPosEquivs, int f
Vec_Ptr_t * vEquivs, * vEquivs2, * vStrings;
Vec_Int_t * vRemain, * vLevel, * vLevel2;
Vec_Str_t * vStr, * vStr2;
int i, k, s, sStart, Entry, Counter, clk = clock();
int i, k, s, sStart, Entry, Counter;
clock_t clk = clock();
if ( pvPosEquivs )
*pvPosEquivs = NULL;
@ -1203,7 +1206,7 @@ Gia_Man_t * Gia_ManIsoReduce( Gia_Man_t * pInit, Vec_Ptr_t ** pvPosEquivs, int f
void Gia_IsoTest( Gia_Man_t * p, int fVerbose )
{
Vec_Ptr_t * vEquivs;
int clk = clock();
clock_t clk = 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 );

View File

@ -266,7 +266,8 @@ Gia_Man_t * Gia_ManRetimeForwardOne( Gia_Man_t * p, int * pnRegFixed, int * pnRe
Gia_Man_t * Gia_ManRetimeForward( Gia_Man_t * p, int nMaxIters, int fVerbose )
{
Gia_Man_t * pNew, * pTemp;
int i, clk, nRegFixed, nRegMoves = 1;
int i, nRegFixed, nRegMoves = 1;
clock_t clk;
pNew = p;
for ( i = 0; i < nMaxIters && nRegMoves > 0; i++ )
{

View File

@ -52,7 +52,8 @@ Gia_Man_t * Gia_ManPerformMapShrink( Gia_Man_t * p, int fKeepLevel, int fVerbose
Gia_Man_t * pNew, * pTemp;
Gia_Obj_t * pObj, * pFanin;
unsigned * pTruth;
int i, k, iFan, clk = clock();
int i, k, iFan;
clock_t clk = clock();
// int ClassCounts[222] = {0};
int * pLutClass, Counter = 0;
assert( p->pMapping != NULL );

View File

@ -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;
int clk = clock();
clock_t clk = clock();
// create reset counters for each literal
vCountLits = Vec_IntStart( 2 * Gia_ManObjNum(pGia) );
@ -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;
int i, clkTotal = clock();
int iOut, iPat, RetValue = 0;
// int nTimeToStop = pPars->TimeLimit ? pPars->TimeLimit + time(NULL) : 0;
clock_t clkTotal = clock();
int i, iOut, iPat, RetValue = 0;
clock_t nTimeToStop = pPars->TimeLimit ? pPars->TimeLimit * CLOCKS_PER_SEC + clock(): 0;
if ( pAig->pReprs && pAig->pNexts )
return Gia_ManSimSimulateEquiv( pAig, pPars );
ABC_FREE( pAig->pCexSeq );
@ -648,7 +648,7 @@ int Gia_ManSimSimulate( Gia_Man_t * pAig, Gia_ParSim_t * pPars )
RetValue = 1;
break;
}
if ( time(NULL) > pPars->TimeLimit )
if ( clock() > nTimeToStop )
{
i++;
break;

View File

@ -639,9 +639,9 @@ int Gia_ManSimSimulateEquiv( Gia_Man_t * pAig, Gia_ParSim_t * pPars )
{
Gia_Sim2_t * p;
Gia_Obj_t * pObj;
int i, clkTotal = clock();
int RetValue = 0, iOut, iPat;
int nTimeToStop = pPars->TimeLimit ? pPars->TimeLimit + time(NULL) : 0;
clock_t clkTotal = clock();
int i, RetValue = 0, iOut, iPat;
clock_t nTimeToStop = pPars->TimeLimit ? pPars->TimeLimit * CLOCKS_PER_SEC + clock(): 0;
assert( pAig->pReprs && pAig->pNexts );
ABC_FREE( pAig->pCexSeq );
p = Gia_Sim2Create( pAig, pPars );
@ -682,7 +682,7 @@ int Gia_ManSimSimulateEquiv( Gia_Man_t * pAig, Gia_ParSim_t * pPars )
}
if ( pAig->pReprs && pAig->pNexts )
Gia_Sim2InfoRefineEquivs( p );
if ( time(NULL) > nTimeToStop )
if ( clock() > nTimeToStop )
{
i++;
break;

View File

@ -160,7 +160,7 @@ void Gia_SortTest()
{
int nSize = 100000000;
int * pArray;
int clk = clock();
clock_t clk = clock();
printf( "Sorting %d integers\n", nSize );
pArray = Gia_SortGetTest( nSize );

View File

@ -559,7 +559,8 @@ Vec_Int_t * Gia_ManSwiSimulate( Gia_Man_t * pAig, Gia_ParSwi_t * pPars )
Gia_Obj_t * pObj;
Vec_Int_t * vSwitching;
float * pSwitching;
int i, clk, clkTotal = clock();
int i;
clock_t clk, clkTotal = 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

View File

@ -669,7 +669,8 @@ Gia_ManTer_t * Gia_ManTerSimulate( Gia_Man_t * pAig, int fVerbose )
{
Gia_ManTer_t * p;
unsigned * pState, * pPrev, * pLoop;
int i, Counter, clk, clkTotal = clock();
int i, Counter;
clock_t clk, clkTotal = clock();
assert( Gia_ManRegNum(pAig) > 0 );
// create manager
clk = clock();

View File

@ -30,7 +30,6 @@
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <time.h>
#include "src/misc/vec/vec.h"
@ -106,8 +105,8 @@ struct Hop_Man_t_
Vec_Ptr_t * vPages; // memory pages used by nodes
Hop_Obj_t * pListFree; // the list of free nodes
// timing statistics
int time1;
int time2;
clock_t time1;
clock_t time2;
};
////////////////////////////////////////////////////////////////////////

View File

@ -167,7 +167,8 @@ void Hop_TableResize( Hop_Man_t * p )
{
Hop_Obj_t * pEntry, * pNext;
Hop_Obj_t ** pTableOld, ** ppPlace;
int nTableSizeOld, Counter, nEntries, i, clk;
int nTableSizeOld, Counter, nEntries, i;
clock_t clk;
clk = clock();
// save the old table
pTableOld = p->pTable;

View File

@ -30,7 +30,6 @@
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <time.h>
#include "src/misc/vec/vec.h"
//#include "bar.h"

View File

@ -125,8 +125,8 @@ struct Ivy_Man_t_
Vec_Ptr_t * vPages; // memory pages used by nodes
Ivy_Obj_t * pListFree; // the list of free nodes
// timing statistics
int time1;
int time2;
clock_t time1;
clock_t time2;
};
struct Ivy_FraigParams_t_

View File

@ -969,7 +969,7 @@ void Ivy_ManTestCutsAll( Ivy_Man_t * p )
{
Ivy_Obj_t * pObj;
int i, nCutsCut, nCutsTotal, nNodeTotal, nNodeOver;
int clk = clock();
clock_t clk = clock();
nNodeTotal = nNodeOver = 0;
nCutsTotal = -Ivy_ManNodeNum(p);
Ivy_ManForEachObj( p, pObj, i )

View File

@ -439,7 +439,7 @@ void Ivy_ManTestCutsTravAll( Ivy_Man_t * p )
Vec_Int_t * vStore;
Vec_Vec_t * vBitCuts;
int i, nCutsCut, nCutsTotal, nNodeTotal, nNodeOver;
int clk = clock();
clock_t clk = clock();
vNodes = Vec_PtrAlloc( 100 );
vFront = Vec_PtrAlloc( 100 );

View File

@ -67,7 +67,7 @@ static inline Ivy_Supp_t * Ivy_ObjSuppStart( Ivy_Man_t * pAig, Ivy_Obj_t * pObj
return pSupp;
}
static void Ivy_FastMapPrint( Ivy_Man_t * pAig, int Delay, int Area, int Time, char * pStr );
static void Ivy_FastMapPrint( Ivy_Man_t * pAig, int Delay, int Area, clock_t Time, char * pStr );
static int Ivy_FastMapDelay( Ivy_Man_t * pAig );
static int Ivy_FastMapArea( Ivy_Man_t * pAig );
static void Ivy_FastMapNode( Ivy_Man_t * pAig, Ivy_Obj_t * pObj, int nLimit );
@ -83,8 +83,8 @@ static int Ivy_FastMapNodeRef( Ivy_Man_t * pAig, Ivy_Obj_t * pObj );
static int Ivy_FastMapNodeDeref( Ivy_Man_t * pAig, Ivy_Obj_t * pObj );
extern int s_MappingTime;
extern int s_MappingMem;
extern clock_t s_MappingTime;
extern clock_t s_MappingMem;
////////////////////////////////////////////////////////////////////////
@ -106,7 +106,8 @@ void Ivy_FastMapPerform( Ivy_Man_t * pAig, int nLimit, int fRecovery, int fVerbo
{
Ivy_SuppMan_t * pMan;
Ivy_Obj_t * pObj;
int i, Delay, Area, clk, clkTotal = clock();
int i, Delay, Area;
clock_t clk, clkTotal = clock();
// start the memory for supports
pMan = ABC_ALLOC( Ivy_SuppMan_t, 1 );
memset( pMan, 0, sizeof(Ivy_SuppMan_t) );
@ -210,7 +211,7 @@ void Ivy_FastMapStop( Ivy_Man_t * pAig )
SeeAlso []
***********************************************************************/
void Ivy_FastMapPrint( Ivy_Man_t * pAig, int Delay, int Area, int Time, char * pStr )
void Ivy_FastMapPrint( Ivy_Man_t * pAig, int Delay, int Area, clock_t Time, char * pStr )
{
printf( "%s : Delay = %3d. Area = %6d. ", pStr, Delay, Area );
ABC_PRT( "Time", Time );

View File

@ -93,16 +93,16 @@ struct Ivy_FraigMan_t_
int nSatFails;
int nSatFailsReal;
// runtime
int timeSim;
int timeTrav;
int timeSat;
int timeSatUnsat;
int timeSatSat;
int timeSatFail;
int timeRef;
int timeTotal;
int time1;
int time2;
clock_t timeSim;
clock_t timeTrav;
clock_t timeSat;
clock_t timeSatUnsat;
clock_t timeSatSat;
clock_t timeSatFail;
clock_t timeRef;
clock_t timeTotal;
clock_t time1;
clock_t time2;
};
typedef struct Prove_ParamsStruct_t_ Prove_Params_t;
@ -198,7 +198,7 @@ static int Ivy_FraigSetActivityFactors( Ivy_FraigMan_t * p, Ivy_Obj_t
static void Ivy_FraigAddToPatScores( Ivy_FraigMan_t * p, Ivy_Obj_t * pClass, Ivy_Obj_t * pClassNew );
static int Ivy_FraigMiterStatus( Ivy_Man_t * pMan );
static void Ivy_FraigMiterProve( Ivy_FraigMan_t * p );
static void Ivy_FraigMiterPrint( Ivy_Man_t * pNtk, char * pString, int clk, int fVerbose );
static void Ivy_FraigMiterPrint( Ivy_Man_t * pNtk, char * pString, clock_t clk, int fVerbose );
static int * Ivy_FraigCreateModel( Ivy_FraigMan_t * p );
static int Ivy_FraigNodesAreEquivBdd( Ivy_Obj_t * pObj1, Ivy_Obj_t * pObj2 );
@ -257,7 +257,8 @@ int Ivy_FraigProve( Ivy_Man_t ** ppManAig, void * pPars )
Prove_Params_t * pParams = (Prove_Params_t *)pPars;
Ivy_FraigParams_t Params, * pIvyParams = &Params;
Ivy_Man_t * pManAig, * pManTemp;
int RetValue, nIter, clk;//, Counter;
int RetValue, nIter;
clock_t clk;//, Counter;
ABC_INT64_T nSatConfs = 0, nSatInspects = 0;
// start the network and parameters
@ -414,7 +415,7 @@ Ivy_Man_t * Ivy_FraigPerform_int( Ivy_Man_t * pManAig, Ivy_FraigParams_t * pPara
{
Ivy_FraigMan_t * p;
Ivy_Man_t * pManAigNew;
int clk;
clock_t clk;
if ( Ivy_ManNodeNum(pManAig) == 0 )
return Ivy_ManDup(pManAig);
clk = clock();
@ -451,7 +452,7 @@ Ivy_Man_t * Ivy_FraigPerform( Ivy_Man_t * pManAig, Ivy_FraigParams_t * pParams )
{
Ivy_FraigMan_t * p;
Ivy_Man_t * pManAigNew;
int clk;
clock_t clk;
if ( Ivy_ManNodeNum(pManAig) == 0 )
return Ivy_ManDup(pManAig);
clk = clock();
@ -481,7 +482,8 @@ Ivy_Man_t * Ivy_FraigMiter( Ivy_Man_t * pManAig, Ivy_FraigParams_t * pParams )
Ivy_FraigMan_t * p;
Ivy_Man_t * pManAigNew;
Ivy_Obj_t * pObj;
int i, clk;
int i;
clock_t clk;
clk = clock();
assert( Ivy_ManLatchNum(pManAig) == 0 );
p = Ivy_FraigStartSimple( pManAig, pParams );
@ -988,7 +990,8 @@ unsigned Ivy_NodeHash( Ivy_FraigMan_t * p, Ivy_Obj_t * pObj )
void Ivy_FraigSimulateOne( Ivy_FraigMan_t * p )
{
Ivy_Obj_t * pObj;
int i, clk;
int i;
clock_t clk;
clk = clock();
Ivy_ManForEachNode( p->pManAig, pObj, i )
{
@ -1020,7 +1023,7 @@ p->nSimRounds++;
void Ivy_FraigSimulateOneSim( Ivy_FraigMan_t * p )
{
Ivy_FraigSim_t * pSims;
int clk;
clock_t clk;
clk = clock();
for ( pSims = p->pSimStart; pSims; pSims = pSims->pNext )
Ivy_NodeSimulateSim( p, pSims );
@ -1384,7 +1387,8 @@ int Ivy_FraigCheckOutputSims( Ivy_FraigMan_t * p )
int Ivy_FraigRefineClasses( Ivy_FraigMan_t * p )
{
Ivy_Obj_t * pClass, * pClass2;
int clk, RetValue, Counter = 0;
int RetValue, Counter = 0;
clock_t clk;
// check if some outputs already became non-constant
// this is a special case when computation can be stopped!!!
if ( p->pParams->fProve )
@ -1789,7 +1793,7 @@ void Ivy_FraigResimulate( Ivy_FraigMan_t * p )
SeeAlso []
***********************************************************************/
void Ivy_FraigMiterPrint( Ivy_Man_t * pNtk, char * pString, int clk, int fVerbose )
void Ivy_FraigMiterPrint( Ivy_Man_t * pNtk, char * pString, clock_t clk, int fVerbose )
{
if ( !fVerbose )
return;
@ -1876,7 +1880,8 @@ int Ivy_FraigMiterStatus( Ivy_Man_t * pMan )
void Ivy_FraigMiterProve( Ivy_FraigMan_t * p )
{
Ivy_Obj_t * pObj, * pObjNew;
int i, RetValue, clk = clock();
int i, RetValue;
clock_t clk = clock();
int fVerbose = 0;
Ivy_ManForEachPo( p->pManAig, pObj, i )
{
@ -2093,7 +2098,8 @@ void Ivy_FraigPrintActivity( Ivy_FraigMan_t * p )
***********************************************************************/
int Ivy_FraigNodesAreEquiv( Ivy_FraigMan_t * p, Ivy_Obj_t * pOld, Ivy_Obj_t * pNew )
{
int pLits[4], RetValue, RetValue1, nBTLimit, clk; //, clk2 = clock();
int pLits[4], RetValue, RetValue1, nBTLimit;
clock_t clk; //, clk2 = clock();
// make sure the nodes are not complemented
assert( !Ivy_IsComplement(pNew) );
@ -2259,7 +2265,8 @@ p->timeSatFail += clock() - clk;
***********************************************************************/
int Ivy_FraigNodeIsConst( Ivy_FraigMan_t * p, Ivy_Obj_t * pNew )
{
int pLits[2], RetValue1, clk;
int pLits[2], RetValue1;
clock_t clk;
int RetValue;
// make sure the nodes are not complemented
@ -2628,7 +2635,8 @@ int Ivy_FraigSetActivityFactors_rec( Ivy_FraigMan_t * p, Ivy_Obj_t * pObj, int L
***********************************************************************/
int Ivy_FraigSetActivityFactors( Ivy_FraigMan_t * p, Ivy_Obj_t * pOld, Ivy_Obj_t * pNew )
{
int clk, LevelMin, LevelMax;
int LevelMin, LevelMax;
clock_t clk;
assert( pOld || pNew );
clk = clock();
// reset the active variables

View File

@ -44,7 +44,7 @@ ABC_NAMESPACE_IMPL_START
***********************************************************************/
Ivy_Man_t * Ivy_ManResyn0( Ivy_Man_t * pMan, int fUpdateLevel, int fVerbose )
{
int clk;
clock_t clk;
Ivy_Man_t * pTemp;
if ( fVerbose ) { printf( "Original:\n" ); }
@ -85,7 +85,7 @@ if ( fVerbose ) Ivy_ManPrintStats( pMan );
***********************************************************************/
Ivy_Man_t * Ivy_ManResyn( Ivy_Man_t * pMan, int fUpdateLevel, int fVerbose )
{
int clk;
clock_t clk;
Ivy_Man_t * pTemp;
if ( fVerbose ) { printf( "Original:\n" ); }
@ -154,7 +154,7 @@ if ( fVerbose ) Ivy_ManPrintStats( pMan );
***********************************************************************/
Ivy_Man_t * Ivy_ManRwsat( Ivy_Man_t * pMan, int fVerbose )
{
int clk;
clock_t clk;
Ivy_Man_t * pTemp;
if ( fVerbose ) { printf( "Original:\n" ); }

View File

@ -57,7 +57,7 @@ int Ivy_ManRewritePre( Ivy_Man_t * p, int fUpdateLevel, int fUseZeroCost, int fV
Rwt_Man_t * pManRwt;
Ivy_Obj_t * pNode;
int i, nNodes, nGain;
int clk, clkStart = clock();
clock_t clk, clkStart = clock();
// start the rewriting manager
pManRwt = Rwt_ManStart( 0 );
p->pData = pManRwt;
@ -164,7 +164,7 @@ int Ivy_NodeRewrite( Ivy_Man_t * pMan, Rwt_Man_t * p, Ivy_Obj_t * pNode, int fUp
int Required, nNodesSaved;
int nNodesSaveCur = -1; // Suppress "might be used uninitialized"
int i, c, GainCur, GainBest = -1;
int clk, clk2;
clock_t clk, clk2;
p->nNodesConsidered++;
// get the required times

View File

@ -65,7 +65,7 @@ int Ivy_ManRewriteSeq( Ivy_Man_t * p, int fUseZeroCost, int fVerbose )
Rwt_Man_t * pManRwt;
Ivy_Obj_t * pNode;
int i, nNodes, nGain;
int clk, clkStart = clock();
clock_t clk, clkStart = clock();
// set the DC latch values
Ivy_ManForEachLatch( p, pNode, i )
@ -157,7 +157,7 @@ int Ivy_NodeRewriteSeq( Ivy_Man_t * pMan, Rwt_Man_t * p, Ivy_Obj_t * pNode, int
int nNodesSaved;
int nNodesSaveCur = -1; // Suppress "might be used uninitialized"
int i, c, GainCur, GainBest = -1;
int clk, clk2;//, clk3;
clock_t clk, clk2;//, clk3;
p->nNodesConsidered++;
// get the node's cuts
@ -1110,7 +1110,7 @@ void Ivy_CutComputeAll( Ivy_Man_t * p, int nInputs )
Ivy_Store_t * pStore;
Ivy_Obj_t * pObj;
int i, nCutsTotal, nCutsTotalM, nNodeTotal, nNodeOver;
int clk = clock();
clock_t clk = clock();
if ( nInputs > IVY_CUT_INPUT )
{
printf( "Cannot compute cuts for more than %d inputs.\n", IVY_CUT_INPUT );

View File

@ -206,7 +206,8 @@ int Ivy_TableCountEntries( Ivy_Man_t * p )
void Ivy_TableResize( Ivy_Man_t * p )
{
int * pTableOld, * pPlace;
int nTableSizeOld, Counter, nEntries, e, clk;
int nTableSizeOld, Counter, nEntries, e;
clock_t clk;
clk = clock();
// save the old table
pTableOld = p->pTable;

View File

@ -721,7 +721,7 @@ Abc_Cex_t * Saig_ManCbaFindCexCareBits( Aig_Man_t * pAig, Abc_Cex_t * pCex, int
Saig_ManCba_t * p;
Vec_Int_t * vReasons;
Abc_Cex_t * pCare;
int clk = clock();
clock_t clk = clock();
clk = clock();
p = Saig_ManCbaStart( pAig, pCex, nInputs, fVerbose );
@ -831,7 +831,8 @@ ABC_PRT( "Time", clock() - clk );
Vec_Int_t * Saig_ManCbaPerform( Aig_Man_t * pAbs, int nInputs, Saig_ParBmc_t * pPars )
{
Vec_Int_t * vAbsFfsToAdd;
int RetValue, clk = clock();
int RetValue;
clock_t clk = clock();
// assert( pAbs->nRegs > 0 );
// perform BMC
RetValue = Saig_ManBmcScalable( pAbs, pPars );

View File

@ -254,9 +254,9 @@ Vec_Int_t * Saig_ManPbaDerive( Aig_Man_t * pAig, int nInputs, int nStart, int nF
sat_solver * pSat;
Cnf_Dat_t * pCnf;
Aig_Obj_t * pObj;
int nTimeToStop = time(NULL) + TimeLimit;
int nCoreLits, * pCoreLits;
int i, iVar, RetValue, clk;
int i, iVar, RetValue;
clock_t clk;
if ( fVerbose )
{
if ( TimeLimit )
@ -296,7 +296,7 @@ Abc_PrintTime( 1, "Preparing", clock() - clk );
// set runtime limit
if ( TimeLimit )
sat_solver_set_runtime_limit( pSat, nTimeToStop );
sat_solver_set_runtime_limit( pSat, TimeLimit ? TimeLimit * CLOCKS_PER_SEC + clock(): 0 );
// run SAT solver
clk = clock();

View File

@ -172,7 +172,8 @@ int Saig_ManCexRefineStep( Aig_Man_t * p, Vec_Int_t * vFlops, Vec_Int_t * vFlopC
{
Aig_Man_t * pAbs;
Vec_Int_t * vFlopsNew;
int i, Entry, clk = clock();
int i, Entry;
clock_t clk = clock();
pAbs = Saig_ManDupAbstraction( p, vFlops );
if ( fSensePath )
vFlopsNew = Saig_ManExtendCounterExampleTest2( pAbs, Saig_ManCexFirstFlopPi(p, pAbs), pCex, fVerbose );

View File

@ -209,7 +209,8 @@ int Abs_VfaManCreateFrame_rec( Abs_VfaMan_t * p, Aig_Obj_t * pObj, int f )
void Abs_VfaManCreateFrame( Abs_VfaMan_t * p, int f )
{
Aig_Obj_t * pObj;
int i, clk = clock();
int i;
clock_t clk = clock();
Saig_ManForEachPo( p->pAig, pObj, i )
Abs_VfaManCreateFrame_rec( p, pObj, f );

View File

@ -190,7 +190,8 @@ int Saig_ManBmcSimple( Aig_Man_t * pAig, int nFrames, int nSizeMax, int nConfLim
Cnf_Dat_t * pCnf;
Aig_Man_t * pFrames, * pAigTemp;
Aig_Obj_t * pObj;
int status, clk, Lit, i, RetValue = -1;
int status, Lit, i, RetValue = -1;
clock_t clk;
// derive the timeframes
clk = clock();
@ -264,7 +265,7 @@ int Saig_ManBmcSimple( Aig_Man_t * pAig, int nFrames, int nSizeMax, int nConfLim
}
else
{
int clkPart = clock();
clock_t clkPart = clock();
Aig_ManForEachCo( pFrames, pObj, i )
{
//if ( s_fInterrupt )

View File

@ -202,7 +202,7 @@ Vec_Ptr_t * Abs_ManTernarySimulate( Aig_Man_t * p, int nFramesMax, int fVerbose
Vec_Ptr_t * vSimInfo;
Aig_Obj_t * pObj;
int i, f, nFramesLimit, nFrameWords;
int clk = clock();
clock_t clk = clock();
assert( Aig_ManRegNum(p) > 0 );
// the maximum number of frames will be determined to use at most 200Mb of RAM
nFramesLimit = 1 + (200000000 * 4)/Aig_ManObjNum(p);
@ -742,9 +742,10 @@ int Saig_BmcPerform( Aig_Man_t * pAig, int nStart, int nFramesMax, int nNodesMax
Saig_Bmc_t * p;
Aig_Man_t * pNew;
Cnf_Dat_t * pCnf;
int nTimeToStop = time(NULL) + nTimeOut;
int nOutsSolved = 0;
int Iter, RetValue = -1, clk = clock(), clk2, clkTotal = clock();
int Iter, RetValue = -1;
clock_t nTimeToStop = nTimeOut ? nTimeOut * CLOCKS_PER_SEC + clock(): 0;
clock_t clk = clock(), clk2, clkTotal = clock();
int Status = -1;
/*
Vec_Ptr_t * vSimInfo;
@ -763,7 +764,7 @@ int Saig_BmcPerform( Aig_Man_t * pAig, int nStart, int nFramesMax, int nNodesMax
p = Saig_BmcManStart( pAig, nFramesMax, nNodesMax, nConfMaxOne, nConfMaxAll, fVerbose );
// set runtime limit
if ( nTimeOut )
sat_solver_set_runtime_limit( p->pSat, nTimeToStop );
sat_solver_set_runtime_limit( p->pSat, nTimeOut );
for ( Iter = 0; ; Iter++ )
{
clk2 = clock();
@ -796,7 +797,7 @@ int Saig_BmcPerform( Aig_Man_t * pAig, int nStart, int nFramesMax, int nNodesMax
if ( RetValue != l_False )
break;
// check the timeout
if ( nTimeOut && time(NULL) > nTimeToStop )
if ( nTimeOut && clock() > nTimeToStop )
{
printf( "Reached timeout (%d seconds).\n", nTimeOut );
if ( piFrames )
@ -839,7 +840,7 @@ int Saig_BmcPerform( Aig_Man_t * pAig, int nStart, int nFramesMax, int nNodesMax
printf( "Reached limit on the number of timeframes (%d).\n", p->nFramesMax );
else if ( p->nConfMaxAll && p->pSat->stats.conflicts > p->nConfMaxAll )
printf( "Reached global conflict limit (%d).\n", p->nConfMaxAll );
else if ( nTimeOut && time(NULL) > nTimeToStop )
else if ( nTimeOut && clock() > nTimeToStop )
printf( "Reached timeout (%d seconds).\n", nTimeOut );
else
printf( "Reached local conflict limit (%d).\n", p->nConfMaxOne );

View File

@ -1251,8 +1251,9 @@ int Saig_ManBmcScalable( Aig_Man_t * pAig, Saig_ParBmc_t * pPars )
unsigned * pInfo;
int RetValue = -1, fFirst = 1, nJumpFrame = 0, fUnfinished = 0;
int nOutDigits = Abc_Base10Log( Saig_ManPoNum(pAig) );
int i, f, Lit, status, clk, clk2, clkOther = 0, clkTotal = clock();
int nTimeToStop = time(NULL) + pPars->nTimeOut;
int i, f, Lit, status;
clock_t clk, clk2, clkOther = 0, clkTotal = clock();
clock_t nTimeToStop = pPars->nTimeOut ? pPars->nTimeOut * CLOCKS_PER_SEC + clock(): 0;
p = Saig_Bmc3ManStart( pAig );
p->pPars = pPars;
if ( pPars->fVerbose )
@ -1411,7 +1412,7 @@ clkOther += clock() - clk2;
else
{
assert( status == l_Undef );
if ( pPars->nTimeOut && time(NULL) > nTimeToStop )
if ( pPars->nTimeOut && clock() > nTimeToStop )
{
printf( "Reached timeout (%d seconds).\n", pPars->nTimeOut );
Saig_Bmc3ManStop( p );
@ -1427,7 +1428,7 @@ clkOther += clock() - clk2;
Saig_Bmc3ManStop( p );
return RetValue;
}
if ( pPars->nTimeOut && time(NULL) > nTimeToStop )
if ( pPars->nTimeOut && clock() > nTimeToStop )
{
printf( "Reached timeout (%d seconds).\n", pPars->nTimeOut );
Saig_Bmc3ManStop( p );
@ -1450,7 +1451,7 @@ clkOther += clock() - clk2;
// printf( "%4.0f Mb", 4.0*Vec_IntSize(p->vVisited) /(1<<20) );
printf( "%4.0f Mb", 4.0*(f+1)*p->nObjNums /(1<<20) );
printf( "%4.0f Mb", 1.0*sat_solver_memory(p->pSat)/(1<<20) );
printf( "%9.2f sec ", (float)(clock() - clkTotal)/(float)(CLOCKS_PER_SEC) );
printf( "%9.2f sec ", 1.0*(clock() - clkTotal)/CLOCKS_PER_SEC );
// printf( "\n" );
// ABC_PRMn( "Id2Var", (f+1)*p->nObjNums*4 );
// ABC_PRMn( "SAT", 42 * p->pSat->size + 16 * (int)p->pSat->stats.clauses + 4 * (int)p->pSat->stats.clauses_literals );

View File

@ -59,7 +59,8 @@ int Ssw_ManProfileConstraints( Aig_Man_t * p, int nWords, int nFrames, int fVerb
Vec_Int_t * vProbs, * vProbs2;
Aig_Obj_t * pObj, * pObjLi;
unsigned * pInfo, * pInfo0, * pInfo1, * pInfoMask, * pInfoMask2;
int i, w, f, RetValue = 1, clk = clock();
int i, w, f, RetValue = 1;
clock_t clk = clock();
if ( fVerbose )
printf( "Simulating %d nodes and %d flops for %d frames with %d words... ",
Aig_ManNodeNum(p), Aig_ManRegNum(p), nFrames, nWords );

View File

@ -59,9 +59,9 @@ struct Aig_Gla1Man_t_
// SAT solver
sat_solver * pSat;
// statistics
int timeSat;
int timeRef;
int timeTotal;
clock_t timeSat;
clock_t timeRef;
clock_t timeTotal;
};
////////////////////////////////////////////////////////////////////////
@ -687,8 +687,9 @@ Vec_Int_t * Aig_Gla1ManPerform( Aig_Man_t * pAig, Vec_Int_t * vGateClassesOld, i
Abc_Cex_t * pCex;
Vec_Int_t * vPPiRefine;
int f, g, r, i, iSatVar, Lit, Entry, RetValue;
int nConfBef, nConfAft, clk, clkTotal = clock();
int nTimeToStop = time(NULL) + TimeLimit;
int nConfBef, nConfAft;
clock_t clk, clkTotal = clock();
clock_t nTimeToStop = TimeLimit ? TimeLimit * CLOCKS_PER_SEC + clock(): 0;
assert( Saig_ManPoNum(pAig) == 1 );
if ( nFramesMax == 0 )
@ -753,7 +754,7 @@ Vec_Int_t * Aig_Gla1ManPerform( Aig_Man_t * pAig, Vec_Int_t * vGateClassesOld, i
printf( "== %3d ==", f );
else
printf( " " );
if ( TimeLimit && time(NULL) > nTimeToStop )
if ( TimeLimit && clock() > nTimeToStop )
printf( " SAT solver timed out after %d seconds.\n", TimeLimit );
else if ( RetValue != l_False )
printf( " SAT solver returned UNDECIDED after %5d conflicts.\n", nConfAft - nConfBef );

View File

@ -48,46 +48,15 @@ struct Aig_Gla2Man_t_
// SAT solver
sat_solver * pSat;
// statistics
int timePre;
int timeSat;
int timeTotal;
clock_t timePre;
clock_t timeSat;
clock_t timeTotal;
};
////////////////////////////////////////////////////////////////////////
/// FUNCTION DEFINITIONS ///
////////////////////////////////////////////////////////////////////////
#define ABC_CPS 1000
/**Function*************************************************************
Synopsis [Procedure returns miliseconds elapsed since the last reset.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
int Abc_Clock( int Timer, int fReset )
{
static int Time[16], Clock[16];
int Clock2, Diff;
assert( Timer >= 0 && Timer < 16 );
if ( fReset )
{
Time[Timer] = time(NULL);
Clock[Timer] = clock();
return 0;
}
Clock2 = clock();
if ( Clock2 > Clock[Timer] )
Diff = (Clock2 - Clock[Timer]) % CLOCKS_PER_SEC;
else
Diff = CLOCKS_PER_SEC - (Clock[Timer] - Clock2) % CLOCKS_PER_SEC;
return (time(NULL) - Time[Timer]) * ABC_CPS + (Diff * ABC_CPS) / CLOCKS_PER_SEC;
}
/**Function*************************************************************
@ -432,7 +401,8 @@ Vec_Int_t * Saig_AbsSolverUnsatCore( sat_solver * pSat, int nConfMax, int fVerbo
Vec_Int_t * vCore;
void * pSatCnf;
Intp_Man_t * pManProof;
int RetValue, clk = clock();
int RetValue;
clock_t clk = clock();
if ( piRetValue )
*piRetValue = -1;
// solve the problem
@ -556,8 +526,8 @@ Vec_Int_t * Aig_Gla2ManPerform( Aig_Man_t * pAig, int nStart, int nFramesMax, in
{
Aig_Gla2Man_t * p;
Vec_Int_t * vCore, * vResult;
int nTimeToStop = time(NULL) + TimeLimit;
int clk, clk2 = clock();
clock_t nTimeToStop = TimeLimit ? TimeLimit * CLOCKS_PER_SEC + clock(): 0;
clock_t clk, clk2 = clock();
assert( Saig_ManPoNum(pAig) == 1 );
if ( fVerbose )

View File

@ -47,9 +47,9 @@ struct Aig_Gla3Man_t_
// SAT solver
sat_solver2 * pSat;
// statistics
int timePre;
int timeSat;
int timeTotal;
clock_t timePre;
clock_t timeSat;
clock_t timeTotal;
};
////////////////////////////////////////////////////////////////////////
@ -393,7 +393,8 @@ void Aig_Gla3ManStop( Aig_Gla3Man_t * p )
Vec_Int_t * Aig_Gla3ManUnsatCore( sat_solver2 * pSat, int nConfMax, int fVerbose, int * piRetValue )
{
Vec_Int_t * vCore;
int RetValue, clk = clock();
int RetValue;
clock_t clk = clock();
if ( piRetValue )
*piRetValue = -1;
// solve the problem
@ -495,8 +496,7 @@ Vec_Int_t * Aig_Gla3ManPerform( Aig_Man_t * pAig, int nStart, int nFramesMax, in
{
Aig_Gla3Man_t * p;
Vec_Int_t * vCore, * vResult;
int nTimeToStop = time(NULL) + TimeLimit;
int clk, clk2 = clock();
clock_t clk, clk2 = clock();
assert( Saig_ManPoNum(pAig) == 1 );
if ( fVerbose )
@ -521,7 +521,7 @@ Vec_Int_t * Aig_Gla3ManPerform( Aig_Man_t * pAig, int nStart, int nFramesMax, in
// set runtime limit
if ( TimeLimit )
sat_solver2_set_runtime_limit( p->pSat, nTimeToStop );
sat_solver2_set_runtime_limit( p->pSat, TimeLimit * CLOCKS_PER_SEC + clock() );
// compute UNSAT core
clk = clock();

View File

@ -206,7 +206,7 @@ int Aig_ManHaigVerify( Aig_Man_t * p, Aig_Man_t * pAig, Aig_Man_t * pHaig, int n
sat_solver * pSat;
Aig_Obj_t * pObj1, * pObj2;
int i, RetValue1, RetValue2, Counter, Lits[2], nOvers;
int clk = clock(), clkVerif;
clock_t clk = clock(), clkVerif;
nOvers = Aig_ManMapHaigNodes( pHaig );
@ -412,7 +412,7 @@ int Aig_ManHaigVerify2( Aig_Man_t * p, Aig_Man_t * pAig, Aig_Man_t * pHaig, int
sat_solver * pSat;
Aig_Obj_t * pObj1, * pObj2;
int i, RetValue1, RetValue2, Counter, Lits[2];
int clk = clock();
clock_t clk = clock();
int Delta;
int Id1, Id2;
@ -624,7 +624,8 @@ Aig_Man_t * Saig_ManHaigRecord( Aig_Man_t * p, int nIters, int nSteps, int fReti
Dar_RwrPar_t ParsRwr, * pParsRwr = &ParsRwr;
Aig_Man_t * pNew, * pTemp;
Aig_Obj_t * pObj;
int i, k, nStepsReal, clk = clock(), clkSynth;
int i, k, nStepsReal;
clock_t clk = clock(), clkSynth;
Dar_ManDefaultRwrParams( pParsRwr );
clk = clock();

View File

@ -150,8 +150,9 @@ int Saig_ManInduction( Aig_Man_t * p, int nFramesMax, int nConfMax, int fUnique,
Vec_Int_t * vTopVarNums, * vState, * vTopVarIds = NULL;
Vec_Ptr_t * vTop, * vBot;
Aig_Obj_t * pObjPi, * pObjPiCopy, * pObjPo;
int i, k, f, clk, Lits[2], status = -1, RetValue, nSatVarNum, nConfPrev;
int i, k, f, Lits[2], status = -1, RetValue, nSatVarNum, nConfPrev;
int nOldSize, iReg, iLast, fAdded, nConstrs = 0, nClauses = 0;
clock_t clk;
assert( fUnique == 0 || fUniqueAll == 0 );
assert( Saig_ManPoNum(p) == 1 );
Aig_ManSetCioIds( p );

View File

@ -426,7 +426,8 @@ Aig_Man_t * Iso_ManFilterPos( Aig_Man_t * pAig, Vec_Ptr_t ** pvPosEquivs, int fV
Vec_Ptr_t * vBuffers, * vClasses;
Vec_Int_t * vLevel, * vRemain;
Vec_Str_t * vStr, * vPrev;
int i, nPos, clk = clock();
int i, nPos;
clock_t clk = clock();
int clkDup = 0, clkAig = 0, clkIso = 0, clk2;
*pvPosEquivs = NULL;
@ -539,7 +540,7 @@ Aig_Man_t * Iso_ManFilterPos( Aig_Man_t * pAig, Vec_Ptr_t ** pvPosEquivs, int fV
Aig_Man_t * Iso_ManTest( Aig_Man_t * pAig, int fVerbose )
{
Vec_Int_t * vPerm;
int clk = clock();
clock_t clk = clock();
vPerm = Saig_ManFindIsoPerm( pAig, fVerbose );
Vec_IntFree( vPerm );
Abc_PrintTime( 1, "Time", clock() - clk );
@ -560,7 +561,7 @@ Aig_Man_t * Iso_ManTest( Aig_Man_t * pAig, int fVerbose )
Aig_Man_t * Saig_ManIsoReduce( Aig_Man_t * pAig, Vec_Ptr_t ** pvPosEquivs, int fVerbose )
{
Aig_Man_t * pPart;
int clk = clock();
clock_t clk = clock();
pPart = Iso_ManFilterPos( pAig, pvPosEquivs, fVerbose );
printf( "Reduced %d outputs to %d outputs. ", Saig_ManPoNum(pAig), Saig_ManPoNum(pPart) );
Abc_PrintTime( 1, "Time", clock() - clk );

View File

@ -160,7 +160,7 @@ void Iso_StoCollectInfo_rec( Aig_Man_t * p, Aig_Obj_t * pObj, int fCompl, Vec_In
Vec_IntPush( vVisited, Aig_ObjId(pObj) );
}
//static int time_Trav = 0;
//static clock_t time_Trav = 0;
/**Function*************************************************************
@ -286,7 +286,8 @@ Vec_Vec_t * Saig_IsoDetectFast( Aig_Man_t * pAig )
Aig_Obj_t * pObj;
Vec_Ptr_t * vClasses, * vInfos;
Vec_Int_t * vInfo, * vPrev, * vLevel;
int i, Number, nUnique = 0, clk = clock();
int i, Number, nUnique = 0;
clock_t clk = clock();
// collect infos and remember their number
pMan = Iso_StoStart( pAig );

View File

@ -290,11 +290,11 @@ struct Iso_Man_t_
Vec_Ptr_t * vClasses; // other classes
Vec_Ptr_t * vTemp1; // other classes
Vec_Ptr_t * vTemp2; // other classes
int timeHash;
int timeFout;
int timeSort;
int timeOther;
int timeTotal;
clock_t timeHash;
clock_t timeFout;
clock_t timeSort;
clock_t timeOther;
clock_t timeTotal;
};
static inline Iso_Obj_t * Iso_ManObj( Iso_Man_t * p, int i ) { assert( i >= 0 && i < p->nObjs ); return i ? p->pObjs + i : NULL; }
@ -556,7 +556,8 @@ static inline int Iso_ObjHashAdd( Iso_Man_t * p, Iso_Obj_t * pIso )
void Iso_ManCollectClasses( Iso_Man_t * p )
{
Iso_Obj_t * pIso;
int i, clk = clock();
int i;
clock_t clk = clock();
Vec_PtrClear( p->vSingles );
Vec_PtrClear( p->vClasses );
for ( i = 0; i < p->nBins; i++ )
@ -1171,8 +1172,7 @@ Vec_Int_t * Saig_ManFindIsoPerm( Aig_Man_t * pAig, int fVerbose )
int fVeryVerbose = 0;
Vec_Int_t * vRes;
Iso_Man_t * p;
int clk, clk2 = clock();
clk = clock();
clock_t clk = clock(), clk2 = clock();
p = Iso_ManCreate( pAig );
p->timeFout += clock() - clk;
Iso_ManPrintClasses( p, fVerbose, fVeryVerbose );

View File

@ -1076,7 +1076,8 @@ int Ssw_SecSpecial( Aig_Man_t * pPart0, Aig_Man_t * pPart1, int nFrames, int fVe
// extern int Fra_FraigCec( Aig_Man_t ** ppAig, int nConfLimit, int fVerbose );
int iOut, nOuts;
Aig_Man_t * pMiterCec;
int RetValue, clkTotal = clock();
int RetValue;
clock_t clkTotal = clock();
if ( fVerbose )
{
Aig_ManPrintStats( pPart0 );

View File

@ -510,7 +510,7 @@ Abc_Cex_t * Saig_RefManRunSat( Saig_RefMan_t * p, int fNewOrder )
Vec_Int_t * vAssumps, * vVar2PiId;
int i, k, Entry, RetValue;//, f = 0, Counter = 0;
int nCoreLits, * pCoreLits;
int clk = clock();
clock_t clk = clock();
// create CNF
assert( Aig_ManRegNum(p->pFrames) == 0 );
// pCnf = Cnf_Derive( p->pFrames, 0 ); // too slow
@ -868,7 +868,7 @@ Abc_Cex_t * Saig_ManFindCexCareBits( Aig_Man_t * pAig, Abc_Cex_t * pCex, int nIn
Saig_RefMan_t * p;
Vec_Int_t * vReasons;
Abc_Cex_t * pCare;
int clk = clock();
clock_t clk = clock();
clk = clock();
p = Saig_RefManStart( pAig, pCex, nInputs, fVerbose );
@ -931,7 +931,7 @@ Vec_Int_t * Saig_ManExtendCounterExampleTest3( Aig_Man_t * pAig, int iFirstFlopP
{
Saig_RefMan_t * p;
Vec_Int_t * vRes, * vReasons;
int clk;
clock_t clk;
if ( Saig_ManPiNum(pAig) != pCex->nPis )
{
printf( "Saig_ManExtendCounterExampleTest3(): The PI count of AIG (%d) does not match that of cex (%d).\n",

View File

@ -213,7 +213,8 @@ Aig_Man_t * Saig_ManRetimeForwardOne( Aig_Man_t * p, int * pnRegFixed, int * pnR
Aig_Man_t * Saig_ManRetimeForward( Aig_Man_t * p, int nMaxIters, int fVerbose )
{
Aig_Man_t * pNew, * pTemp;
int i, clk, nRegFixed, nRegMoves = 1;
int i, nRegFixed, nRegMoves = 1;
clock_t clk;
pNew = p;
for ( i = 0; i < nMaxIters && nRegMoves > 0; i++ )
{

View File

@ -521,7 +521,7 @@ Vec_Int_t * Saig_ManExtendCounterExampleTest( Aig_Man_t * p, int iFirstFlopPi, A
{
Vec_Int_t * vRes;
Vec_Ptr_t * vSimInfo;
int clk;
clock_t clk;
if ( Saig_ManPiNum(p) != pCex->nPis )
{
printf( "Saig_ManExtendCounterExampleTest(): The PI count of AIG (%d) does not match that of cex (%d).\n",

View File

@ -337,7 +337,7 @@ Vec_Int_t * Saig_ManExtendCounterExampleTest2( Aig_Man_t * p, int iFirstFlopPi,
{
Vec_Int_t * vRes;
Vec_Ptr_t * vSimInfo;
int clk;
clock_t clk;
if ( Saig_ManPiNum(p) != pCex->nPis )
{
printf( "Saig_ManExtendCounterExampleTest2(): The PI count of AIG (%d) does not match that of cex (%d).\n",
@ -446,7 +446,7 @@ Abc_Cex_t * Saig_ManFindCexCareBitsSense( Aig_Man_t * p, Abc_Cex_t * pCex, int i
{
Abc_Cex_t * pCare;
Vec_Ptr_t * vSimInfo;
int clk;
clock_t clk;
if ( Saig_ManPiNum(p) != pCex->nPis )
{
printf( "Saig_ManExtendCounterExampleTest2(): The PI count of AIG (%d) does not match that of cex (%d).\n",

View File

@ -348,7 +348,8 @@ Vec_Int_t * Faig_ManComputeSwitchProbs4( Aig_Man_t * p, int nFrames, int nPref,
Vec_Int_t * vSwitching;
int * pProbs;
float * pSwitching;
int nFramesReal, clk;//, clkTotal = clock();
int nFramesReal;
clock_t clk;//, clkTotal = clock();
if ( fProbOne )
fTrans = 0;
vSwitching = Vec_IntStart( Aig_ManObjNumMax(p) );

View File

@ -881,7 +881,8 @@ Vec_Ptr_t * Saig_MvManSimulate( Aig_Man_t * pAig, int nFramesSymb, int nFramesSa
Vec_Ptr_t * vMap;
Saig_MvMan_t * p;
Saig_MvObj_t * pEntry;
int f, i, iState, clk = clock();
int f, i, iState;
clock_t clk = clock();
assert( nFramesSymb >= 1 && nFramesSymb <= nFramesSatur );
// start manager

View File

@ -456,7 +456,7 @@ int Raig_ManSimulate( Aig_Man_t * pAig, int nWords, int nIters, int TimeLimit, i
Raig_Man_t * p;
Sec_MtrStatus_t Status;
int i, iPat, RetValue = 0;
int clk, clkTotal = clock();
clock_t clk, clkTotal = clock();
assert( Aig_ManRegNum(pAig) > 0 );
Status = Sec_MiterStatus( pAig );
if ( Status.nSat > 0 )

View File

@ -877,7 +877,8 @@ Vec_Int_t * Saig_StrSimPerformMatching( Aig_Man_t * p0, Aig_Man_t * p1, int nDis
Vec_Int_t * vPairs;
Aig_Man_t * pPart0, * pPart1;
Aig_Obj_t * pObj0, * pObj1;
int i, nMatches, clk, clkTotal = clock();
int i, nMatches;
clock_t clk, clkTotal = clock();
Aig_ManRandom( 1 );
// consider the case when a miter is given
if ( p1 == NULL )

View File

@ -268,7 +268,8 @@ Vec_Int_t * Saig_ManComputeSwitchProb4s( Aig_Man_t * p, int nFrames, int nPref,
Saig_SimObj_t * pAig, * pEntry;
Vec_Int_t * vSwitching;
float * pSwitching;
int nFramesReal, clk;//, clkTotal = clock();
int nFramesReal;
clock_t clk;//, clkTotal = clock();
vSwitching = Vec_IntStart( Aig_ManObjNumMax(p) );
pSwitching = (float *)vSwitching->pArray;
clk = clock();

View File

@ -504,7 +504,8 @@ Aig_Man_t * Saig_SynchSequenceApply( Aig_Man_t * pAig, int nWords, int fVerbose
Aig_Man_t * pAigZero;
Vec_Str_t * vSequence;
Vec_Ptr_t * vSimInfo;
int RetValue, clk;
int RetValue;
clock_t clk;
clk = clock();
// derive synchronization sequence
@ -557,7 +558,8 @@ Aig_Man_t * Saig_Synchronize( Aig_Man_t * pAig1, Aig_Man_t * pAig2, int nWords,
Aig_Man_t * pAig1z, * pAig2z, * pMiter;
Vec_Str_t * vSeq1, * vSeq2;
Vec_Ptr_t * vSimInfo;
int RetValue, clk;
int RetValue;
clock_t clk;
/*
{
unsigned u = Saig_SynchRandomTernary();

View File

@ -379,7 +379,7 @@ Aig_Man_t * Saig_ManTimeframeSimplify( Aig_Man_t * pAig, int nFrames, int nFrame
{
// extern Aig_Man_t * Fra_FraigEquivence( Aig_Man_t * pManAig, int nConfMax, int fProve );
Aig_Man_t * pFrames, * pFraig, * pRes1, * pRes2;
int clk;
clock_t clk;
// create uninitialized timeframes with map1
pFrames = Saig_ManFramesNonInitial( pAig, nFrames );
// perform fraiging for the unrolled timeframes

View File

@ -30,7 +30,6 @@
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <time.h>
#include "src/misc/vec/vec.h"
#include "src/aig/hop/hop.h"

View File

@ -589,7 +589,8 @@ void Abc_AigResize( Abc_Aig_t * pMan )
{
Abc_Obj_t ** pBinsNew;
Abc_Obj_t * pEnt, * pEnt2;
int nBinsNew, Counter, i, clk;
int nBinsNew, Counter, i;
clock_t clk;
unsigned Key;
clk = clock();

View File

@ -835,7 +835,8 @@ int Abc_ObjSuppSize( Abc_Obj_t * pObj )
int Abc_NtkSuppSizeTest( Abc_Ntk_t * p )
{
Abc_Obj_t * pObj;
int i, Counter = 0, clk = clock();
int i, Counter = 0;
clock_t clk = clock();
Abc_NtkForEachObj( p, pObj, i )
if ( Abc_ObjIsNode(pObj) )
Counter += (Abc_ObjSuppSize(pObj) <= 16);

View File

@ -667,7 +667,8 @@ Gia_Man_t * Abc_NtkHieCecTest( char * pFileName, int fVerbose )
Vec_Ptr_t * vMods, * vOrder;
Abc_Ntk_t * pNtk, * pModel;
Gia_Man_t * pGia;
int i, clk = clock();
int i;
clock_t clk = clock();
// read hierarchical netlist
pNtk = Io_ReadBlifMv( pFileName, 0, fCheck );

View File

@ -22,7 +22,6 @@
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <time.h>
#include "src/misc/vec/vec.h"
#include "src/misc/util/utilNam.h"
@ -1491,8 +1490,8 @@ Gia_Man_t * Au_ManDeriveTest( Abc_Ntk_t * pRoot )
Abc_Ntk_t * pMod;
Au_Man_t * pMan;
Au_Ntk_t * pNtk = NULL;
int i, clk1, clk2 = 0, clk3 = 0, clk = clock();
// int clk4 = 0;
clock_t clk1, clk2 = 0, clk3 = 0, clk = clock();
int i;
clk1 = clock();
pMan = Au_ManAlloc( pRoot->pDesign ? pRoot->pDesign->pName : pRoot->pName );
@ -1570,7 +1569,7 @@ Gia_Man_t * Abc_NtkHieCecTest2( char * pFileName, char * pModelName, int fVerbos
int fSimulation = 0;
Gia_Man_t * pGia = NULL;
Au_Ntk_t * pNtk, * pNtkClp = NULL;
int clk1 = 0, clk = clock();
clock_t clk1 = 0, clk = clock();
// read hierarchical netlist
pNtk = Au_NtkParseCBlif( pFileName );

View File

@ -10986,7 +10986,8 @@ int Abc_CommandIProve( Abc_Frame_t * pAbc, int argc, char ** argv )
{
Prove_Params_t Params, * pParams = &Params;
Abc_Ntk_t * pNtk, * pNtkTemp;
int c, clk, RetValue, iOut = -1;
int c, RetValue, iOut = -1;
clock_t clk;
extern int Abc_NtkIvyProve( Abc_Ntk_t ** ppNtk, void * pPars );
@ -18797,7 +18798,7 @@ int Abc_CommandSat( Abc_Frame_t * pAbc, int argc, char ** argv )
int fVerbose;
int nConfLimit;
int nInsLimit;
int clk;
clock_t clk;
// set defaults
fVerbose = 0;
nConfLimit = 0;
@ -18927,7 +18928,7 @@ int Abc_CommandDSat( Abc_Frame_t * pAbc, int argc, char ** argv )
int fVerbose;
int nConfLimit;
int nInsLimit;
int clk;
clock_t clk;
extern int Abc_NtkDSat( Abc_Ntk_t * pNtk, ABC_INT64_T nConfLimit, ABC_INT64_T nInsLimit, int fAlignPol, int fAndOuts, int fNewSolver, int fVerbose );
// set defaults
@ -19057,7 +19058,7 @@ int Abc_CommandPSat( Abc_Frame_t * pAbc, int argc, char ** argv )
{
Abc_Ntk_t * pNtk = Abc_FrameReadNtk(pAbc);
int RetValue;
int c, clk;
int c;
int nAlgo;
int nPartSize;
int nConfPart;
@ -19065,6 +19066,7 @@ int Abc_CommandPSat( Abc_Frame_t * pAbc, int argc, char ** argv )
int fAlignPol;
int fSynthesize;
int fVerbose;
clock_t clk;
extern int Abc_NtkPartitionedSat( Abc_Ntk_t * pNtk, int nAlgo, int nPartSize, int nConfPart, int nConfTotal, int fAlignPol, int fSynthesize, int fVerbose );
// set defaults
@ -19215,7 +19217,8 @@ int Abc_CommandProve( Abc_Frame_t * pAbc, int argc, char ** argv )
{
Abc_Ntk_t * pNtk, * pNtkTemp;
Prove_Params_t Params, * pParams = &Params;
int c, clk, RetValue;
int c, RetValue;
clock_t clk;
pNtk = Abc_FrameReadNtk(pAbc);
// set defaults

View File

@ -128,7 +128,7 @@ void Abc_NtkAutoPrintAll( DdManager * dd, int nInputs, DdNode * pbOutputs[], int
int nAutoSymsMaxSupp;
int nAutoSymOuts;
int nSuppSizeMax;
int clk;
clock_t clk;
nAutoSymOuts = 0;
nAutoSyms = 0;

View File

@ -114,7 +114,7 @@ void Abc_NtkBidecResyn( Abc_Ntk_t * pNtk, int fVerbose )
Abc_Obj_t * pObj;
Vec_Int_t * vTruth;
int i, nGainTotal = 0, nNodes1, nNodes2;
int clk = clock();
clock_t clk = clock();
assert( Abc_NtkIsLogic(pNtk) );
if ( !Abc_NtkToAig(pNtk) )
return;

View File

@ -870,7 +870,8 @@ int Abc_NtkMiterSatBm( Abc_Ntk_t * pNtk, ABC_INT64_T nConfLimit, ABC_INT64_T nIn
{
static sat_solver * pSat = NULL;
lbool status;
int RetValue, clk;
int RetValue;
clock_t clk;
extern int Abc_NodeAddClausesTop( sat_solver * pSat, Abc_Obj_t * pNode, Vec_Int_t * vVars );
extern Vec_Int_t * Abc_NtkGetCiSatVarNums( Abc_Ntk_t * pNtk );
@ -1582,7 +1583,7 @@ float refineBySAT(Abc_Ntk_t * pNtk1, Vec_Int_t ** iMatch1, int * iGroup1, Vec_In
Vec_Int_t * oMatchedGroups;
FILE *result;
int matchFound;
int clk = clock();
clock_t clk = clock();
float satTime = 0.0;
/*matchFile = fopen("satmatch.txt", "w");*/
@ -1787,7 +1788,7 @@ void bmGateWay( Abc_Ntk_t * pNtk1, Abc_Ntk_t * pNtk2, int p_equivalence )
char * vPiValues1, * vPiValues2;
int * observability1, * observability2;
int clk = clock();
clock_t clk = clock();
float initTime;
float simulTime;
float satTime;

View File

@ -60,8 +60,8 @@ Abc_Ntk_t * Abc_NtkCascade( Abc_Ntk_t * pNtk, int nLutSize, int fCheck, int fVer
Abc_Obj_t * pNode;
char * pFileGeneric;
int fBddSizeMax = 500000;
int fReorder = 1;
int i, clk = clock();
int i, fReorder = 1;
clock_t clk = clock();
assert( Abc_NtkIsStrash(pNtk) );
// compute the global BDDs

View File

@ -49,7 +49,7 @@ static Abc_Obj_t * Abc_NodeFromGlobalBdds( Abc_Ntk_t * pNtkNew, DdManager * dd,
Abc_Ntk_t * Abc_NtkCollapse( Abc_Ntk_t * pNtk, int fBddSizeMax, int fDualRail, int fReorder, int fVerbose )
{
Abc_Ntk_t * pNtkNew;
int clk = clock();
clock_t clk = clock();
assert( Abc_NtkIsStrash(pNtk) );
// compute the global BDDs

View File

@ -128,7 +128,7 @@ Cut_Man_t * Abc_NtkCuts( Abc_Ntk_t * pNtk, Cut_Params_t * pParams )
Vec_Ptr_t * vNodes;
Vec_Int_t * vChoices;
int i;
int clk = clock();
clock_t clk = clock();
extern void Abc_NtkBalanceAttach( Abc_Ntk_t * pNtk );
extern void Abc_NtkBalanceDetach( Abc_Ntk_t * pNtk );

View File

@ -1047,7 +1047,7 @@ Abc_Ntk_t * Abc_NtkDRewrite( Abc_Ntk_t * pNtk, Dar_RwrPar_t * pPars )
{
Aig_Man_t * pMan, * pTemp;
Abc_Ntk_t * pNtkAig;
int clk;
clock_t clk;
assert( Abc_NtkIsStrash(pNtk) );
pMan = Abc_NtkToDar( pNtk, 0, 0 );
if ( pMan == NULL )
@ -1091,7 +1091,7 @@ Abc_Ntk_t * Abc_NtkDRefactor( Abc_Ntk_t * pNtk, Dar_RefPar_t * pPars )
{
Aig_Man_t * pMan, * pTemp;
Abc_Ntk_t * pNtkAig;
int clk;
clock_t clk;
assert( Abc_NtkIsStrash(pNtk) );
pMan = Abc_NtkToDar( pNtk, 0, 0 );
if ( pMan == NULL )
@ -1128,7 +1128,7 @@ Abc_Ntk_t * Abc_NtkDC2( Abc_Ntk_t * pNtk, int fBalance, int fUpdateLevel, int fF
{
Aig_Man_t * pMan, * pTemp;
Abc_Ntk_t * pNtkAig;
int clk;
clock_t clk;
assert( Abc_NtkIsStrash(pNtk) );
pMan = Abc_NtkToDar( pNtk, 0, 0 );
if ( pMan == NULL )
@ -1191,7 +1191,7 @@ Abc_Ntk_t * Abc_NtkDch( Abc_Ntk_t * pNtk, Dch_Pars_t * pPars )
Aig_Man_t * pMan, * pTemp;
Abc_Ntk_t * pNtkAig;
Gia_Man_t * pGia;
int clk;
clock_t clk;
assert( Abc_NtkIsStrash(pNtk) );
pMan = Abc_NtkToDar( pNtk, 0, 0 );
if ( pMan == NULL )
@ -1234,7 +1234,7 @@ Abc_Ntk_t * Abc_NtkDrwsat( Abc_Ntk_t * pNtk, int fBalance, int fVerbose )
{
Aig_Man_t * pMan, * pTemp;
Abc_Ntk_t * pNtkAig;
int clk;
clock_t clk;
assert( Abc_NtkIsStrash(pNtk) );
pMan = Abc_NtkToDar( pNtk, 0, 0 );
if ( pMan == NULL )
@ -1342,7 +1342,7 @@ Abc_Ntk_t * Abc_NtkDarToCnf( Abc_Ntk_t * pNtk, char * pFileName, int fFastAlgo,
// Cnf_Man_t * pManCnf = NULL;
Cnf_Dat_t * pCnf;
Abc_Ntk_t * pNtkNew = NULL;
int clk = clock();
clock_t clk = clock();
assert( Abc_NtkIsStrash(pNtk) );
// convert to the AIG manager
@ -1457,7 +1457,8 @@ int Abc_NtkDarCec( Abc_Ntk_t * pNtk1, Abc_Ntk_t * pNtk2, int nConfLimit, int fPa
{
Aig_Man_t * pMan, * pMan1, * pMan2;
Abc_Ntk_t * pMiter;
int RetValue, clkTotal = clock();
int RetValue;
clock_t clkTotal = clock();
/*
{
extern void Cec_ManVerifyTwoAigs( Aig_Man_t * pAig0, Aig_Man_t * pAig1, int fVerbose );
@ -1574,7 +1575,7 @@ Abc_Ntk_t * Abc_NtkDarSeqSweep( Abc_Ntk_t * pNtk, Fra_Ssw_t * pPars )
Fraig_Params_t Params;
Abc_Ntk_t * pNtkAig = NULL, * pNtkFraig;
Aig_Man_t * pMan, * pTemp;
int clk = clock();
clock_t clk = clock();
// preprocess the miter by fraiging it
// (note that for each functional class, fraiging leaves one representative;
@ -1857,8 +1858,9 @@ int Abc_NtkDarBmc( Abc_Ntk_t * pNtk, int nStart, int nFrames, int nSizeMax, int
{
Aig_Man_t * pMan;
Vec_Int_t * vMap = NULL;
int status, RetValue = -1, clk = clock();
int nTimeLimit = nTimeOut ? time(NULL) + nTimeOut : 0;
int status, RetValue = -1;
clock_t clk = clock();
clock_t nTimeLimit = nTimeOut ? nTimeOut * CLOCKS_PER_SEC + clock(): 0;
// derive the AIG manager
if ( fOrDecomp )
pMan = Abc_NtkToDarBmc( pNtk, &vMap );
@ -1889,7 +1891,7 @@ int Abc_NtkDarBmc( Abc_Ntk_t * pNtk, int nStart, int nFrames, int nSizeMax, int
else if ( RetValue == -1 )
{
Abc_Print( 1, "No output asserted in %d frames. Resource limit reached ", Abc_MaxInt(iFrame,0) );
if ( nTimeLimit && time(NULL) > nTimeLimit )
if ( nTimeLimit && clock() > nTimeLimit )
Abc_Print( 1, "(timeout %d sec). ", nTimeLimit );
else
Abc_Print( 1, "(conf limit %d). ", nBTLimit );
@ -1938,8 +1940,9 @@ int Abc_NtkDarBmc3( Abc_Ntk_t * pNtk, Saig_ParBmc_t * pPars, int fOrDecomp )
{
Aig_Man_t * pMan;
Vec_Int_t * vMap = NULL;
int status, RetValue = -1, clk = clock();
int nTimeOut = pPars->nTimeOut ? time(NULL) + pPars->nTimeOut : 0;
int status, RetValue = -1;
clock_t clk = clock();
clock_t nTimeOut = pPars->nTimeOut ? pPars->nTimeOut * CLOCKS_PER_SEC + clock(): 0;
if ( fOrDecomp && !pPars->fSolveAll )
pMan = Abc_NtkToDarBmc( pNtk, &vMap );
else
@ -1966,7 +1969,7 @@ int Abc_NtkDarBmc3( Abc_Ntk_t * pNtk, Saig_ParBmc_t * pPars, int fOrDecomp )
if ( pPars->nFailOuts == 0 )
{
Abc_Print( 1, "No output asserted in %d frames. Resource limit reached ", Abc_MaxInt(pPars->iFrame,0) );
if ( nTimeOut && time(NULL) > nTimeOut )
if ( nTimeOut && clock() > nTimeOut )
Abc_Print( 1, "(timeout %d sec). ", pPars->nTimeOut );
else
Abc_Print( 1, "(conf limit %d). ", pPars->nConfLimit );
@ -1974,7 +1977,7 @@ int Abc_NtkDarBmc3( Abc_Ntk_t * pNtk, Saig_ParBmc_t * pPars, int fOrDecomp )
else
{
Abc_Print( 1, "The total of %d outputs asserted in %d frames. Resource limit reached ", pPars->nFailOuts, pPars->iFrame );
if ( time(NULL) > nTimeOut )
if ( clock() > nTimeOut )
Abc_Print( 1, "(timeout %d sec). ", pPars->nTimeOut );
else
Abc_Print( 1, "(conf limit %d). ", pPars->nConfLimit );
@ -2030,7 +2033,8 @@ int Abc_NtkDarBmc3( Abc_Ntk_t * pNtk, Saig_ParBmc_t * pPars, int fOrDecomp )
***********************************************************************/
int Abc_NtkDarBmcInter_int( Aig_Man_t * pMan, Inter_ManParams_t * pPars, Aig_Man_t ** ppNtkRes )
{
int RetValue = -1, iFrame, clk = clock();
int RetValue = -1, iFrame;
clock_t clk = clock();
int nTotalProvedSat = 0;
assert( pMan->nRegs > 0 );
if ( ppNtkRes )
@ -2354,12 +2358,14 @@ int Abc_NtkDarDemiterDual( Abc_Ntk_t * pNtk, int fVerbose )
int Abc_NtkDarProve( Abc_Ntk_t * pNtk, Fra_Sec_t * pSecPar, int nBmcFramesMax, int nBmcConfMax )
{
Aig_Man_t * pMan;
int iFrame = -1, RetValue = -1, clkTotal = clock();
int iFrame = -1, RetValue = -1;
clock_t clkTotal = clock();
if ( pSecPar->fTryComb || Abc_NtkLatchNum(pNtk) == 0 )
{
Prove_Params_t Params, * pParams = &Params;
Abc_Ntk_t * pNtkComb;
int RetValue, clk = clock();
int RetValue;
clock_t clk = clock();
if ( Abc_NtkLatchNum(pNtk) == 0 )
Abc_Print( 1, "The network has no latches. Running CEC.\n" );
// create combinational network
@ -2549,7 +2555,8 @@ int Abc_NtkDarSec( Abc_Ntk_t * pNtk1, Abc_Ntk_t * pNtk2, Fra_Sec_t * pSecPar )
***********************************************************************/
int Abc_NtkDarPdr( Abc_Ntk_t * pNtk, Pdr_Par_t * pPars, Abc_Cex_t ** ppCex )
{
int RetValue = -1, clk = clock();
int RetValue = -1;
clock_t clk = clock();
Aig_Man_t * pMan;
*ppCex = NULL;
pMan = Abc_NtkToDar( pNtk, 0, 1 );
@ -3004,7 +3011,8 @@ int Abc_NtkDarSeqSim( Abc_Ntk_t * pNtk, int nFrames, int nWords, int TimeOut, in
extern int Raig_ManSimulate( Aig_Man_t * pAig, int nWords, int nIters, int TimeLimit, int fMiter, int fVerbose );
Aig_Man_t * pMan;
Abc_Cex_t * pCex;
int status, RetValue = -1, clk = clock();
int status, RetValue = -1;
clock_t clk = clock();
if ( Abc_NtkGetChoiceNum(pNtk) )
{
Abc_Print( 1, "Removing %d choices from the AIG.\n", Abc_NtkGetChoiceNum(pNtk) );
@ -3194,7 +3202,8 @@ int Abc_NtkDarSeqSim( Abc_Ntk_t * pNtk, int nFrames, int nWords, int TimeOut, in
int Abc_NtkDarSeqSim3( Abc_Ntk_t * pNtk, int nFrames, int nWords, int nBinSize, int nRounds, int nRandSeed, int TimeOut, int fVerbose )
{
Aig_Man_t * pMan;
int status, RetValue = -1, clk = clock();
int status, RetValue = -1;
clock_t clk = clock();
if ( Abc_NtkGetChoiceNum(pNtk) )
{
Abc_Print( 1, "Removing %d choices from the AIG.\n", Abc_NtkGetChoiceNum(pNtk) );
@ -3328,7 +3337,7 @@ Abc_Ntk_t * Abc_NtkDarTempor( Abc_Ntk_t * pNtk, int nFrames, int TimeOut, int nC
int Abc_NtkDarInduction( Abc_Ntk_t * pNtk, int nFramesMax, int nConfMax, int fUnique, int fUniqueAll, int fGetCex, int fVerbose, int fVeryVerbose )
{
Aig_Man_t * pMan;
int clkTotal = clock();
clock_t clkTotal = clock();
int RetValue;
pMan = Abc_NtkToDar( pNtk, 0, 1 );
if ( pMan == NULL )
@ -3442,9 +3451,9 @@ void Abc_NtkInterFast( Abc_Ntk_t * pNtkOn, Abc_Ntk_t * pNtkOff, int fVerbose )
Aig_ManStop( pManOff );
}
int timeCnf;
int timeSat;
int timeInt;
clock_t timeCnf;
clock_t timeSat;
clock_t timeInt;
/**Function*************************************************************

View File

@ -51,7 +51,8 @@ void Abc_NtkAutoDebug( Abc_Ntk_t * pNtk, int (*pFuncError) (Abc_Ntk_t *) )
{
Abc_Ntk_t * pNtkMod;
char * pFileName = "bug_found.blif";
int i, nSteps, nIter, ModNum, RandNum = 1, clk, clkTotal = clock();
int i, nSteps, nIter, ModNum, RandNum = 1;
clock_t clk, clkTotal = clock();
assert( Abc_NtkIsLogic(pNtk) );
srand( 0x123123 );
// create internal copy of the network

View File

@ -358,7 +358,7 @@ void Abc_NtkDressPrintEquivs( Vec_Ptr_t * vRes )
SeeAlso []
***********************************************************************/
void Abc_NtkDressPrintStats( Vec_Ptr_t * vRes, int nNodes0, int nNodes1, int Time )
void Abc_NtkDressPrintStats( Vec_Ptr_t * vRes, int nNodes0, int nNodes1, clock_t Time )
{
Vec_Int_t * vClass;
int i, k, Entry;
@ -419,7 +419,7 @@ void Abc_NtkDressPrintStats( Vec_Ptr_t * vRes, int nNodes0, int nNodes1, int Tim
void Abc_NtkDress2( Abc_Ntk_t * pNtk1, Abc_Ntk_t * pNtk2, int nConflictLimit, int fVerbose )
{
Vec_Ptr_t * vRes;
int clk = clock();
clock_t clk = clock();
vRes = Abc_NtkDressComputeEquivs( pNtk1, pNtk2, nConflictLimit, fVerbose );
// Abc_NtkDressPrintEquivs( vRes );
Abc_NtkDressPrintStats( vRes, Abc_NtkNodeNum(pNtk1), Abc_NtkNodeNum(pNtk1), clock() - clk );

View File

@ -70,7 +70,8 @@ void Abc_NtkIfComputeSwitching( Abc_Ntk_t * pNtk, If_Man_t * pIfMan )
Aig_Obj_t * pObjAig;
Aig_Man_t * pAig;
If_Obj_t * pObjIf;
int i, clk = clock();
int i;
clock_t clk = clock();
// map IF objects into old network
Abc_NtkForEachObj( pNtk, pObjAbc, i )
if ( (pObjIf = (If_Obj_t *)pObjAbc->pTemp) )

View File

@ -197,7 +197,7 @@ Abc_Ntk_t * Abc_NtkIvyHaig( Abc_Ntk_t * pNtk, int nIters, int fUseZeroCost, int
{
Abc_Ntk_t * pNtkAig;
Ivy_Man_t * pMan;
int clk;
clock_t clk;
// int i;
/*
extern int nMoves;

View File

@ -85,7 +85,8 @@ void Abc_NtkCheckAbsorb( Abc_Ntk_t * pNtk, int nLutSize )
Vec_Int_t * vCounts;
Vec_Ptr_t * vFanins;
Abc_Obj_t * pObj, * pFanin;
int i, k, Counter = 0, Counter2 = 0, clk = clock();
int i, k, Counter = 0, Counter2 = 0;
clock_t clk = clock();
vCounts = Vec_IntStart( Abc_NtkObjNumMax(pNtk) );
vFanins = Vec_PtrAlloc( 100 );
Abc_NtkForEachNode( pNtk, pObj, i )

View File

@ -64,7 +64,7 @@ Abc_Ntk_t * Abc_NtkMap( Abc_Ntk_t * pNtk, double DelayTarget, int fRecovery, int
Map_Man_t * pMan;
Vec_Int_t * vSwitching = NULL;
float * pSwitching = NULL;
int clk, clkTotal = clock();
clock_t clk, clkTotal = clock();
assert( Abc_NtkIsStrash(pNtk) );

View File

@ -285,7 +285,8 @@ Vec_Int_t * Abc_NtkLutMerge( Abc_Ntk_t * pNtk, Nwk_LMPars_t * pPars )
Vec_Int_t * vResult;
Vec_Ptr_t * vStart, * vNext, * vCands1, * vCands2;
Abc_Obj_t * pLut, * pCand;
int i, k, nVertsMax, nCands, clk = clock();
int i, k, nVertsMax, nCands;
clock_t clk = clock();
// count the number of vertices
nVertsMax = 0;
Abc_NtkForEachNode( pNtk, pLut, i )

View File

@ -545,7 +545,8 @@ void Abc_NktMffcTestSuper( Abc_Ntk_t * pNtk )
Abc_Obj_t * pObj, * pFanin;
Vec_Int_t * vCounts, * vNumbers, * vSizes, * vMarks;
Vec_Int_t * vNode1, * vNode2;
int i, k, Entry, nSizes, clk = clock();
int i, k, Entry, nSizes;
clock_t clk = clock();
vRoots = Abc_NktMffcMarkRoots( pNtk, 1 );
vFanins = Vec_PtrStart( Abc_NtkObjNumMax(pNtk) );
vFanouts = Vec_PtrStart( Abc_NtkObjNumMax(pNtk) );
@ -892,7 +893,8 @@ Vec_Ptr_t * Abc_NktMffcDerive( Abc_Ntk_t * pNtk, Vec_Ptr_t ** pvFanins, Vec_Ptr_
{
Vec_Ptr_t * vRoots, * vFanins, * vFanouts, * vVolumes, * vNodes, * vLeaves;
Abc_Obj_t * pObj, * pFanin;
int i, k, clk = clock();
int i, k;
clock_t clk = clock();
// create roots
vRoots = Abc_NktMffcMarkRoots( pNtk, 0 );
// create fanins/fanouts/volumes
@ -1205,7 +1207,8 @@ void Abc_NktMffcServerTest( Abc_Ntk_t * pNtk )
Vec_Ptr_t * vGlobs;
Vec_Int_t * vGlob, * vLeaves, * vRoots;
double Cost, CostAll = 0.0;
int i, k, Entry, nNodes = 0, clk = clock();
int i, k, Entry, nNodes = 0;
clock_t clk = clock();
vGlobs = Abc_NktMffcServer( pNtk, 18, 3 );
vLeaves = Vec_IntAlloc( 100 );
vRoots = Vec_IntAlloc( 100 );

View File

@ -392,7 +392,8 @@ void Npn_ManResize( Npn_Man_t * p )
{
Npn_Obj_t * pEntry, * pNext;
int * pBinsOld, * ppPlace;
int nBinsOld, Counter, i, clk;
int nBinsOld, Counter, i;
clock_t clk;
assert( p->pBins != NULL );
clk = clock();
// save the old Bins

Some files were not shown because too many files have changed in this diff Show More