diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2013-05-27 15:09:23 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2013-05-27 15:09:23 -0700 |
commit | 19c25fd6aab057b2373717f996fe538507c1b1e1 (patch) | |
tree | 7aa7cd7609a5de31d11b3455b6388fd9300c8d0f /src/bdd/cudd | |
parent | 94356f0d1fa8e671303299717f631ecf0ca2f17e (diff) | |
download | abc-19c25fd6aab057b2373717f996fe538507c1b1e1.tar.gz abc-19c25fd6aab057b2373717f996fe538507c1b1e1.tar.bz2 abc-19c25fd6aab057b2373717f996fe538507c1b1e1.zip |
Adding a wrapper around clock() for more accurate time counting in ABC.
Diffstat (limited to 'src/bdd/cudd')
-rw-r--r-- | src/bdd/cudd/cuddAndAbs.c | 2 | ||||
-rw-r--r-- | src/bdd/cudd/cuddBddIte.c | 2 | ||||
-rw-r--r-- | src/bdd/cudd/cuddBridge.c | 4 | ||||
-rw-r--r-- | src/bdd/cudd/cuddCompose.c | 2 | ||||
-rw-r--r-- | src/bdd/cudd/cuddInt.h | 2 | ||||
-rw-r--r-- | src/bdd/cudd/cuddSymmetry.c | 2 |
6 files changed, 7 insertions, 7 deletions
diff --git a/src/bdd/cudd/cuddAndAbs.c b/src/bdd/cudd/cuddAndAbs.c index 8e1fd161..d9ad1d23 100644 --- a/src/bdd/cudd/cuddAndAbs.c +++ b/src/bdd/cudd/cuddAndAbs.c @@ -259,7 +259,7 @@ cuddBddAndAbstractRecur( } } - if ( manager->TimeStop && clock() > manager->TimeStop ) + if ( manager->TimeStop && Abc_Clock() > manager->TimeStop ) return NULL; if (topf == top) { diff --git a/src/bdd/cudd/cuddBddIte.c b/src/bdd/cudd/cuddBddIte.c index 0d28ce96..803d5f19 100644 --- a/src/bdd/cudd/cuddBddIte.c +++ b/src/bdd/cudd/cuddBddIte.c @@ -926,7 +926,7 @@ cuddBddAndRecur( if (r != NULL) return(r); } - if ( manager->TimeStop && clock() > manager->TimeStop ) + if ( manager->TimeStop && Abc_Clock() > manager->TimeStop ) return NULL; /* Here we can skip the use of cuddI, because the operands are known diff --git a/src/bdd/cudd/cuddBridge.c b/src/bdd/cudd/cuddBridge.c index 8cbb22d5..94b388f5 100644 --- a/src/bdd/cudd/cuddBridge.c +++ b/src/bdd/cudd/cuddBridge.c @@ -976,9 +976,9 @@ cuddBddTransferRecur( if ( st__lookup(table, (const char *)f, (char **)&res)) return(Cudd_NotCond(res,comple)); - if ( ddS->TimeStop && clock() > ddS->TimeStop ) + if ( ddS->TimeStop && Abc_Clock() > ddS->TimeStop ) return NULL; - if ( ddD->TimeStop && clock() > ddD->TimeStop ) + if ( ddD->TimeStop && Abc_Clock() > ddD->TimeStop ) return NULL; /* Recursive step. */ diff --git a/src/bdd/cudd/cuddCompose.c b/src/bdd/cudd/cuddCompose.c index f3aff14b..0341ef53 100644 --- a/src/bdd/cudd/cuddCompose.c +++ b/src/bdd/cudd/cuddCompose.c @@ -1251,7 +1251,7 @@ cuddBddVarMapRecur( return(Cudd_NotCond(res,F != f)); } - if ( manager->TimeStop && clock() > manager->TimeStop ) + if ( manager->TimeStop && Abc_Clock() > manager->TimeStop ) return NULL; /* Split and recur on children of this node. */ diff --git a/src/bdd/cudd/cuddInt.h b/src/bdd/cudd/cuddInt.h index f0aab056..2ccf86a7 100644 --- a/src/bdd/cudd/cuddInt.h +++ b/src/bdd/cudd/cuddInt.h @@ -486,7 +486,7 @@ struct DdManager { /* specialized DD symbol table */ #endif DdNode * bFunc; DdNode * bFunc2; - clock_t TimeStop; /* timeout for reordering */ + abctime TimeStop; /* timeout for reordering */ }; typedef struct Move { diff --git a/src/bdd/cudd/cuddSymmetry.c b/src/bdd/cudd/cuddSymmetry.c index 5813f123..c2b1e858 100644 --- a/src/bdd/cudd/cuddSymmetry.c +++ b/src/bdd/cudd/cuddSymmetry.c @@ -367,7 +367,7 @@ cuddSymmSifting( if (ddTotalNumberSwapping >= table->siftMaxSwap) break; // enable timeout during variable reodering - alanmi 2/13/11 - if ( table->TimeStop && clock() > table->TimeStop ) + if ( table->TimeStop && Abc_Clock() > table->TimeStop ) break; x = table->perm[var[i]]; #ifdef DD_STATS |