aboutsummaryrefslogtreecommitdiff
path: root/src/solvers/h48
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2024-09-05 10:04:34 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2024-09-05 10:04:34 +0200
commitb17411249b17133f35833c202e6c2e4bf43b3298 (patch)
tree3417a006ee5207b4ff9a2bfcc4bc971853d24577 /src/solvers/h48
parentfd5ddb3db9f50411ca579d84f225f265ca35b56a (diff)
downloadnissy-core-b17411249b17133f35833c202e6c2e4bf43b3298.tar.gz
nissy-core-b17411249b17133f35833c202e6c2e4bf43b3298.zip
More renaming
Diffstat (limited to 'src/solvers/h48')
-rw-r--r--src/solvers/h48/coordinate.h2
-rw-r--r--src/solvers/h48/gendata_cocsep.h2
-rw-r--r--src/solvers/h48/gendata_h48.h10
-rw-r--r--src/solvers/h48/map.h2
4 files changed, 8 insertions, 8 deletions
diff --git a/src/solvers/h48/coordinate.h b/src/solvers/h48/coordinate.h
index 4da5575..25e13f9 100644
--- a/src/solvers/h48/coordinate.h
+++ b/src/solvers/h48/coordinate.h
@@ -51,7 +51,7 @@ invcoord_h48(int64_t i, const cube_t *crep, uint8_t h)
51 cube_t ret; 51 cube_t ret;
52 int64_t hh, coclass, ee, esep, eo; 52 int64_t hh, coclass, ee, esep, eo;
53 53
54 DBG_ASSERT(h <= 11, zero, 54 DBG_ASSERT(h <= 11, ZERO_CUBE,
55 "invcoord_h48: h must be between 0 and 11\n"); 55 "invcoord_h48: h must be between 0 and 11\n");
56 56
57 hh = (int64_t)h; 57 hh = (int64_t)h;
diff --git a/src/solvers/h48/gendata_cocsep.h b/src/solvers/h48/gendata_cocsep.h
index 54e092e..4a9b67e 100644
--- a/src/solvers/h48/gendata_cocsep.h
+++ b/src/solvers/h48/gendata_cocsep.h
@@ -57,7 +57,7 @@ gendata_cocsep(void *buf, uint64_t *selfsim, cube_t *rep)
57 memset(selfsim, 0, sizeof(uint64_t) * COCSEP_CLASSES); 57 memset(selfsim, 0, sizeof(uint64_t) * COCSEP_CLASSES);
58 58
59 arg = (cocsep_dfs_arg_t) { 59 arg = (cocsep_dfs_arg_t) {
60 .cube = solved, 60 .cube = SOLVED_CUBE,
61 .n = &n, 61 .n = &n,
62 .buf32 = buf32, 62 .buf32 = buf32,
63 .visited = visited, 63 .visited = visited,
diff --git a/src/solvers/h48/gendata_h48.h b/src/solvers/h48/gendata_h48.h
index 0778b3c..51f49b8 100644
--- a/src/solvers/h48/gendata_h48.h
+++ b/src/solvers/h48/gendata_h48.h
@@ -1,7 +1,7 @@
1#define H48_COORDMAX_NOEO ((int64_t)(COCSEP_CLASSES * COMB_12_4 * COMB_8_4)) 1#define H48_COORDMAX_NOEO ((int64_t)(COCSEP_CLASSES * COMB_12_4 * COMB_8_4))
2#define H48_COORDMAX(h) ((int64_t)(H48_COORDMAX_NOEO << (int64_t)(h))) 2#define H48_COORDMAX(h) ((int64_t)(H48_COORDMAX_NOEO << (int64_t)(h)))
3#define H48_DIV(k) ((size_t)8 / (size_t)(k)) 3#define H48_DIV(k) ((size_t)8 / (size_t)(k))
4#define H48_TABLESIZE(h, k) _div_round_up((size_t)H48_COORDMAX((h)), H48_DIV(k)) 4#define H48_TABLESIZE(h, k) DIV_ROUND_UP((size_t)H48_COORDMAX((h)), H48_DIV(k))
5 5
6#define H48_COEFF(k) (UINT32_C(32) / (uint32_t)(k)) 6#define H48_COEFF(k) (UINT32_C(32) / (uint32_t)(k))
7#define H48_INDEX(i, k) ((uint32_t)(i) / H48_COEFF(k)) 7#define H48_INDEX(i, k) ((uint32_t)(i) / H48_COEFF(k))
@@ -97,7 +97,7 @@ gen_h48short(gendata_h48short_arg_t *arg)
97 kvpair_t kv; 97 kvpair_t kv;
98 cube_t cube, d; 98 cube_t cube, d;
99 99
100 cube = solvedcube(); 100 cube = SOLVED_CUBE;
101 coord = coord_h48(cube, arg->cocsepdata, 11); 101 coord = coord_h48(cube, arg->cocsepdata, 11);
102 h48map_insertmin(arg->map, coord, 0); 102 h48map_insertmin(arg->map, coord, 0);
103 oldn = 0; 103 oldn = 0;
@@ -175,7 +175,7 @@ gendata_h48h0k4(gendata_h48_arg_t *arg)
175 goto gendata_h48h0k4_return_size; 175 goto gendata_h48h0k4_return_size;
176 176
177 esep_max = (int64_t)H48_COORDMAX(0); 177 esep_max = (int64_t)H48_COORDMAX(0);
178 sc = coord_h48(solved, arg->cocsepdata, 0); 178 sc = coord_h48(SOLVED_CUBE, arg->cocsepdata, 0);
179 set_esep_pval(arg->h48data, sc, 4, 0); 179 set_esep_pval(arg->h48data, sc, 4, 0);
180 arg->info[1] = 1; 180 arg->info[1] = 1;
181 bfsarg = (h48h0k4_bfs_arg_t) { 181 bfsarg = (h48h0k4_bfs_arg_t) {
@@ -331,7 +331,7 @@ gendata_h48k2(gendata_h48_arg_t *arg)
331 .base = base[arg->h], 331 .base = base[arg->h],
332 .depth = shortdepth, 332 .depth = shortdepth,
333 .shortdepth = shortdepth, 333 .shortdepth = shortdepth,
334 .maxdepth = _min(arg->maxdepth, base[arg->h]+2), 334 .maxdepth = MIN(arg->maxdepth, base[arg->h]+2),
335 .cocsepdata = arg->cocsepdata, 335 .cocsepdata = arg->cocsepdata,
336 .h48data = arg->h48data, 336 .h48data = arg->h48data,
337 .selfsim = arg->selfsim, 337 .selfsim = arg->selfsim,
@@ -381,7 +381,7 @@ gendata_h48k2_dfs(h48k2_dfs_arg_t *arg)
381 oldval = get_esep_pval(arg->h48data, coord, arg->k); 381 oldval = get_esep_pval(arg->h48data, coord, arg->k);
382 newval = arg->depth >= arg->base ? arg->depth - arg->base : 0; 382 newval = arg->depth >= arg->base ? arg->depth - arg->base : 0;
383 set_esep_pval( 383 set_esep_pval(
384 arg->h48data, coord, arg->k, _min(oldval, newval)); 384 arg->h48data, coord, arg->k, MIN(oldval, newval));
385 ) 385 )
386 386
387 fullcoord = coord_h48(arg->cube, arg->cocsepdata, 11); /* Necessary? */ 387 fullcoord = coord_h48(arg->cube, arg->cocsepdata, 11); /* Necessary? */
diff --git a/src/solvers/h48/map.h b/src/solvers/h48/map.h
index 34416fc..baffe39 100644
--- a/src/solvers/h48/map.h
+++ b/src/solvers/h48/map.h
@@ -67,7 +67,7 @@ h48map_insertmin(h48map_t *map, uint64_t key, uint64_t val)
67 67
68 i = h48map_lookup(map, key); 68 i = h48map_lookup(map, key);
69 oldval = map->table[i] >> MAP_KEYSHIFT; 69 oldval = map->table[i] >> MAP_KEYSHIFT;
70 min = _min(val, oldval); 70 min = MIN(val, oldval);
71 71
72 map->n += map->table[i] == MAP_UNSET; 72 map->n += map->table[i] == MAP_UNSET;
73 map->table[i] = (key & MAP_KEYMASK) | (min << MAP_KEYSHIFT); 73 map->table[i] = (key & MAP_KEYMASK) | (min << MAP_KEYSHIFT);

Generated with cgit - Back to sebastiano.tronto.net