29 cost->cubes = F->count;
30 cost->total = cost->in = cost->out = cost->mv = cost->primes = 0;
33 for(var = 0; var < cube.num_binary_vars; var++)
34 cost->in += cdata.var_zeros[var];
37 for(var = cube.num_binary_vars; var < cube.num_vars - 1; var++)
39 cost->mv += F->count * cube.part_size[
var] - cdata.var_zeros[
var];
41 cost->mv += cdata.var_zeros[
var];
44 if (cube.num_binary_vars != cube.num_vars) {
45 var = cube.num_vars - 1;
46 cost->out = F->count * cube.part_size[
var] - cdata.var_zeros[
var];
54 cost->total = cost->in + cost->out + cost->mv;
64 if (cube.num_binary_vars == cube.num_vars - 1)
65 (void)
sprintf(s,
"c=%d(%d) in=%d out=%d tot=%d",
66 cost->cubes, cost->cubes - cost->primes, cost->in,
67 cost->out, cost->total);
69 (
void)
sprintf(s,
"c=%d(%d) in=%d mv=%d out=%d",
70 cost->cubes, cost->cubes - cost->primes, cost->in,
94 d->primes = s->primes;
103 (void) printf(
"# %s\tCost is %s\n", name,
print_cost(T));
104 (void) fflush(stdout);
114 (void) printf(
"# %s\tTime was %s, cost is %s\n",
116 (void) fflush(stdout);
127 time =
ptime() - time;
132 (void) printf(
"# %s\tTime was %s, cost is %s\n",
134 (void) fflush(stdout);
143 (void) fprintf(stderr,
"espresso: %s\n", s);
ABC_NAMESPACE_IMPL_START void cover_cost(IN pcover F, INOUT pcost cost)
void copy_cost(pcost s, pcost d)
long total_time[TIME_COUNT]
void print_trace(pcover T, char *name, long time)
#define foreach_set(R, last, p)
char * total_name[TIME_COUNT]
char * print_cost(IN pcover F)
int total_calls[TIME_COUNT]
#define ABC_NAMESPACE_IMPL_END
#define ABC_NAMESPACE_IMPL_START
void size_stamp(IN pcover T, IN char *name)
char * fmt_cost(IN pcost cost)
void totals(long time, int i, pcover T, pcost cost)
void massive_count(IN pcube *T)
pcube * cube1list(pcover A)