diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2012-07-07 17:46:54 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2012-07-07 17:46:54 -0700 |
commit | 3aab7245738a69f1dd4d898493d5dabf6596ea61 (patch) | |
tree | 16a23107ca27a250e82c492dcdd1a2bea640cff6 /src/opt/cut | |
parent | 16d96fcf533fb77ff4a45992991e38ac7ea74bb3 (diff) | |
download | abc-3aab7245738a69f1dd4d898493d5dabf6596ea61.tar.gz abc-3aab7245738a69f1dd4d898493d5dabf6596ea61.tar.bz2 abc-3aab7245738a69f1dd4d898493d5dabf6596ea61.zip |
Fixing time primtouts throughout the code.
Diffstat (limited to 'src/opt/cut')
-rw-r--r-- | src/opt/cut/cut.h | 2 | ||||
-rw-r--r-- | src/opt/cut/cutInt.h | 12 | ||||
-rw-r--r-- | src/opt/cut/cutMan.c | 2 | ||||
-rw-r--r-- | src/opt/cut/cutNode.c | 6 | ||||
-rw-r--r-- | src/opt/cut/cutOracle.c | 4 | ||||
-rw-r--r-- | src/opt/cut/cutPre22.c | 11 | ||||
-rw-r--r-- | src/opt/cut/cutSeq.c | 2 |
7 files changed, 20 insertions, 19 deletions
diff --git a/src/opt/cut/cut.h b/src/opt/cut/cut.h index cd87e5a0..64d3108a 100644 --- a/src/opt/cut/cut.h +++ b/src/opt/cut/cut.h @@ -124,7 +124,7 @@ extern int Cut_CutCountList( Cut_Cut_t * pList ); extern Cut_Man_t * Cut_ManStart( Cut_Params_t * pParams ); extern void Cut_ManStop( Cut_Man_t * p ); extern void Cut_ManPrintStats( Cut_Man_t * p ); -extern void Cut_ManPrintStatsToFile( Cut_Man_t * p, char * pFileName, int TimeTotal ); +extern void Cut_ManPrintStatsToFile( Cut_Man_t * p, char * pFileName, clock_t TimeTotal ); extern void Cut_ManSetFanoutCounts( Cut_Man_t * p, Vec_Int_t * vFanCounts ); extern void Cut_ManSetNodeAttrs( Cut_Man_t * p, Vec_Int_t * vFanCounts ); extern int Cut_ManReadVarsMax( Cut_Man_t * p ); diff --git a/src/opt/cut/cutInt.h b/src/opt/cut/cutInt.h index 39606b00..a66a5786 100644 --- a/src/opt/cut/cutInt.h +++ b/src/opt/cut/cutInt.h @@ -92,12 +92,12 @@ struct Cut_ManStruct_t_ int nNodesDag; int nNodesNoCuts; // runtime - int timeMerge; - int timeUnion; - int timeTruth; - int timeFilter; - int timeHash; - int timeMap; + clock_t timeMerge; + clock_t timeUnion; + clock_t timeTruth; + clock_t timeFilter; + clock_t timeHash; + clock_t timeMap; }; // iterator through all the cuts of the list diff --git a/src/opt/cut/cutMan.c b/src/opt/cut/cutMan.c index 4a9f8f4b..12c65935 100644 --- a/src/opt/cut/cutMan.c +++ b/src/opt/cut/cutMan.c @@ -201,7 +201,7 @@ void Cut_ManPrintStats( Cut_Man_t * p ) SeeAlso [] ***********************************************************************/ -void Cut_ManPrintStatsToFile( Cut_Man_t * p, char * pFileName, int TimeTotal ) +void Cut_ManPrintStatsToFile( Cut_Man_t * p, char * pFileName, clock_t TimeTotal ) { FILE * pTable; pTable = fopen( "cut_stats.txt", "a+" ); diff --git a/src/opt/cut/cutNode.c b/src/opt/cut/cutNode.c index 010e1e00..4f94011a 100644 --- a/src/opt/cut/cutNode.c +++ b/src/opt/cut/cutNode.c @@ -370,7 +370,7 @@ Cut_Cut_t * Cut_NodeComputeCuts( Cut_Man_t * p, int Node, int Node0, int Node1, { Cut_List_t Super, * pSuper = &Super; Cut_Cut_t * pList, * pCut; - int clk; + clock_t clk; // start the number of cuts at the node p->nNodes++; p->nNodeCuts = 0; @@ -681,7 +681,7 @@ Cut_Cut_t * Cut_NodeUnionCuts( Cut_Man_t * p, Vec_Int_t * vNodes ) Cut_Cut_t * pList, * pListStart, * pCut, * pCut2; Cut_Cut_t * pTop = NULL; // Suppress "might be used uninitialized" int i, k, Node, Root, Limit = p->pParams->nVarsMax; - int clk = clock(); + clock_t clk = clock(); // start the new list Cut_ListStart( pSuper ); @@ -797,7 +797,7 @@ Cut_Cut_t * Cut_NodeUnionCutsSeq( Cut_Man_t * p, Vec_Int_t * vNodes, int CutSetN Cut_List_t Super, * pSuper = &Super; Cut_Cut_t * pList, * pListStart, * pCut, * pCut2, * pTop; int i, k, Node, Root, Limit = p->pParams->nVarsMax; - int clk = clock(); + clock_t clk = clock(); // start the new list Cut_ListStart( pSuper ); diff --git a/src/opt/cut/cutOracle.c b/src/opt/cut/cutOracle.c index b26e7d5e..5b740da5 100644 --- a/src/opt/cut/cutOracle.c +++ b/src/opt/cut/cutOracle.c @@ -46,7 +46,7 @@ struct Cut_OracleStruct_t_ int EntrySize; int nTruthWords; // stats - int timeTotal; + clock_t timeTotal; int nCuts; int nCutsTriv; }; @@ -322,7 +322,7 @@ Cut_Cut_t * Cut_OracleComputeCuts( Cut_Oracle_t * p, int Node, int Node0, int No Cut_Cut_t * pList = NULL, ** ppTail = &pList; Cut_Cut_t * pCut, * pCut0, * pCut1, * pList0, * pList1; int iCutStart, nCuts, i, Entry; - int clk = clock(); + clock_t clk = clock(); // get the cuts of the children pList0 = (Cut_Cut_t *)Vec_PtrEntry( p->vCutsNew, Node0 ); diff --git a/src/opt/cut/cutPre22.c b/src/opt/cut/cutPre22.c index d51d9056..4e507fba 100644 --- a/src/opt/cut/cutPre22.c +++ b/src/opt/cut/cutPre22.c @@ -69,9 +69,9 @@ struct Cut_CMan_t_ int nVarCounts[CUT_CELL_MVAR+1]; int nSymGroups[CUT_CELL_MVAR+1]; int nSymGroupsE[CUT_CELL_MVAR+1]; - int timeCanon; - int timeSupp; - int timeTable; + clock_t timeCanon; + clock_t timeSupp; + clock_t timeTable; int nCellFound; int nCellNotFound; }; @@ -234,7 +234,8 @@ void Cut_CellPrecompute() { Cut_CMan_t * p; Cut_Cell_t * pCell, * pTemp; - int i1, i2, i3, i, j, k, c, clk = clock(); //, clk2 = clock(); + int i1, i2, i3, i, j, k, c; + clock_t clk = clock(); //, clk2 = clock(); p = Cut_CManStart(); @@ -840,7 +841,7 @@ void Cut_CellDumpToFile() int NumUsed[10][5] = {{0}}; int BoxUsed[22][5] = {{0}}; int i, k, Counter; - int clk = clock(); + clock_t clk = clock(); if ( p == NULL ) { diff --git a/src/opt/cut/cutSeq.c b/src/opt/cut/cutSeq.c index 3f671d24..e1df2c95 100644 --- a/src/opt/cut/cutSeq.c +++ b/src/opt/cut/cutSeq.c @@ -73,7 +73,7 @@ void Cut_NodeComputeCutsSeq( Cut_Man_t * p, int Node, int Node0, int Node1, int { Cut_List_t Super, * pSuper = &Super; Cut_Cut_t * pListNew; - int clk; + clock_t clk; // get the number of cuts at the node p->nNodeCuts = Cut_CutCountList( Cut_NodeReadCutsOld(p, Node) ); |