86 static char rcsid[]
DD_UNUSED =
"$Id: cuddInit.c,v 1.33 2007/07/01 05:10:50 fabio Exp $";
126 unsigned int numVars ,
127 unsigned int numVarsZ ,
128 unsigned int numSlots ,
129 unsigned int cacheSize ,
130 unsigned long maxMemory )
135 unsigned int maxCacheSize;
136 unsigned int looseUpTo;
140 if (maxMemory == 0) {
143 looseUpTo = (
unsigned int) ((maxMemory /
sizeof(
DdNode)) /
146 if (unique == NULL)
return(NULL);
147 unique->
maxmem = (
unsigned long) maxMemory / 10 * 9;
148 maxCacheSize = (
unsigned int) ((maxMemory /
sizeof(
DdCache)) /
151 if (result == 0)
return(NULL);
156 MMoutOfMemory = saveHandler;
157 if (unique->
stash == NULL) {
158 (void) fprintf(unique->
err,
"Unable to set aside memory\n");
163 if (unique->
one == NULL)
return(0);
166 if (unique->
zero == NULL)
return(0);
171 (void) fprintf(unique->
err,
"Warning: Crippled infinite values\n");
172 (void) fprintf(unique->
err,
"Recompile without -DHAVE_IEEE_754\n");
188 if (unique->
vars == NULL) {
192 for (i = 0; i < unique->
size; i++) {
194 if (unique->
vars[i] == NULL)
return(0);
203 unique->
bFunc = NULL;
259 if (zdd->
univ == NULL) {
266 for (i = zdd->
sizeZ - 1; i >= 0; i--) {
267 unsigned int index = zdd->
invpermZ[i];
void Cudd_RecursiveDerefZdd(DdManager *table, DdNode *n)
int cuddZddInitUniv(DdManager *zdd)
void Cudd_OutOfMem(long size)
#define DD_MAX_CACHE_FRACTION
void Cudd_Quit(DdManager *unique)
DdNode * cuddUniqueConst(DdManager *unique, CUDD_VALUE_TYPE value)
#define DD_STASH_FRACTION
#define DD_MAX_LOOSE_FRACTION
#define ABC_ALLOC(type, num)
int cuddInitCache(DdManager *unique, unsigned int cacheSize, unsigned int maxCacheSize)
DdManager * Cudd_Init(unsigned int numVars, unsigned int numVarsZ, unsigned int numSlots, unsigned int cacheSize, unsigned long maxMemory)
EXTERN long getSoftDataLimit()
static ABC_NAMESPACE_IMPL_START char rcsid[] DD_UNUSED
void cuddZddFreeUniv(DdManager *zdd)
#define ABC_NAMESPACE_IMPL_END
DdNode * cuddUniqueInterZdd(DdManager *unique, int index, DdNode *T, DdNode *E)
DdManager * cuddInitTable(unsigned int numVars, unsigned int numVarsZ, unsigned int numSlots, unsigned int looseUpTo)
#define ABC_NAMESPACE_IMPL_START
void cuddFreeTable(DdManager *unique)
DdNode * cuddUniqueInter(DdManager *unique, int index, DdNode *T, DdNode *E)
int cuddZddP(DdManager *zdd, DdNode *f)