Go to the source code of this file.
Definition at line 27 of file cubestr.c.
32 if (cube.num_binary_vars < 0 || cube.num_vars < cube.num_binary_vars)
33 fatal(
"cube size is silly, error in .i/.o or .mv");
35 cube.num_mv_vars = cube.num_vars - cube.num_binary_vars;
36 cube.output = cube.num_mv_vars > 0 ? cube.num_vars - 1 : -1;
39 cube.first_part =
ALLOC(
int, cube.num_vars);
40 cube.last_part =
ALLOC(
int, cube.num_vars);
41 cube.first_word =
ALLOC(
int, cube.num_vars);
42 cube.last_word =
ALLOC(
int, cube.num_vars);
43 for(var = 0; var < cube.num_vars; var++) {
44 if (var < cube.num_binary_vars)
45 cube.part_size[
var] = 2;
46 cube.first_part[
var] = cube.size;
48 cube.size +=
ABS(cube.part_size[var]);
49 cube.last_part[
var] = cube.size - 1;
53 cube.var_mask =
ALLOC(
pset, cube.num_vars);
54 cube.sparse =
ALLOC(
int, cube.num_vars);
57 for(var = 0; var < cube.num_vars; var++) {
59 for(i = cube.first_part[var]; i <= cube.last_part[var]; i++)
61 if (var < cube.num_binary_vars) {
69 if (cube.num_binary_vars == 0)
72 cube.inword = cube.last_word[cube.num_binary_vars - 1];
73 cube.inmask = cube.binary_mask[cube.inword] &
DISJOINT;
82 cdata.part_zeros =
ALLOC(
int, cube.size);
83 cdata.var_zeros =
ALLOC(
int, cube.num_vars);
84 cdata.parts_active =
ALLOC(
int, cube.num_vars);
85 cdata.is_unate =
ALLOC(
int, cube.num_vars);
#define INLINEset_or(r, a, b)
#define set_insert(set, e)
#define WHICH_WORD(element)
void restore_cube_struct |
( |
| ) |
|
Definition at line 151 of file cubestr.c.
struct cdata_struct cdata temp_cdata_save
struct cube_struct cube temp_cube_save
void save_cube_struct |
( |
| ) |
|
Definition at line 134 of file cubestr.c.
139 cube.first_part = cube.last_part = (
int *) NULL;
140 cube.first_word = cube.last_word = (
int *) NULL;
141 cube.part_size = (
int *) NULL;
142 cube.binary_mask = cube.mv_mask = (
pcube) NULL;
143 cube.fullset = cube.emptyset = (
pcube) NULL;
144 cube.var_mask = cube.temp = (
pcube *) NULL;
146 cdata.
part_zeros = cdata.var_zeros = cdata.parts_active = (
int *) NULL;
147 cdata.is_unate = (
bool *) NULL;
struct cdata_struct cdata temp_cdata_save
struct cube_struct cube temp_cube_save
Definition at line 95 of file cubestr.c.
99 FREE(cube.first_part);
100 FREE(cube.last_part);
101 FREE(cube.first_word);
102 FREE(cube.last_word);
109 for(var = 0; var < cube.num_vars; var++)
117 FREE(cdata.part_zeros);
118 FREE(cdata.var_zeros);
119 FREE(cdata.parts_active);
120 FREE(cdata.is_unate);
122 cube.first_part = cube.last_part = (
int *) NULL;
123 cube.first_word = cube.last_word = (
int *) NULL;
124 cube.sparse = (
int *) NULL;
125 cube.binary_mask = cube.mv_mask = (
pcube) NULL;
126 cube.fullset = cube.emptyset = (
pcube) NULL;
127 cube.var_mask = cube.temp = (
pcube *) NULL;
129 cdata.part_zeros = cdata.var_zeros = cdata.parts_active = (
int *) NULL;
130 cdata.is_unate = (
bool *) NULL;