summaryrefslogtreecommitdiffstats
path: root/src/opt/sim
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2012-07-07 17:46:54 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2012-07-07 17:46:54 -0700
commit3aab7245738a69f1dd4d898493d5dabf6596ea61 (patch)
tree16a23107ca27a250e82c492dcdd1a2bea640cff6 /src/opt/sim
parent16d96fcf533fb77ff4a45992991e38ac7ea74bb3 (diff)
downloadabc-3aab7245738a69f1dd4d898493d5dabf6596ea61.tar.gz
abc-3aab7245738a69f1dd4d898493d5dabf6596ea61.tar.bz2
abc-3aab7245738a69f1dd4d898493d5dabf6596ea61.zip
Fixing time primtouts throughout the code.
Diffstat (limited to 'src/opt/sim')
-rw-r--r--src/opt/sim/sim.h24
-rw-r--r--src/opt/sim/simSupp.c9
-rw-r--r--src/opt/sim/simSym.c3
-rw-r--r--src/opt/sim/simSymSat.c3
-rw-r--r--src/opt/sim/simSymSim.c2
-rw-r--r--src/opt/sim/simUtils.c6
6 files changed, 26 insertions, 21 deletions
diff --git a/src/opt/sim/sim.h b/src/opt/sim/sim.h
index 84b2ed51..93553a84 100644
--- a/src/opt/sim/sim.h
+++ b/src/opt/sim/sim.h
@@ -88,13 +88,13 @@ struct Sym_Man_t_
int nPairsRem;
int nPairsTotal;
// runtime statistics
- int timeStruct;
- int timeCount;
- int timeMatr;
- int timeSim;
- int timeFraig;
- int timeSat;
- int timeTotal;
+ clock_t timeStruct;
+ clock_t timeCount;
+ clock_t timeMatr;
+ clock_t timeSim;
+ clock_t timeFraig;
+ clock_t timeSat;
+ clock_t timeTotal;
};
typedef struct Sim_Man_t_ Sim_Man_t;
@@ -126,11 +126,11 @@ struct Sim_Man_t_
int nSatRunsSat;
int nSatRunsUnsat;
// runtime statistics
- int timeSim;
- int timeTrav;
- int timeFraig;
- int timeSat;
- int timeTotal;
+ clock_t timeSim;
+ clock_t timeTrav;
+ clock_t timeFraig;
+ clock_t timeSat;
+ clock_t timeTotal;
};
typedef struct Sim_Pat_t_ Sim_Pat_t;
diff --git a/src/opt/sim/simSupp.c b/src/opt/sim/simSupp.c
index a7ceaee7..b383376e 100644
--- a/src/opt/sim/simSupp.c
+++ b/src/opt/sim/simSupp.c
@@ -104,7 +104,8 @@ Vec_Ptr_t * Sim_ComputeFunSupp( Abc_Ntk_t * pNtk, int fVerbose )
{
Sim_Man_t * p;
Vec_Ptr_t * vResult;
- int nSolved, i, clk = clock();
+ int nSolved, i;
+ clock_t clk = clock();
srand( 0xABC );
@@ -172,7 +173,7 @@ int Sim_ComputeSuppRound( Sim_Man_t * p, int fUseTargets )
{
Vec_Int_t * vTargets;
int i, Counter = 0;
- int clk;
+ clock_t clk;
// perform one round of random simulation
clk = clock();
Sim_UtilSimulate( p, 0 );
@@ -209,7 +210,7 @@ int Sim_ComputeSuppRoundNode( Sim_Man_t * p, int iNumCi, int fUseTargets )
int i, k, v, Output, LuckyPat, fType0, fType1;
int Counter = 0;
int fFirst = 1;
- int clk;
+ clock_t clk;
// collect nodes by level in the TFO of the CI
// this proceduredoes not collect the CIs and COs
// but it increments TravId of the collected nodes and CIs/COs
@@ -456,7 +457,7 @@ void Sim_SolveTargetsUsingSat( Sim_Man_t * p, int Limit )
int * pModel;
int RetValue, Output, Input, k, v;
int Counter = 0;
- int clk;
+ clock_t clk;
p->nSatRuns = 0;
// put targets into one array
diff --git a/src/opt/sim/simSym.c b/src/opt/sim/simSym.c
index 801d4218..0367c2af 100644
--- a/src/opt/sim/simSym.c
+++ b/src/opt/sim/simSym.c
@@ -48,7 +48,8 @@ int Sim_ComputeTwoVarSymms( Abc_Ntk_t * pNtk, int fVerbose )
Sym_Man_t * p;
Vec_Ptr_t * vResult;
int Result;
- int i, clk, clkTotal = clock();
+ int i;
+ clock_t clk, clkTotal = clock();
srand( 0xABC );
diff --git a/src/opt/sim/simSymSat.c b/src/opt/sim/simSymSat.c
index 2043e2d7..e252e0f4 100644
--- a/src/opt/sim/simSymSat.c
+++ b/src/opt/sim/simSymSat.c
@@ -137,7 +137,8 @@ int Sim_SymmsSatProveOne( Sym_Man_t * p, int Out, int Var1, int Var2, unsigned *
Fraig_Params_t Params;
Fraig_Man_t * pMan;
Abc_Ntk_t * pMiter;
- int RetValue, i, clk;
+ int RetValue, i;
+ clock_t clk;
int * pModel;
// get the miter for this problem
diff --git a/src/opt/sim/simSymSim.c b/src/opt/sim/simSymSim.c
index fddf602e..2c2a8a9e 100644
--- a/src/opt/sim/simSymSim.c
+++ b/src/opt/sim/simSymSim.c
@@ -50,7 +50,7 @@ void Sim_SymmsSimulate( Sym_Man_t * p, unsigned * pPat, Vec_Ptr_t * vMatrsNonSym
{
Abc_Obj_t * pNode;
int i, nPairsTotal, nPairsSym, nPairsNonSym;
- int clk;
+ clock_t clk;
// create the simulation matrix
Sim_SymmsCreateSquare( p, pPat );
diff --git a/src/opt/sim/simUtils.c b/src/opt/sim/simUtils.c
index 77597e83..586fab42 100644
--- a/src/opt/sim/simUtils.c
+++ b/src/opt/sim/simUtils.c
@@ -633,7 +633,8 @@ int Sim_UtilCountPairsOnePrint( Extra_BitMat_t * pMat, Vec_Int_t * vSupport )
***********************************************************************/
void Sim_UtilCountPairsAllPrint( Sym_Man_t * p )
{
- int i, clk;
+ int i;
+ clock_t clk;
clk = clock();
for ( i = 0; i < p->nOutputs; i++ )
{
@@ -657,7 +658,8 @@ p->timeCount += clock() - clk;
***********************************************************************/
void Sim_UtilCountPairsAll( Sym_Man_t * p )
{
- int nPairsTotal, nPairsSym, nPairsNonSym, i, clk;
+ int nPairsTotal, nPairsSym, nPairsNonSym, i;
+ clock_t clk;
clk = clock();
p->nPairsSymm = 0;
p->nPairsNonSymm = 0;