aboutsummaryrefslogtreecommitdiff
path: root/src/solvers/h48/gendata_cocsep.h
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2024-08-27 21:44:19 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2024-08-27 21:44:19 +0200
commit1983bacfbb84e2a410ebe663ac1fa7c1b22eb096 (patch)
tree106ddc90aa7aa92558415f89a8b39076ab508364 /src/solvers/h48/gendata_cocsep.h
parent30526a688c8c8e9ffed34a07e959322f75bc639b (diff)
parentb5efa2c7bfa259f1b9f5afa68349e2742427de80 (diff)
downloadnissy-core-1983bacfbb84e2a410ebe663ac1fa7c1b22eb096.tar.gz
nissy-core-1983bacfbb84e2a410ebe663ac1fa7c1b22eb096.zip
Merge branch 'master' of tronto.net:h48
Diffstat (limited to 'src/solvers/h48/gendata_cocsep.h')
-rw-r--r--src/solvers/h48/gendata_cocsep.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/solvers/h48/gendata_cocsep.h b/src/solvers/h48/gendata_cocsep.h
index 13ce68b..0f96da9 100644
--- a/src/solvers/h48/gendata_cocsep.h
+++ b/src/solvers/h48/gendata_cocsep.h
@@ -18,13 +18,13 @@ typedef struct {
18 uint8_t *visited; 18 uint8_t *visited;
19 uint64_t *selfsim; 19 uint64_t *selfsim;
20 cube_t *rep; 20 cube_t *rep;
21} dfsarg_cocsep_t; 21} cocsep_dfs_arg_t;
22 22
23_static_inline bool get_visited(const uint8_t *, int64_t); 23_static_inline bool get_visited(const uint8_t *, int64_t);
24_static_inline void set_visited(uint8_t *, int64_t); 24_static_inline void set_visited(uint8_t *, int64_t);
25 25
26_static size_t gendata_cocsep(void *, uint64_t *, cube_t *); 26_static size_t gendata_cocsep(void *, uint64_t *, cube_t *);
27_static uint32_t gendata_cocsep_dfs(dfsarg_cocsep_t *); 27_static uint32_t gendata_cocsep_dfs(cocsep_dfs_arg_t *);
28 28
29_static_inline int8_t get_h48_cdata(cube_t, uint32_t *, uint32_t *); 29_static_inline int8_t get_h48_cdata(cube_t, uint32_t *, uint32_t *);
30 30
@@ -45,7 +45,7 @@ gendata_cocsep(void *buf, uint64_t *selfsim, cube_t *rep)
45 uint32_t *buf32, *info, cc; 45 uint32_t *buf32, *info, cc;
46 uint16_t n; 46 uint16_t n;
47 uint8_t i, j, visited[COCSEP_VISITEDSIZE]; 47 uint8_t i, j, visited[COCSEP_VISITEDSIZE];
48 dfsarg_cocsep_t arg; 48 cocsep_dfs_arg_t arg;
49 49
50 if (buf == NULL) 50 if (buf == NULL)
51 goto gendata_cocsep_return_size; 51 goto gendata_cocsep_return_size;
@@ -56,7 +56,7 @@ gendata_cocsep(void *buf, uint64_t *selfsim, cube_t *rep)
56 if (selfsim != NULL) 56 if (selfsim != NULL)
57 memset(selfsim, 0, sizeof(uint64_t) * COCSEP_CLASSES); 57 memset(selfsim, 0, sizeof(uint64_t) * COCSEP_CLASSES);
58 58
59 arg = (dfsarg_cocsep_t) { 59 arg = (cocsep_dfs_arg_t) {
60 .cube = solved, 60 .cube = solved,
61 .n = &n, 61 .n = &n,
62 .buf32 = buf32, 62 .buf32 = buf32,
@@ -92,14 +92,14 @@ gendata_cocsep_return_size:
92} 92}
93 93
94_static uint32_t 94_static uint32_t
95gendata_cocsep_dfs(dfsarg_cocsep_t *arg) 95gendata_cocsep_dfs(cocsep_dfs_arg_t *arg)
96{ 96{
97 uint8_t m; 97 uint8_t m;
98 uint32_t cc, class, ttrep, depth, olddepth, tinv; 98 uint32_t cc, class, ttrep, depth, olddepth, tinv;
99 uint64_t t; 99 uint64_t t;
100 int64_t i, j; 100 int64_t i, j;
101 cube_t d; 101 cube_t d;
102 dfsarg_cocsep_t nextarg; 102 cocsep_dfs_arg_t nextarg;
103 103
104 i = coord_cocsep(arg->cube); 104 i = coord_cocsep(arg->cube);
105 olddepth = (uint8_t)(arg->buf32[i] & 0xFF); 105 olddepth = (uint8_t)(arg->buf32[i] & 0xFF);
@@ -135,7 +135,7 @@ gendata_cocsep_dfs(dfsarg_cocsep_t *arg)
135 return cc; 135 return cc;
136 } 136 }
137 137
138 memcpy(&nextarg, arg, sizeof(dfsarg_cocsep_t)); 138 memcpy(&nextarg, arg, sizeof(cocsep_dfs_arg_t));
139 nextarg.depth++; 139 nextarg.depth++;
140 for (m = 0, cc = 0; m < 18; m++) { 140 for (m = 0, cc = 0; m < 18; m++) {
141 nextarg.cube = move(arg->cube, m); 141 nextarg.cube = move(arg->cube, m);

Generated with cgit - Back to sebastiano.tronto.net