summaryrefslogtreecommitdiffstats
path: root/src/sat
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2011-07-13 16:35:53 +0700
committerAlan Mishchenko <alanmi@berkeley.edu>2011-07-13 16:35:53 +0700
commit2dd6b9789d3561f1d4d5cada11c6b77aa108cca8 (patch)
tree8cc6b0f39ef41f8faf4f6e436b867ef18b6cd5bd /src/sat
parent6a020d6f692e95f647b89053baacbd563832bb39 (diff)
downloadabc-2dd6b9789d3561f1d4d5cada11c6b77aa108cca8.tar.gz
abc-2dd6b9789d3561f1d4d5cada11c6b77aa108cca8.tar.bz2
abc-2dd6b9789d3561f1d4d5cada11c6b77aa108cca8.zip
Reduced default growth rate of vectors in the SAT solver.
Diffstat (limited to 'src/sat')
-rw-r--r--src/sat/bsat/satVec.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/sat/bsat/satVec.h b/src/sat/bsat/satVec.h
index 4c3763e3..6e604d36 100644
--- a/src/sat/bsat/satVec.h
+++ b/src/sat/bsat/satVec.h
@@ -48,7 +48,8 @@ static inline void veci_resize (veci* v, int k) { v->size = k; } // only
static inline void veci_push (veci* v, int e)
{
if (v->size == v->cap) {
- int newsize = v->cap * 2;//+1;
+// int newsize = v->cap * 2;//+1;
+ int newsize = (v->cap < 4) ? v->cap * 2 : (v->cap / 2) * 3;
v->ptr = ABC_REALLOC( int, v->ptr, newsize );
v->cap = newsize; }
v->ptr[v->size++] = e;
@@ -76,7 +77,8 @@ static inline void vecp_resize (vecp* v, int k) { v->size = k; } // only
static inline void vecp_push (vecp* v, void* e)
{
if (v->size == v->cap) {
- int newsize = v->cap * 2;//+1;
+// int newsize = v->cap * 2;//+1;
+ int newsize = (v->cap < 4) ? v->cap * 2 : (v->cap / 2) * 3;
v->ptr = ABC_REALLOC( void*, v->ptr, newsize );
v->cap = newsize; }
v->ptr[v->size++] = e;