[buddy] use powers of two for the sizes of all hash tables

* src/bddop.c, src/bddx.h, src/cache.c, src/cache.h, src/kernel.c,
src/kernel.h, src/prime.c, src/prime.h, src/reorder.c: Use power of
two for the sizes of all hash tables, in order to reduce the amount of
divisions performed.  Also allow bddhash to be smaller than bddnodes.
This commit is contained in:
Alexandre Duret-Lutz 2017-07-24 12:01:48 +02:00
parent 98e7e4e49a
commit 361b44e571
9 changed files with 48 additions and 25 deletions

View file

@ -118,6 +118,7 @@ extern "C" {
extern int bddrunning; /* Flag - package initialized */
extern int bdderrorcond; /* Some error condition was met */
extern int bddnodesize; /* Number of allocated nodes */
extern int bddhashsize; /* Size of node hash tableq */
extern int bddmaxnodesize; /* Maximum allowed number of nodes */
extern int bddmaxnodeincrease; /* Max. # of nodes used to inc. table */
extern BddNode* bddnodes; /* All of the bdd nodes */
@ -130,6 +131,7 @@ extern int* bddlevel2var;
extern jmp_buf bddexception;
extern int bddreorderdisabled;
extern int bddresized;
extern int bddcachesize;
extern bddCacheStat bddcachestats;
/* from reorder.c */