summaryrefslogtreecommitdiffstats
path: root/src/bdd/cudd/cuddAddIte.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2021-11-27 17:37:34 -0800
committerAlan Mishchenko <alanmi@berkeley.edu>2021-11-27 17:37:34 -0800
commitf26ea1eaea5b51a3aec8107636c9f88eadfdcee0 (patch)
tree59f90e5e857950020c4108c31dbfbc6e768b5f91 /src/bdd/cudd/cuddAddIte.c
parent96bdcd2bb274e2cf01d2362294d5f5fdeb009533 (diff)
downloadabc-f26ea1eaea5b51a3aec8107636c9f88eadfdcee0.tar.gz
abc-f26ea1eaea5b51a3aec8107636c9f88eadfdcee0.tar.bz2
abc-f26ea1eaea5b51a3aec8107636c9f88eadfdcee0.zip
Changes to make compiler happy.
Diffstat (limited to 'src/bdd/cudd/cuddAddIte.c')
-rw-r--r--src/bdd/cudd/cuddAddIte.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/bdd/cudd/cuddAddIte.c b/src/bdd/cudd/cuddAddIte.c
index 574159c6..5f95bf47 100644
--- a/src/bdd/cudd/cuddAddIte.c
+++ b/src/bdd/cudd/cuddAddIte.c
@@ -359,6 +359,22 @@ Cudd_addCmpl(
} /* end of Cudd_addCmpl */
+#ifdef USE_CASH_DUMMY
+/**Function********************************************************************
+
+ Synopsis We need to declare a function passed to cuddCacheLookup2 as a key
+ that can be casted to DD_CTFP.
+
+******************************************************************************/
+static DdNode *
+Cudd_addLeq_dummy(DdManager * dd, DdNode * f, DdNode * g)
+{
+ assert(0);
+ return 0;
+}
+#endif
+
+
/**Function********************************************************************
Synopsis [Determines whether f is less than or equal to g.]
@@ -394,7 +410,11 @@ Cudd_addLeq(
if (g == DD_MINUS_INFINITY(dd)) return(0); /* since f != g */
/* Check cache. */
+#ifdef USE_CASH_DUMMY
+ tmp = cuddCacheLookup2(dd,(DD_CTFP)Cudd_addLeq_dummy,f,g);
+#else
tmp = cuddCacheLookup2(dd,(DD_CTFP)Cudd_addLeq,f,g);
+#endif
if (tmp != NULL) {
return(tmp == DD_ONE(dd));
}
@@ -416,8 +436,13 @@ Cudd_addLeq(
res = Cudd_addLeq(dd,fvn,gvn) && Cudd_addLeq(dd,fv,gv);
/* Store result in cache and return. */
+#ifdef USE_CASH_DUMMY
+ cuddCacheInsert2(dd,(DD_CTFP) Cudd_addLeq_dummy,f,g,
+ Cudd_NotCond(DD_ONE(dd),res==0));
+#else
cuddCacheInsert2(dd,(DD_CTFP) Cudd_addLeq,f,g,
Cudd_NotCond(DD_ONE(dd),res==0));
+#endif
return(res);
} /* end of Cudd_addLeq */