summaryrefslogtreecommitdiffstats
path: root/src/bool
diff options
context:
space:
mode:
Diffstat (limited to 'src/bool')
-rw-r--r--src/bool/bdc/bdcCore.c2
-rw-r--r--src/bool/bdc/bdcDec.c8
-rw-r--r--src/bool/bdc/bdcInt.h10
-rw-r--r--src/bool/bdc/bdcSpfd.c17
-rw-r--r--src/bool/kit/cloud.c2
-rw-r--r--src/bool/kit/cloud.h1
-rw-r--r--src/bool/kit/kit.h1
-rw-r--r--src/bool/kit/kitPerm.c8
8 files changed, 27 insertions, 22 deletions
diff --git a/src/bool/bdc/bdcCore.c b/src/bool/bdc/bdcCore.c
index 58324f81..fb318e0d 100644
--- a/src/bool/bdc/bdcCore.c
+++ b/src/bool/bdc/bdcCore.c
@@ -231,7 +231,7 @@ void Bdc_ManDecPrint( Bdc_Man_t * p )
int Bdc_ManDecompose( Bdc_Man_t * p, unsigned * puFunc, unsigned * puCare, int nVars, Vec_Ptr_t * vDivs, int nNodesMax )
{
Bdc_Isf_t Isf, * pIsf = &Isf;
- int clk = clock();
+ clock_t clk = clock();
assert( nVars <= p->pPars->nVarsMax );
// set current manager parameters
p->nVars = nVars;
diff --git a/src/bool/bdc/bdcDec.c b/src/bool/bdc/bdcDec.c
index 61f46f17..0695f7e9 100644
--- a/src/bool/bdc/bdcDec.c
+++ b/src/bool/bdc/bdcDec.c
@@ -45,7 +45,7 @@ ABC_NAMESPACE_IMPL_START
void Bdc_SuppMinimize2( Bdc_Man_t * p, Bdc_Isf_t * pIsf )
{
int v;
- int clk = 0; // Suppress "might be used uninitialized"
+ clock_t clk = 0; // Suppress "might be used uninitialized"
if ( p->pPars->fVerbose )
clk = clock();
// compute support
@@ -87,7 +87,7 @@ void Bdc_SuppMinimize2( Bdc_Man_t * p, Bdc_Isf_t * pIsf )
void Bdc_SuppMinimize( Bdc_Man_t * p, Bdc_Isf_t * pIsf )
{
int v;
- int clk = 0; // Suppress "might be used uninitialized"
+ clock_t clk = 0; // Suppress "might be used uninitialized"
if ( p->pPars->fVerbose )
clk = clock();
// go through the support variables
@@ -549,7 +549,7 @@ int Bdc_DecomposeStepMux( Bdc_Man_t * p, Bdc_Isf_t * pIsf, Bdc_Isf_t * pIsfL, Bd
{
int Var, VarMin, nSuppMin, nSuppCur;
unsigned uSupp0, uSupp1;
- int clk = 0; // Suppress "might be used uninitialized"
+ clock_t clk = 0; // Suppress "might be used uninitialized"
if ( p->pPars->fVerbose )
clk = clock();
VarMin = -1;
@@ -681,7 +681,7 @@ Bdc_Fun_t * Bdc_ManDecompose_rec( Bdc_Man_t * p, Bdc_Isf_t * pIsf )
Bdc_Isf_t IsfL, * pIsfL = &IsfL;
Bdc_Isf_t IsfB, * pIsfR = &IsfB;
int iVar;
- int clk = 0; // Suppress "might be used uninitialized"
+ clock_t clk = 0; // Suppress "might be used uninitialized"
/*
printf( "Init function (%d):\n", LocalCounter );
Extra_PrintBinary( stdout, pIsf->puOn, 1<<4 );printf("\n");
diff --git a/src/bool/bdc/bdcInt.h b/src/bool/bdc/bdcInt.h
index 05ce20b6..cca10957 100644
--- a/src/bool/bdc/bdcInt.h
+++ b/src/bool/bdc/bdcInt.h
@@ -118,11 +118,11 @@ struct Bdc_Man_t_
int numWeaks;
int numReuse;
// runtime
- int timeCache;
- int timeCheck;
- int timeMuxes;
- int timeSupps;
- int timeTotal;
+ clock_t timeCache;
+ clock_t timeCheck;
+ clock_t timeMuxes;
+ clock_t timeSupps;
+ clock_t timeTotal;
};
static inline Bdc_Fun_t * Bdc_FunNew( Bdc_Man_t * p ) { Bdc_Fun_t * pRes; if ( p->nNodes >= p->nNodesAlloc || p->nNodesNew >= p->nNodesMax ) return NULL; pRes = p->pNodes + p->nNodes++; p->nNodesNew++; memset( pRes, 0, sizeof(Bdc_Fun_t) ); return pRes; }
diff --git a/src/bool/bdc/bdcSpfd.c b/src/bool/bdc/bdcSpfd.c
index 54217282..1695cf2c 100644
--- a/src/bool/bdc/bdcSpfd.c
+++ b/src/bool/bdc/bdcSpfd.c
@@ -181,7 +181,8 @@ void Bdc_SpfdDecompose( word Truth, int nVars, int nCands, int nGatesMax )
Vec_Int_t * vBegs, * vWeight;
Bdc_Nod_t * pNode, * pNode0, * pNode1, * pNode2;
int Count0, Count1, * pPerm;
- int i, j, k, c, n, clk;
+ int i, j, k, c, n;
+ clock_t clk;
assert( nGatesMax < (1<<8) );
assert( nCands < (1<<12) );
assert( (1<<(nVars-1))*(1<<(nVars-1)) < (1<<12) ); // max SPFD
@@ -586,7 +587,8 @@ Vec_Wrd_t * Bdc_SpfdDecomposeTest__( Vec_Int_t ** pvWeights )
int nSize = 201326611; // the hash table size to use
int Limit = 6;
- int * pPlace, i, n, m, k, s, fCompl, clk = clock(), clk2;
+ int * pPlace, i, n, m, k, s, fCompl;
+ clock_t clk = clock(), clk2;
Vec_Int_t * vStops;
Vec_Wrd_t * vTruths;
Vec_Int_t * vWeights;
@@ -919,7 +921,7 @@ void Bdc_SpfdDecomposeTest44()
Vec_Wrd_t * vDivs;
word c0, c1, s, tt, tbest;
int i, j, Cost, CostBest = 100000;
- int clk = clock();
+ clock_t clk = clock();
return;
@@ -1028,7 +1030,8 @@ void Bdc_SpfdDecomposeTest3()
int nSizeK = (1 << 3);
Vec_Wrd_t * v1M;
Vec_Wrd_t * v1K;
- int i, k, Counter, clk;
+ int i, k, Counter;
+ clock_t clk;
// int EntryM, EntryK;
Aig_ManRandom64( 1 );
@@ -1083,7 +1086,8 @@ void Bdc_SpfdDecomposeTest8()
Vec_Wrd_t * vDivs;
word Func, FuncBest;
int Cost, CostBest = ABC_INFINITY;
- int i, clk = clock();
+ int i;
+ clock_t clk = clock();
// return;
@@ -1133,7 +1137,8 @@ void Bdc_SpfdDecomposeTest()
int nSizeK = (1 << 3); // small array size
Vec_Wrd_t * v1M, * v1K;
int EntryM, EntryK;
- int i, k, Counter, clk;
+ int i, k, Counter;
+ clock_t clk;
Aig_ManRandom64( 1 );
diff --git a/src/bool/kit/cloud.c b/src/bool/kit/cloud.c
index 1ab53c00..ca2d81eb 100644
--- a/src/bool/kit/cloud.c
+++ b/src/bool/kit/cloud.c
@@ -71,7 +71,7 @@ CloudManager * Cloud_Init( int nVars, int nBits )
{
CloudManager * dd;
int i;
- int clk1, clk2;
+ clock_t clk1, clk2;
assert( nVars <= 100000 );
assert( nBits < 32 );
diff --git a/src/bool/kit/cloud.h b/src/bool/kit/cloud.h
index 208a47ec..e2d451ae 100644
--- a/src/bool/kit/cloud.h
+++ b/src/bool/kit/cloud.h
@@ -23,7 +23,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
-#include <time.h>
#include "src/misc/util/abc_global.h"
diff --git a/src/bool/kit/kit.h b/src/bool/kit/kit.h
index 4ca75622..990fa54a 100644
--- a/src/bool/kit/kit.h
+++ b/src/bool/kit/kit.h
@@ -30,7 +30,6 @@
#include <stdlib.h>
#include <string.h>
#include <assert.h>
-#include <time.h>
#include "src/misc/vec/vec.h"
#include "src/misc/extra/extraBdd.h"
diff --git a/src/bool/kit/kitPerm.c b/src/bool/kit/kitPerm.c
index d3e9ff5a..9d6f9373 100644
--- a/src/bool/kit/kitPerm.c
+++ b/src/bool/kit/kitPerm.c
@@ -22,7 +22,8 @@
#include <stdlib.h>
#include <string.h>
#include <assert.h>
-#include <time.h>
+
+#include "kit.h"
#define inline __inline // compatible with MS VS 6.0
@@ -260,7 +261,7 @@ word Tf ( word f, int n)
}
-#define ABC_PRT(a,t) (printf("%s = ", (a)), printf("%7.2f sec\n", (float)(t)/(float)(CLOCKS_PER_SEC)))
+//#define ABC_PRT(a,t) (printf("%s = ", (a)), printf("%7.2f sec\n", (float)(t)/(float)(CLOCKS_PER_SEC)))
#define NFUNCS (1<<20)
/**Function*************************************************************
@@ -278,7 +279,8 @@ void Kit_PermComputeTest()
{
word * T = (word *)malloc( 8 * NFUNCS );
word i, o, w = 0;
- int k, b, clk;
+ int k, b;
+ clock_t clk;
srand( 0 );