87 static char rcsid[]
DD_UNUSED =
"$Id: cuddMatMult.c,v 1.17 2004/08/13 18:04:50 fabio Exp $";
149 for (i = 0; i < nvars; i++) {
152 for (i = 0; i < nz; i++) {
153 vars[z[i]->
index] = 1;
192 DdNode *w, *cube, *tmp, *res;
195 if (tmp == NULL)
return(NULL);
198 for (i = nz-1; i >= 0; i--) {
259 for (i = 0; i < nvars; i++) vars[i] = -1;
260 for (i = 0; i < nz; i++) vars[z[i]->index] = i;
354 unsigned int topA, topB, topV;
360 if (A == zero || B == zero) {
371 for (i = 0; i < dd->
size; i++) {
373 if (dd->
perm[i] > topP) {
394 topV =
ddMin(topA,topB);
405 if (res == zero)
return(res);
407 for (i = 0; i < dd->
size; i++) {
409 if (dd->
perm[i] > topP && (
unsigned) dd->
perm[i] < topV) {
417 if (add_scale == NULL) {
423 if (scaled == NULL) {
452 if (t == NULL)
return(NULL);
462 if (vars[index] == 0) {
501 for (i = 0; i < dd->
size; i++) {
503 if (dd->
perm[i] > topP && (
unsigned) dd->
perm[i] < topV) {
510 if (add_scale == NULL) {
516 if (scaled == NULL) {
551 DdNode *fv, *fvn, *gv, *gvn, *t, *e, *res;
553 int top, topf, topg, index;
571 if (f->
ref != 1 || g->
ref != 1) {
579 top =
ddMin(topf,topg);
581 if (top == topf) {fv =
cuddT(f); fvn =
cuddE(f);}
else {fv = fvn = f;}
582 if (top == topg) {gv =
cuddT(g); gvn =
cuddE(g);}
else {gv = gvn = g;}
585 if (t == NULL)
return(NULL);
595 if (vars[index] < 0) {
617 if (f->
ref != 1 || g->
ref != 1) {
645 DdNode *
P, *R, *Mt, *Me, *rt, *re, *ct, *ce, *Rt, *Re;
646 int topM, topc, topr;
675 if (R != NULL)
return(R);
682 if (topM == v) { Mt =
cuddT(M); Me =
cuddE(M); }
else { Mt = Me =
M; }
683 if (topr == v) { rt =
cuddT(r); re =
cuddE(r); }
else { rt = re = r; }
684 if (topc == v) { ct =
cuddT(c); ce =
cuddE(c); }
else { ct = ce = c; }
688 if (Rt == NULL)
return(NULL);
#define DD_ADD_TRIANGLE_TAG
#define DD_ADD_OUT_SUM_TAG
DdNode * Cudd_addOuterSum(DdManager *dd, DdNode *M, DdNode *r, DdNode *c)
void Cudd_RecursiveDeref(DdManager *table, DdNode *n)
void cuddCacheInsert2(DdManager *table, DD_CTFP op, DdNode *f, DdNode *g, DdNode *data)
DdNode * cuddUniqueConst(DdManager *unique, CUDD_VALUE_TYPE value)
void Cudd_Deref(DdNode *node)
DdNode * Cudd_addComputeCube(DdManager *dd, DdNode **vars, int *phase, int n)
DdNode * cuddAddApplyRecur(DdManager *dd, DD_AOP op, DdNode *f, DdNode *g)
void cuddCacheInsert(DdManager *table, ptruint op, DdNode *f, DdNode *g, DdNode *h, DdNode *data)
DdNode *(* DD_CTFP)(DdManager *, DdNode *, DdNode *)
#define ABC_ALLOC(type, num)
DdNode * Cudd_addApply(DdManager *dd, DdNode *(*)(DdManager *, DdNode **, DdNode **), DdNode *f, DdNode *g)
word M(word f1, word f2, int n)
DdNode * cuddCacheLookup2(DdManager *table, DD_CTFP op, DdNode *f, DdNode *g)
static DdNode * addTriangleRecur(DdManager *dd, DdNode *f, DdNode *g, int *vars, DdNode *cube)
static DdNode * cuddAddOuterSumRecur(DdManager *dd, DdNode *M, DdNode *r, DdNode *c)
DdNode * Cudd_addMatrixMultiply(DdManager *dd, DdNode *A, DdNode *B, DdNode **z, int nz)
DdNode * Cudd_addPlus(DdManager *dd, DdNode **f, DdNode **g)
#define ABC_NAMESPACE_IMPL_END
#define cuddIsConstant(node)
DdNode * Cudd_addTriangle(DdManager *dd, DdNode *f, DdNode *g, DdNode **z, int nz)
#define ABC_NAMESPACE_IMPL_START
DdNode * Cudd_addTimesPlus(DdManager *dd, DdNode *A, DdNode *B, DdNode **z, int nz)
DdNode * Cudd_addIte(DdManager *dd, DdNode *f, DdNode *g, DdNode *h)
#define DD_PLUS_INFINITY(dd)
static DdNode * addMMRecur(DdManager *dd, DdNode *A, DdNode *B, int topP, int *vars)
DdNode * Cudd_addExistAbstract(DdManager *manager, DdNode *f, DdNode *cube)
static ABC_NAMESPACE_IMPL_START char rcsid[] DD_UNUSED
DdNode * Cudd_addTimes(DdManager *dd, DdNode **f, DdNode **g)
DdNode * Cudd_addMinimum(DdManager *dd, DdNode **f, DdNode **g)
DdNode * cuddUniqueInter(DdManager *unique, int index, DdNode *T, DdNode *E)
DdNode * cuddCacheLookup(DdManager *table, ptruint op, DdNode *f, DdNode *g, DdNode *h)