aboutsummaryrefslogtreecommitdiff
path: root/src/solvers/h48/gendata_eoesep.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/solvers/h48/gendata_eoesep.h')
-rw-r--r--src/solvers/h48/gendata_eoesep.h42
1 files changed, 21 insertions, 21 deletions
diff --git a/src/solvers/h48/gendata_eoesep.h b/src/solvers/h48/gendata_eoesep.h
index 52e2b8b..e9a2794 100644
--- a/src/solvers/h48/gendata_eoesep.h
+++ b/src/solvers/h48/gendata_eoesep.h
@@ -1,4 +1,4 @@
1STATIC int64_t coord_eoesep_sym(cube_t, const uint32_t [static ESEP_MAX]); 1STATIC uint64_t coord_eoesep_sym(cube_t, const uint32_t [static ESEP_MAX]);
2STATIC size_t gendata_esep_classes( 2STATIC size_t gendata_esep_classes(
3 uint32_t [static ESEP_MAX], uint16_t [static ESEP_CLASSES]); 3 uint32_t [static ESEP_MAX], uint16_t [static ESEP_CLASSES]);
4STATIC size_t gendata_eoesep(unsigned char *, uint8_t); 4STATIC size_t gendata_eoesep(unsigned char *, uint8_t);
@@ -8,22 +8,22 @@ STATIC uint32_t gendata_eoesep_fromnew(uint8_t, uint8_t [static EOESEP_BUF],
8 uint32_t [static ESEP_MAX], uint16_t [static ESEP_CLASSES]); 8 uint32_t [static ESEP_MAX], uint16_t [static ESEP_CLASSES]);
9STATIC uint32_t gendata_eoesep_fromdone(uint8_t, uint8_t [static EOESEP_BUF], 9STATIC uint32_t gendata_eoesep_fromdone(uint8_t, uint8_t [static EOESEP_BUF],
10 uint32_t [static ESEP_MAX], uint16_t [static ESEP_CLASSES]); 10 uint32_t [static ESEP_MAX], uint16_t [static ESEP_CLASSES]);
11STATIC uint32_t gendata_eoesep_marksim(int64_t, uint8_t, 11STATIC uint32_t gendata_eoesep_marksim(uint64_t, uint8_t,
12 uint8_t [static EOESEP_BUF], uint32_t [static ESEP_MAX]); 12 uint8_t [static EOESEP_BUF], uint32_t [static ESEP_MAX]);
13STATIC bool gendata_eoesep_next(cube_t, uint8_t, 13STATIC bool gendata_eoesep_next(cube_t, uint8_t,
14 uint8_t [static EOESEP_BUF], uint32_t [static ESEP_MAX]); 14 uint8_t [static EOESEP_BUF], uint32_t [static ESEP_MAX]);
15STATIC uint8_t get_eoesep_pval( 15STATIC uint8_t get_eoesep_pval(
16 const uint8_t [static DIV_ROUND_UP(EOESEP_TABLESIZE, 2)], int64_t); 16 const uint8_t [static DIV_ROUND_UP(EOESEP_TABLESIZE, 2)], uint64_t);
17STATIC uint8_t get_eoesep_pval_cube(const unsigned char *, cube_t); 17STATIC uint8_t get_eoesep_pval_cube(const unsigned char *, cube_t);
18STATIC void set_eoesep_pval( 18STATIC void set_eoesep_pval(
19 uint8_t [static DIV_ROUND_UP(EOESEP_TABLESIZE, 2)], int64_t, uint8_t); 19 uint8_t [static DIV_ROUND_UP(EOESEP_TABLESIZE, 2)], uint64_t, uint8_t);
20 20
21STATIC int64_t 21STATIC uint64_t
22coord_eoesep_sym(cube_t c, const uint32_t esep_classes[static ESEP_MAX]) 22coord_eoesep_sym(cube_t c, const uint32_t esep_classes[static ESEP_MAX])
23{ 23{
24 uint8_t ttrep; 24 uint8_t ttrep;
25 uint32_t edata, class; 25 uint32_t edata, class;
26 int64_t esep, eo; 26 uint64_t esep, eo;
27 27
28 esep = coord_esep(c); 28 esep = coord_esep(c);
29 edata = esep_classes[esep]; 29 edata = esep_classes[esep];
@@ -43,7 +43,7 @@ gendata_esep_classes(
43 bool visited[ESEP_MAX]; 43 bool visited[ESEP_MAX];
44 uint8_t t; 44 uint8_t t;
45 uint32_t class, cl, ti; 45 uint32_t class, cl, ti;
46 int64_t i, j; 46 uint64_t i, j;
47 cube_t c; 47 cube_t c;
48 48
49 memset(visited, 0, ESEP_MAX * sizeof(bool)); 49 memset(visited, 0, ESEP_MAX * sizeof(bool));
@@ -73,7 +73,7 @@ gendata_eoesep(unsigned char *buf, uint8_t maxdepth)
73 unsigned char *buf8; 73 unsigned char *buf8;
74 uint16_t rep[ESEP_CLASSES]; 74 uint16_t rep[ESEP_CLASSES];
75 uint32_t *esep_classes, done, level; 75 uint32_t *esep_classes, done, level;
76 int64_t coord; 76 uint64_t coord;
77 tableinfo_t info; 77 tableinfo_t info;
78 78
79 if (buf == NULL) 79 if (buf == NULL)
@@ -140,18 +140,18 @@ gendata_eoesep_fromdone(
140) 140)
141{ 141{
142 uint8_t pval; 142 uint8_t pval;
143 int64_t i, esep, eo, coord, done; 143 uint64_t i, esep, eo, coord, done;
144 144
145 done = 0; 145 done = 0;
146 for (i = 0; i < (int64_t)ESEP_CLASSES; i++) { 146 for (i = 0; i < ESEP_CLASSES; i++) {
147 esep = rep[i]; 147 esep = rep[i];
148 for (eo = 0; eo < POW_2_11; eo++) { 148 for (eo = 0; eo < POW_2_11; eo++) {
149 coord = (i << INT64_C(11)) + eo; 149 coord = (i << UINT64_C(11)) + eo;
150 pval = get_eoesep_pval(buf8, coord); 150 pval = get_eoesep_pval(buf8, coord);
151 if (pval != d-1) 151 if (pval != d-1)
152 continue; 152 continue;
153 153
154 coord = (esep << INT64_C(11)) + eo; 154 coord = (esep << UINT64_C(11)) + eo;
155 done += gendata_eoesep_marksim( 155 done += gendata_eoesep_marksim(
156 coord, d, buf8, esep_classes); 156 coord, d, buf8, esep_classes);
157 } 157 }
@@ -169,19 +169,19 @@ gendata_eoesep_fromnew(
169) 169)
170{ 170{
171 uint8_t pval; 171 uint8_t pval;
172 int64_t i, esep, eo, coord, done; 172 uint64_t i, esep, eo, coord, done;
173 cube_t c; 173 cube_t c;
174 174
175 done = 0; 175 done = 0;
176 for (i = 0; i < (int64_t)ESEP_CLASSES; i++) { 176 for (i = 0; i < ESEP_CLASSES; i++) {
177 esep = rep[i]; 177 esep = rep[i];
178 for (eo = 0; eo < POW_2_11; eo++) { 178 for (eo = 0; eo < POW_2_11; eo++) {
179 coord = (i << INT64_C(11)) + eo; 179 coord = (i << UINT64_C(11)) + eo;
180 pval = get_eoesep_pval(buf8, coord); 180 pval = get_eoesep_pval(buf8, coord);
181 if (pval != 15) 181 if (pval != 15)
182 continue; 182 continue;
183 183
184 c = invcoord_eoesep((esep << INT64_C(11)) + eo); 184 c = invcoord_eoesep((esep << UINT64_C(11)) + eo);
185 if (gendata_eoesep_next(c, d, buf8, esep_classes)) { 185 if (gendata_eoesep_next(c, d, buf8, esep_classes)) {
186 set_eoesep_pval(buf8, coord, d); 186 set_eoesep_pval(buf8, coord, d);
187 done++; 187 done++;
@@ -194,7 +194,7 @@ gendata_eoesep_fromnew(
194 194
195STATIC uint32_t 195STATIC uint32_t
196gendata_eoesep_marksim( 196gendata_eoesep_marksim(
197 int64_t i, 197 uint64_t i,
198 uint8_t d, 198 uint8_t d,
199 uint8_t buf8[static EOESEP_BUF], 199 uint8_t buf8[static EOESEP_BUF],
200 uint32_t esep_classes[static ESEP_MAX] 200 uint32_t esep_classes[static ESEP_MAX]
@@ -232,7 +232,7 @@ gendata_eoesep_next(
232) 232)
233{ 233{
234 uint8_t m, t, pval; 234 uint8_t m, t, pval;
235 int64_t coord; 235 uint64_t coord;
236 cube_t moved, transformed; 236 cube_t moved, transformed;
237 237
238 for (t = 0; t < NTRANS; t++) { 238 for (t = 0; t < NTRANS; t++) {
@@ -252,7 +252,7 @@ gendata_eoesep_next(
252STATIC uint8_t 252STATIC uint8_t
253get_eoesep_pval( 253get_eoesep_pval(
254 const uint8_t table[static DIV_ROUND_UP(EOESEP_TABLESIZE, 2)], 254 const uint8_t table[static DIV_ROUND_UP(EOESEP_TABLESIZE, 2)],
255 int64_t i 255 uint64_t i
256) 256)
257{ 257{
258 return (table[EOESEP_INDEX(i)] & EOESEP_MASK(i)) >> EOESEP_SHIFT(i); 258 return (table[EOESEP_INDEX(i)] & EOESEP_MASK(i)) >> EOESEP_SHIFT(i);
@@ -261,7 +261,7 @@ get_eoesep_pval(
261STATIC uint8_t 261STATIC uint8_t
262get_eoesep_pval_cube(const unsigned char *data, cube_t c) 262get_eoesep_pval_cube(const unsigned char *data, cube_t c)
263{ 263{
264 int64_t coord; 264 uint64_t coord;
265 265
266 coord = coord_eoesep_sym(c, (const uint32_t *)data); 266 coord = coord_eoesep_sym(c, (const uint32_t *)data);
267 267
@@ -271,7 +271,7 @@ get_eoesep_pval_cube(const unsigned char *data, cube_t c)
271STATIC void 271STATIC void
272set_eoesep_pval( 272set_eoesep_pval(
273 uint8_t table[static DIV_ROUND_UP(EOESEP_TABLESIZE, 2)], 273 uint8_t table[static DIV_ROUND_UP(EOESEP_TABLESIZE, 2)],
274 int64_t i, 274 uint64_t i,
275 uint8_t val 275 uint8_t val
276) 276)
277{ 277{

Generated with cgit - Back to sebastiano.tronto.net