diff options
Diffstat (limited to 'src/opt/rwr')
-rw-r--r-- | src/opt/rwr/rwr.h | 20 | ||||
-rw-r--r-- | src/opt/rwr/rwrEva.c | 2 | ||||
-rw-r--r-- | src/opt/rwr/rwrExp.c | 2 | ||||
-rw-r--r-- | src/opt/rwr/rwrMan.c | 8 | ||||
-rw-r--r-- | src/opt/rwr/rwrUtil.c | 12 |
5 files changed, 24 insertions, 20 deletions
diff --git a/src/opt/rwr/rwr.h b/src/opt/rwr/rwr.h index 50ea7998..d6c57329 100644 --- a/src/opt/rwr/rwr.h +++ b/src/opt/rwr/rwr.h @@ -86,13 +86,13 @@ struct Rwr_Man_t_ int nCutsBad; int nSubgraphs; // runtime statistics - int timeStart; - int timeCut; - int timeRes; - int timeEval; - int timeMffc; - int timeUpdate; - int timeTotal; + clock_t timeStart; + clock_t timeCut; + clock_t timeRes; + clock_t timeEval; + clock_t timeMffc; + clock_t timeUpdate; + clock_t timeTotal; }; struct Rwr_Node_t_ // 24 bytes @@ -146,9 +146,9 @@ extern void Rwr_ManPrintStatsFile( Rwr_Man_t * p ); extern void * Rwr_ManReadDecs( Rwr_Man_t * p ); extern Vec_Ptr_t * Rwr_ManReadLeaves( Rwr_Man_t * p ); extern int Rwr_ManReadCompl( Rwr_Man_t * p ); -extern void Rwr_ManAddTimeCuts( Rwr_Man_t * p, int Time ); -extern void Rwr_ManAddTimeUpdate( Rwr_Man_t * p, int Time ); -extern void Rwr_ManAddTimeTotal( Rwr_Man_t * p, int Time ); +extern void Rwr_ManAddTimeCuts( Rwr_Man_t * p, clock_t Time ); +extern void Rwr_ManAddTimeUpdate( Rwr_Man_t * p, clock_t Time ); +extern void Rwr_ManAddTimeTotal( Rwr_Man_t * p, clock_t Time ); /*=== rwrPrint.c ========================================================*/ extern void Rwr_ManPrint( Rwr_Man_t * p ); /*=== rwrUtil.c ========================================================*/ diff --git a/src/opt/rwr/rwrEva.c b/src/opt/rwr/rwrEva.c index 83eb8d7b..d3d5143c 100644 --- a/src/opt/rwr/rwrEva.c +++ b/src/opt/rwr/rwrEva.c @@ -69,7 +69,7 @@ int Rwr_NodeRewrite( Rwr_Man_t * p, Cut_Man_t * pManCut, Abc_Obj_t * pNode, int int Required, nNodesSaved; int nNodesSaveCur = -1; // Suppress "might be used uninitialized" int i, GainCur, GainBest = -1; - int clk, clk2;//, Counter; + clock_t clk, clk2;//, Counter; p->nNodesConsidered++; // get the required times diff --git a/src/opt/rwr/rwrExp.c b/src/opt/rwr/rwrExp.c index c4664fbf..2e5bc536 100644 --- a/src/opt/rwr/rwrExp.c +++ b/src/opt/rwr/rwrExp.c @@ -226,7 +226,7 @@ void Rwt_Man5ExplorePrint() int * pDistrib; unsigned * pReprs; unsigned uTruth, uTruthC; - int clk = clock(); + clock_t clk = clock(); Vec_Int_t * vClassesNN, * vClassesNPN; // find the max number of occurences diff --git a/src/opt/rwr/rwrMan.c b/src/opt/rwr/rwrMan.c index 00273b38..78ee2067 100644 --- a/src/opt/rwr/rwrMan.c +++ b/src/opt/rwr/rwrMan.c @@ -48,7 +48,7 @@ Rwr_Man_t * Rwr_ManStart( int fPrecompute ) { Dec_Man_t * pManDec; Rwr_Man_t * p; - int clk = clock(); + clock_t clk = clock(); clk = clock(); p = ABC_ALLOC( Rwr_Man_t, 1 ); memset( p, 0, sizeof(Rwr_Man_t) ); @@ -258,7 +258,7 @@ int Rwr_ManReadCompl( Rwr_Man_t * p ) SeeAlso [] ***********************************************************************/ -void Rwr_ManAddTimeCuts( Rwr_Man_t * p, int Time ) +void Rwr_ManAddTimeCuts( Rwr_Man_t * p, clock_t Time ) { p->timeCut += Time; } @@ -274,7 +274,7 @@ void Rwr_ManAddTimeCuts( Rwr_Man_t * p, int Time ) SeeAlso [] ***********************************************************************/ -void Rwr_ManAddTimeUpdate( Rwr_Man_t * p, int Time ) +void Rwr_ManAddTimeUpdate( Rwr_Man_t * p, clock_t Time ) { p->timeUpdate += Time; } @@ -290,7 +290,7 @@ void Rwr_ManAddTimeUpdate( Rwr_Man_t * p, int Time ) SeeAlso [] ***********************************************************************/ -void Rwr_ManAddTimeTotal( Rwr_Man_t * p, int Time ) +void Rwr_ManAddTimeTotal( Rwr_Man_t * p, clock_t Time ) { p->timeTotal += Time; } diff --git a/src/opt/rwr/rwrUtil.c b/src/opt/rwr/rwrUtil.c index ac723588..97ddca3c 100644 --- a/src/opt/rwr/rwrUtil.c +++ b/src/opt/rwr/rwrUtil.c @@ -428,7 +428,8 @@ void Rwr_ManWriteToArray( Rwr_Man_t * p ) FILE * pFile; Rwr_Node_t * pNode; unsigned Entry0, Entry1; - int i, nEntries, clk = clock(); + int i, nEntries; + clock_t clk = clock(); // prepare the buffer nEntries = p->vForest->nSize - 5; pFile = fopen( "npn4_aig_array.txt", "w" ); @@ -474,7 +475,8 @@ void Rwr_ManLoadFromArray( Rwr_Man_t * p, int fVerbose ) Rwr_Node_t * p0, * p1; unsigned Entry0, Entry1; int Level, Volume, nEntries, fExor; - int i, clk = clock(); + int i; + clock_t clk = clock(); // reconstruct the forest for ( i = 0; ; i++ ) @@ -524,7 +526,8 @@ void Rwr_ManWriteToFile( Rwr_Man_t * p, char * pFileName ) FILE * pFile; Rwr_Node_t * pNode; unsigned * pBuffer; - int i, nEntries, clk = clock(); + int i, nEntries; + clock_t clk = clock(); // prepare the buffer nEntries = p->vForest->nSize - 5; pBuffer = ABC_ALLOC( unsigned, nEntries * 2 ); @@ -562,7 +565,8 @@ void Rwr_ManLoadFromFile( Rwr_Man_t * p, char * pFileName ) Rwr_Node_t * p0, * p1; unsigned * pBuffer; int Level, Volume, nEntries, fExor; - int i, clk = clock(); + int i; + clock_t clk = clock(); int RetValue; // load the data |