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 | 18 | ||||
-rw-r--r-- | src/opt/rwr/rwrExp.c | 6 | ||||
-rw-r--r-- | src/opt/rwr/rwrMan.c | 12 | ||||
-rw-r--r-- | src/opt/rwr/rwrUtil.c | 16 |
5 files changed, 36 insertions, 36 deletions
diff --git a/src/opt/rwr/rwr.h b/src/opt/rwr/rwr.h index 74af4caa..b688fc09 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 - clock_t timeStart; - clock_t timeCut; - clock_t timeRes; - clock_t timeEval; - clock_t timeMffc; - clock_t timeUpdate; - clock_t timeTotal; + abctime timeStart; + abctime timeCut; + abctime timeRes; + abctime timeEval; + abctime timeMffc; + abctime timeUpdate; + abctime 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, 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 ); +extern void Rwr_ManAddTimeCuts( Rwr_Man_t * p, abctime Time ); +extern void Rwr_ManAddTimeUpdate( Rwr_Man_t * p, abctime Time ); +extern void Rwr_ManAddTimeTotal( Rwr_Man_t * p, abctime 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 de29e153..a4d50fca 100644 --- a/src/opt/rwr/rwrEva.c +++ b/src/opt/rwr/rwrEva.c @@ -69,17 +69,17 @@ 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; - clock_t clk, clk2;//, Counter; + abctime clk, clk2;//, Counter; p->nNodesConsidered++; // get the required times Required = fUpdateLevel? Abc_ObjRequiredLevel(pNode) : ABC_INFINITY; // get the node's cuts -clk = clock(); +clk = Abc_Clock(); pCut = (Cut_Cut_t *)Abc_NodeGetCutsRecursive( pManCut, pNode, 0, 0 ); assert( pCut != NULL ); -p->timeCut += clock() - clk; +p->timeCut += Abc_Clock() - clk; //printf( " %d", Rwr_CutCountNumNodes(pNode, pCut) ); /* @@ -89,7 +89,7 @@ p->timeCut += clock() - clk; printf( "%d ", Counter ); */ // go through the cuts -clk = clock(); +clk = Abc_Clock(); for ( pCut = pCut->pNext; pCut; pCut = pCut->pNext ) { // consider only 4-input cuts @@ -128,7 +128,7 @@ clk = clock(); continue; } -clk2 = clock(); +clk2 = Abc_Clock(); /* printf( "Considering: (" ); Vec_PtrForEachEntry( Abc_Obj_t *, p->vFaninsCur, pFanin, i ) @@ -145,12 +145,12 @@ clk2 = clock(); // unmark the fanin boundary Vec_PtrForEachEntry( Abc_Obj_t *, p->vFaninsCur, pFanin, i ) Abc_ObjRegular(pFanin)->vFanouts.nSize--; -p->timeMffc += clock() - clk2; +p->timeMffc += Abc_Clock() - clk2; // evaluate the cut -clk2 = clock(); +clk2 = Abc_Clock(); pGraph = Rwr_CutEvaluate( p, pNode, pCut, p->vFaninsCur, nNodesSaved, Required, &GainCur, fPlaceEnable ); -p->timeEval += clock() - clk2; +p->timeEval += Abc_Clock() - clk2; // check if the cut is better than the current best one if ( pGraph != NULL && GainBest < GainCur ) @@ -167,7 +167,7 @@ p->timeEval += clock() - clk2; Vec_PtrPush( p->vFanins, pFanin ); } } -p->timeRes += clock() - clk; +p->timeRes += Abc_Clock() - clk; if ( GainBest == -1 ) return -1; diff --git a/src/opt/rwr/rwrExp.c b/src/opt/rwr/rwrExp.c index e760ab8e..9d8455b4 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; - clock_t clk = clock(); + abctime clk = Abc_Clock(); Vec_Int_t * vClassesNN, * vClassesNPN; // find the max number of occurences @@ -285,7 +285,7 @@ void Rwt_Man5ExplorePrint() printf( "%d classes written into file \"%s\".\n", vClassesNN->nSize, "nnclass_stats5.txt" ); -clk = clock(); +clk = Abc_Clock(); // how many NPN classes exist? Vec_IntForEachEntry( vClassesNN, uTruth, i ) { @@ -300,7 +300,7 @@ clk = clock(); (*pCounter) += Counter; } printf( "The numbe of NPN classes = %d.\n", stmm_count(s_pManRwrExp5->tTableNPN) ); -ABC_PRT( "Computing NPN classes", clock() - clk ); +ABC_PRT( "Computing NPN classes", Abc_Clock() - clk ); // put them into an array vClassesNPN = Vec_IntAlloc( stmm_count(s_pManRwrExp5->tTableNPN) ); diff --git a/src/opt/rwr/rwrMan.c b/src/opt/rwr/rwrMan.c index 0f0631bc..2245428f 100644 --- a/src/opt/rwr/rwrMan.c +++ b/src/opt/rwr/rwrMan.c @@ -48,8 +48,8 @@ Rwr_Man_t * Rwr_ManStart( int fPrecompute ) { Dec_Man_t * pManDec; Rwr_Man_t * p; - clock_t clk = clock(); -clk = clock(); + abctime clk = Abc_Clock(); +clk = Abc_Clock(); p = ABC_ALLOC( Rwr_Man_t, 1 ); memset( p, 0, sizeof(Rwr_Man_t) ); p->nFuncs = (1<<16); @@ -91,7 +91,7 @@ clk = clock(); // Rwr_ManPrint( p ); Rwr_ManPreprocess( p ); } -p->timeStart = clock() - clk; +p->timeStart = Abc_Clock() - clk; return p; } @@ -258,7 +258,7 @@ int Rwr_ManReadCompl( Rwr_Man_t * p ) SeeAlso [] ***********************************************************************/ -void Rwr_ManAddTimeCuts( Rwr_Man_t * p, clock_t Time ) +void Rwr_ManAddTimeCuts( Rwr_Man_t * p, abctime Time ) { p->timeCut += Time; } @@ -274,7 +274,7 @@ void Rwr_ManAddTimeCuts( Rwr_Man_t * p, clock_t Time ) SeeAlso [] ***********************************************************************/ -void Rwr_ManAddTimeUpdate( Rwr_Man_t * p, clock_t Time ) +void Rwr_ManAddTimeUpdate( Rwr_Man_t * p, abctime Time ) { p->timeUpdate += Time; } @@ -290,7 +290,7 @@ void Rwr_ManAddTimeUpdate( Rwr_Man_t * p, clock_t Time ) SeeAlso [] ***********************************************************************/ -void Rwr_ManAddTimeTotal( Rwr_Man_t * p, clock_t Time ) +void Rwr_ManAddTimeTotal( Rwr_Man_t * p, abctime Time ) { p->timeTotal += Time; } diff --git a/src/opt/rwr/rwrUtil.c b/src/opt/rwr/rwrUtil.c index 97ddca3c..ee87cf9f 100644 --- a/src/opt/rwr/rwrUtil.c +++ b/src/opt/rwr/rwrUtil.c @@ -429,7 +429,7 @@ void Rwr_ManWriteToArray( Rwr_Man_t * p ) Rwr_Node_t * pNode; unsigned Entry0, Entry1; int i, nEntries; - clock_t clk = clock(); + abctime clk = Abc_Clock(); // prepare the buffer nEntries = p->vForest->nSize - 5; pFile = fopen( "npn4_aig_array.txt", "w" ); @@ -455,7 +455,7 @@ void Rwr_ManWriteToArray( Rwr_Man_t * p ) Extra_PrintHex( pFile, &Entry0, 4 ); fprintf( pFile, " \n};\n" ); fclose( pFile ); - printf( "The number of nodes saved = %d. ", nEntries ); ABC_PRT( "Saving", clock() - clk ); + printf( "The number of nodes saved = %d. ", nEntries ); ABC_PRT( "Saving", Abc_Clock() - clk ); } /**Function************************************************************* @@ -476,7 +476,7 @@ void Rwr_ManLoadFromArray( Rwr_Man_t * p, int fVerbose ) unsigned Entry0, Entry1; int Level, Volume, nEntries, fExor; int i; - clock_t clk = clock(); + abctime clk = Abc_Clock(); // reconstruct the forest for ( i = 0; ; i++ ) @@ -505,7 +505,7 @@ void Rwr_ManLoadFromArray( Rwr_Man_t * p, int fVerbose ) if ( fVerbose ) { printf( "The number of classes = %d. Canonical nodes = %d.\n", p->nClasses, p->nAdded ); - printf( "The number of nodes loaded = %d. ", nEntries ); ABC_PRT( "Loading", clock() - clk ); + printf( "The number of nodes loaded = %d. ", nEntries ); ABC_PRT( "Loading", Abc_Clock() - clk ); } } @@ -527,7 +527,7 @@ void Rwr_ManWriteToFile( Rwr_Man_t * p, char * pFileName ) Rwr_Node_t * pNode; unsigned * pBuffer; int i, nEntries; - clock_t clk = clock(); + abctime clk = Abc_Clock(); // prepare the buffer nEntries = p->vForest->nSize - 5; pBuffer = ABC_ALLOC( unsigned, nEntries * 2 ); @@ -545,7 +545,7 @@ void Rwr_ManWriteToFile( Rwr_Man_t * p, char * pFileName ) fwrite( pBuffer, sizeof(unsigned), nEntries * 2, pFile ); ABC_FREE( pBuffer ); fclose( pFile ); - printf( "The number of nodes saved = %d. ", nEntries ); ABC_PRT( "Saving", clock() - clk ); + printf( "The number of nodes saved = %d. ", nEntries ); ABC_PRT( "Saving", Abc_Clock() - clk ); } /**Function************************************************************* @@ -566,7 +566,7 @@ void Rwr_ManLoadFromFile( Rwr_Man_t * p, char * pFileName ) unsigned * pBuffer; int Level, Volume, nEntries, fExor; int i; - clock_t clk = clock(); + abctime clk = Abc_Clock(); int RetValue; // load the data @@ -601,7 +601,7 @@ void Rwr_ManLoadFromFile( Rwr_Man_t * p, char * pFileName ) } ABC_FREE( pBuffer ); printf( "The number of classes = %d. Canonical nodes = %d.\n", p->nClasses, p->nAdded ); - printf( "The number of nodes loaded = %d. ", nEntries ); ABC_PRT( "Loading", clock() - clk ); + printf( "The number of nodes loaded = %d. ", nEntries ); ABC_PRT( "Loading", Abc_Clock() - clk ); } |