summaryrefslogtreecommitdiffstats
path: root/src/aig/ivy
diff options
context:
space:
mode:
Diffstat (limited to 'src/aig/ivy')
-rw-r--r--src/aig/ivy/ivy.h4
-rw-r--r--src/aig/ivy/ivyCut.c2
-rw-r--r--src/aig/ivy/ivyCutTrav.c2
-rw-r--r--src/aig/ivy/ivyFastMap.c11
-rw-r--r--src/aig/ivy/ivyFraig.c54
-rw-r--r--src/aig/ivy/ivyResyn.c6
-rw-r--r--src/aig/ivy/ivyRwr.c4
-rw-r--r--src/aig/ivy/ivySeq.c6
-rw-r--r--src/aig/ivy/ivyTable.c3
9 files changed, 51 insertions, 41 deletions
diff --git a/src/aig/ivy/ivy.h b/src/aig/ivy/ivy.h
index 8d062134..f0292e6c 100644
--- a/src/aig/ivy/ivy.h
+++ b/src/aig/ivy/ivy.h
@@ -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_
diff --git a/src/aig/ivy/ivyCut.c b/src/aig/ivy/ivyCut.c
index d5a31dee..19d37bb2 100644
--- a/src/aig/ivy/ivyCut.c
+++ b/src/aig/ivy/ivyCut.c
@@ -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 )
diff --git a/src/aig/ivy/ivyCutTrav.c b/src/aig/ivy/ivyCutTrav.c
index a053c713..5834a6fc 100644
--- a/src/aig/ivy/ivyCutTrav.c
+++ b/src/aig/ivy/ivyCutTrav.c
@@ -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 );
diff --git a/src/aig/ivy/ivyFastMap.c b/src/aig/ivy/ivyFastMap.c
index 1d9efca1..feeb36f2 100644
--- a/src/aig/ivy/ivyFastMap.c
+++ b/src/aig/ivy/ivyFastMap.c
@@ -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 );
diff --git a/src/aig/ivy/ivyFraig.c b/src/aig/ivy/ivyFraig.c
index cc6250e4..411402fb 100644
--- a/src/aig/ivy/ivyFraig.c
+++ b/src/aig/ivy/ivyFraig.c
@@ -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
diff --git a/src/aig/ivy/ivyResyn.c b/src/aig/ivy/ivyResyn.c
index 8d571110..dc483bf6 100644
--- a/src/aig/ivy/ivyResyn.c
+++ b/src/aig/ivy/ivyResyn.c
@@ -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" ); }
diff --git a/src/aig/ivy/ivyRwr.c b/src/aig/ivy/ivyRwr.c
index 39131210..292bd3f9 100644
--- a/src/aig/ivy/ivyRwr.c
+++ b/src/aig/ivy/ivyRwr.c
@@ -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
diff --git a/src/aig/ivy/ivySeq.c b/src/aig/ivy/ivySeq.c
index 283bf9fe..4a999780 100644
--- a/src/aig/ivy/ivySeq.c
+++ b/src/aig/ivy/ivySeq.c
@@ -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 );
diff --git a/src/aig/ivy/ivyTable.c b/src/aig/ivy/ivyTable.c
index d2c1ab9a..d2753aa8 100644
--- a/src/aig/ivy/ivyTable.c
+++ b/src/aig/ivy/ivyTable.c
@@ -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;