diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2008-07-02 08:01:00 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2008-07-02 08:01:00 -0700 |
commit | 303baf27cf34c2a57db97c4c567fd744241fa14b (patch) | |
tree | d6235cca48e7bdfe5884e517058c7791e66bb806 /src/misc/espresso/cofactor.c | |
parent | fa67e3c19e27c011517b91182eb3929412aaf402 (diff) | |
download | abc-303baf27cf34c2a57db97c4c567fd744241fa14b.tar.gz abc-303baf27cf34c2a57db97c4c567fd744241fa14b.tar.bz2 abc-303baf27cf34c2a57db97c4c567fd744241fa14b.zip |
Version abc80702
Diffstat (limited to 'src/misc/espresso/cofactor.c')
-rw-r--r-- | src/misc/espresso/cofactor.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/misc/espresso/cofactor.c b/src/misc/espresso/cofactor.c index b851a639..1a2c6e8a 100644 --- a/src/misc/espresso/cofactor.c +++ b/src/misc/espresso/cofactor.c @@ -143,7 +143,7 @@ IN pcube *T; register pcube p, cof = T[0], full = cube.fullset; for(T1 = T+2; (p = *T1++) != NULL; ) for(i = LOOP(p); i > 0; i--) - if (val = full[i] & ~ (p[i] | cof[i])) { + if ((val = full[i] & ~ (p[i] | cof[i]))) { cnt = count + ((i-1) << LOGBPI); #if BPI == 32 if (val & 0xFF000000) { @@ -230,6 +230,7 @@ IN pcube *T; best = var, mostactive = active, mostzero = cdata.var_zeros[best], mostbalanced = maxactive; else if (active == mostactive) + { /* secondary condition is to maximize the number zeros */ /* for binary variables, this is the same as minimum # of 2's */ if (cdata.var_zeros[var] > mostzero) @@ -240,6 +241,7 @@ IN pcube *T; /* for binary vars, this means roughly equal # 0's and 1's */ if (maxactive < mostbalanced) best = var, mostbalanced = maxactive; + } cdata.parts_active[var] = active; cdata.is_unate[var] = (active == 1); @@ -358,7 +360,7 @@ pcube *A1; return A; } -simplify_cubelist(T) +void simplify_cubelist(T) pcube *T; { register pcube *Tdest; |