aboutsummaryrefslogtreecommitdiff
path: root/src/solvers
diff options
context:
space:
mode:
Diffstat (limited to 'src/solvers')
-rw-r--r--src/solvers/coord/common.h30
-rw-r--r--src/solvers/coord/gendata.h32
-rw-r--r--src/solvers/coord/htr.h4
-rw-r--r--src/solvers/coord/multisolve.h20
-rw-r--r--src/solvers/coord/solve.h24
-rw-r--r--src/solvers/coord/types_macros.h4
-rw-r--r--src/solvers/coord/utils.h4
-rw-r--r--src/solvers/dispatch.h4
-rw-r--r--src/solvers/distribution.h14
-rw-r--r--src/solvers/h48/coordinate.h8
-rw-r--r--src/solvers/h48/distribution_h48.h6
-rw-r--r--src/solvers/h48/gendata_cocsep.h16
-rw-r--r--src/solvers/h48/gendata_eoesep.h54
-rw-r--r--src/solvers/h48/gendata_h48.h32
-rw-r--r--src/solvers/h48/map.h28
-rw-r--r--src/solvers/h48/solve.h60
-rw-r--r--src/solvers/h48/utils.h8
-rw-r--r--src/solvers/solutions.h78
-rw-r--r--src/solvers/tables.h24
19 files changed, 225 insertions, 225 deletions
diff --git a/src/solvers/coord/common.h b/src/solvers/coord/common.h
index d154636..593641f 100644
--- a/src/solvers/coord/common.h
+++ b/src/solvers/coord/common.h
@@ -1,16 +1,16 @@
1STATIC uint64_t coord_coord_generic( 1STATIC uint64_t coord_coord_generic(
2 const coord_t [static 1], cube_t, const unsigned char *); 2 const coord_t [NON_NULL], cube_t, const unsigned char *);
3STATIC cube_t coord_cube_generic( 3STATIC cube_t coord_cube_generic(
4 const coord_t [static 1], uint64_t, const unsigned char *); 4 const coord_t [NON_NULL], uint64_t, const unsigned char *);
5STATIC bool coord_isnasty_generic( 5STATIC bool coord_isnasty_generic(
6 const coord_t [static 1], uint64_t, const unsigned char *); 6 const coord_t [NON_NULL], uint64_t, const unsigned char *);
7STATIC size_t coord_gendata_generic(const coord_t [static 1], unsigned char *); 7STATIC size_t coord_gendata_generic(const coord_t [NON_NULL], unsigned char *);
8 8
9STATIC bool solution_lastqt_cw(const solution_moves_t [static 1]); 9STATIC bool solution_lastqt_cw(const solution_moves_t [NON_NULL]);
10STATIC bool coord_can_switch(const coord_t [static 1], const unsigned char *, 10STATIC bool coord_can_switch(const coord_t [NON_NULL], const unsigned char *,
11 size_t, const uint8_t *); 11 size_t, const uint8_t *);
12STATIC bool coord_is_solved( 12STATIC bool coord_is_solved(
13 const coord_t [static 1], uint64_t, const unsigned char *); 13 const coord_t [NON_NULL], uint64_t, const unsigned char *);
14 14
15STATIC cube_t coordinate_merge_ce(cube_t, cube_t); 15STATIC cube_t coordinate_merge_ce(cube_t, cube_t);
16STATIC cube_t coordinate_merge_ec(cube_t, cube_t); 16STATIC cube_t coordinate_merge_ec(cube_t, cube_t);
@@ -18,7 +18,7 @@ STATIC cube_t coordinate_merge_cpco(cube_t, cube_t);
18 18
19STATIC uint64_t 19STATIC uint64_t
20coord_coord_generic( 20coord_coord_generic(
21 const coord_t coord[static 1], 21 const coord_t coord[NON_NULL],
22 cube_t c, 22 cube_t c,
23 const unsigned char *data 23 const unsigned char *data
24) 24)
@@ -36,7 +36,7 @@ coord_coord_generic(
36 36
37STATIC cube_t 37STATIC cube_t
38coord_cube_generic( 38coord_cube_generic(
39 const coord_t coord[static 1], 39 const coord_t coord[NON_NULL],
40 uint64_t i, 40 uint64_t i,
41 const unsigned char *data 41 const unsigned char *data
42) 42)
@@ -54,7 +54,7 @@ coord_cube_generic(
54 54
55STATIC bool 55STATIC bool
56coord_isnasty_generic( 56coord_isnasty_generic(
57 const coord_t coord[static 1], 57 const coord_t coord[NON_NULL],
58 uint64_t i, 58 uint64_t i,
59 const unsigned char *data 59 const unsigned char *data
60) 60)
@@ -73,7 +73,7 @@ coord_isnasty_generic(
73 73
74STATIC size_t 74STATIC size_t
75coord_gendata_generic( 75coord_gendata_generic(
76 const coord_t coord[static 1], 76 const coord_t coord[NON_NULL],
77 unsigned char *data 77 unsigned char *data
78) 78)
79{ 79{
@@ -144,21 +144,21 @@ coord_gendata_generic(
144} 144}
145 145
146STATIC bool 146STATIC bool
147solution_lastqt_cw(const solution_moves_t s[static 1]) 147solution_lastqt_cw(const solution_moves_t s[NON_NULL])
148{ 148{
149 return are_lastmoves_singlecw(s->nmoves, s->moves) && 149 return are_lastmoves_singlecw(s->nmoves, s->moves) &&
150 are_lastmoves_singlecw(s->npremoves, s->premoves); 150 are_lastmoves_singlecw(s->npremoves, s->premoves);
151} 151}
152 152
153STATIC bool 153STATIC bool
154solution_always_valid(const solution_moves_t s[static 1]) 154solution_always_valid(const solution_moves_t s[NON_NULL])
155{ 155{
156 return true; 156 return true;
157} 157}
158 158
159STATIC bool 159STATIC bool
160coord_can_switch( 160coord_can_switch(
161 const coord_t coord[static 1], 161 const coord_t coord[NON_NULL],
162 const unsigned char *data, 162 const unsigned char *data,
163 size_t n, 163 size_t n,
164 const uint8_t *moves 164 const uint8_t *moves
@@ -192,7 +192,7 @@ coord_can_switch(
192 192
193STATIC bool 193STATIC bool
194coord_is_solved( 194coord_is_solved(
195 const coord_t coord[static 1], 195 const coord_t coord[NON_NULL],
196 uint64_t i, 196 uint64_t i,
197 const unsigned char *data 197 const unsigned char *data
198) 198)
diff --git a/src/solvers/coord/gendata.h b/src/solvers/coord/gendata.h
index cbc8774..f803044 100644
--- a/src/solvers/coord/gendata.h
+++ b/src/solvers/coord/gendata.h
@@ -1,21 +1,21 @@
1STATIC size_t gendata_coord(const coord_t [static 1], unsigned char *); 1STATIC size_t gendata_coord(const coord_t [NON_NULL], unsigned char *);
2STATIC size_t gendata_multicoord( 2STATIC size_t gendata_multicoord(
3 const multicoord_t [static 1], unsigned char *); 3 const multicoord_t [NON_NULL], unsigned char *);
4STATIC long long gendata_coord_dispatch(const char *, unsigned long long, 4STATIC long long gendata_coord_dispatch(const char *, unsigned long long,
5 unsigned char *); 5 unsigned char *);
6STATIC tableinfo_t genptable_coord( 6STATIC tableinfo_t genptable_coord(
7 const coord_t [static 1], const unsigned char *, unsigned char *); 7 const coord_t [NON_NULL], const unsigned char *, unsigned char *);
8STATIC uint64_t genptable_coord_init_solved( 8STATIC uint64_t genptable_coord_init_solved(
9 const coord_t [static 1], const unsigned char *, unsigned char *); 9 const coord_t [NON_NULL], const unsigned char *, unsigned char *);
10STATIC bool switch_to_fromnew(uint64_t, uint64_t, uint64_t); 10STATIC bool switch_to_fromnew(uint64_t, uint64_t, uint64_t);
11STATIC uint64_t genptable_coord_fillneighbors(const coord_t [static 1], 11STATIC uint64_t genptable_coord_fillneighbors(const coord_t [NON_NULL],
12 const unsigned char *, uint64_t, uint8_t, unsigned char *); 12 const unsigned char *, uint64_t, uint8_t, unsigned char *);
13STATIC uint64_t genptable_coord_fillfromnew(const coord_t [static 1], 13STATIC uint64_t genptable_coord_fillfromnew(const coord_t [NON_NULL],
14 const unsigned char *, uint64_t, uint8_t, unsigned char *); 14 const unsigned char *, uint64_t, uint8_t, unsigned char *);
15STATIC uint8_t get_coord_pval( 15STATIC uint8_t get_coord_pval(
16 const coord_t [static 1], const unsigned char *, uint64_t); 16 const coord_t [NON_NULL], const unsigned char *, uint64_t);
17STATIC void set_coord_pval( 17STATIC void set_coord_pval(
18 const coord_t [static 1], unsigned char *, uint64_t, uint8_t); 18 const coord_t [NON_NULL], unsigned char *, uint64_t, uint8_t);
19 19
20STATIC long long 20STATIC long long
21gendata_coord_dispatch( 21gendata_coord_dispatch(
@@ -40,7 +40,7 @@ gendata_coord_dispatch(
40} 40}
41 41
42STATIC size_t 42STATIC size_t
43gendata_coord(const coord_t coord[static 1], unsigned char *buf) 43gendata_coord(const coord_t coord[NON_NULL], unsigned char *buf)
44{ 44{
45 uint64_t coord_dsize, tablesize, ninfo; 45 uint64_t coord_dsize, tablesize, ninfo;
46 unsigned char *pruningbuf, *coord_data; 46 unsigned char *pruningbuf, *coord_data;
@@ -96,7 +96,7 @@ gendata_coord_error:
96} 96}
97 97
98STATIC size_t 98STATIC size_t
99gendata_multicoord(const multicoord_t mcoord[static 1], unsigned char *buf) 99gendata_multicoord(const multicoord_t mcoord[NON_NULL], unsigned char *buf)
100{ 100{
101 unsigned char *b; 101 unsigned char *b;
102 size_t i, s, ret; 102 size_t i, s, ret;
@@ -141,7 +141,7 @@ gendata_multicoord(const multicoord_t mcoord[static 1], unsigned char *buf)
141 141
142STATIC tableinfo_t 142STATIC tableinfo_t
143genptable_coord( 143genptable_coord(
144 const coord_t coord[static 1], 144 const coord_t coord[NON_NULL],
145 const unsigned char *data, 145 const unsigned char *data,
146 unsigned char *table 146 unsigned char *table
147) 147)
@@ -204,7 +204,7 @@ genptable_coord(
204 204
205STATIC uint64_t 205STATIC uint64_t
206genptable_coord_init_solved( 206genptable_coord_init_solved(
207 const coord_t coord[static 1], 207 const coord_t coord[NON_NULL],
208 const unsigned char *coord_data, 208 const unsigned char *coord_data,
209 unsigned char *table 209 unsigned char *table
210) 210)
@@ -238,7 +238,7 @@ switch_to_fromnew(uint64_t done, uint64_t max, uint64_t nm)
238 238
239STATIC uint64_t 239STATIC uint64_t
240genptable_coord_fillneighbors( 240genptable_coord_fillneighbors(
241 const coord_t coord[static 1], 241 const coord_t coord[NON_NULL],
242 const unsigned char *data, 242 const unsigned char *data,
243 uint64_t i, 243 uint64_t i,
244 uint8_t d, 244 uint8_t d,
@@ -276,7 +276,7 @@ genptable_coord_fillneighbors(
276 276
277STATIC uint64_t 277STATIC uint64_t
278genptable_coord_fillfromnew( 278genptable_coord_fillfromnew(
279 const coord_t coord[static 1], 279 const coord_t coord[NON_NULL],
280 const unsigned char *data, 280 const unsigned char *data,
281 uint64_t i, 281 uint64_t i,
282 uint8_t d, 282 uint8_t d,
@@ -331,7 +331,7 @@ genptable_coord_fillfromnew(
331 331
332STATIC uint8_t 332STATIC uint8_t
333get_coord_pval( 333get_coord_pval(
334 const coord_t coord[static 1], 334 const coord_t coord[NON_NULL],
335 const unsigned char *table, 335 const unsigned char *table,
336 uint64_t i 336 uint64_t i
337) 337)
@@ -341,7 +341,7 @@ get_coord_pval(
341 341
342STATIC void 342STATIC void
343set_coord_pval( 343set_coord_pval(
344 const coord_t coord[static 1], 344 const coord_t coord[NON_NULL],
345 unsigned char *table, 345 unsigned char *table,
346 uint64_t i, 346 uint64_t i,
347 uint8_t val 347 uint8_t val
diff --git a/src/solvers/coord/htr.h b/src/solvers/coord/htr.h
index cfd451b..602625b 100644
--- a/src/solvers/coord/htr.h
+++ b/src/solvers/coord/htr.h
@@ -4,7 +4,7 @@ STATIC bool coordinate_htr_isnasty(uint64_t, const unsigned char *);
4STATIC size_t coordinate_htr_gendata(unsigned char *); 4STATIC size_t coordinate_htr_gendata(unsigned char *);
5 5
6STATIC bool htr_checkmoves(bool *, uint8_t, const uint8_t *); 6STATIC bool htr_checkmoves(bool *, uint8_t, const uint8_t *);
7STATIC bool htr_solution_prune(const solution_moves_t [static 1]); 7STATIC bool htr_solution_prune(const solution_moves_t [NON_NULL]);
8STATIC bool is_cp_htr(uint64_t, const unsigned char *); 8STATIC bool is_cp_htr(uint64_t, const unsigned char *);
9 9
10STATIC coord_t coordinate_htr = { 10STATIC coord_t coordinate_htr = {
@@ -97,7 +97,7 @@ htr_checkmoves(bool *f, uint8_t n, const uint8_t *moves)
97} 97}
98 98
99STATIC bool 99STATIC bool
100htr_solution_prune(const solution_moves_t s[static 1]) 100htr_solution_prune(const solution_moves_t s[NON_NULL])
101{ 101{
102 bool f; 102 bool f;
103 103
diff --git a/src/solvers/coord/multisolve.h b/src/solvers/coord/multisolve.h
index a45bd6a..28f03bb 100644
--- a/src/solvers/coord/multisolve.h
+++ b/src/solvers/coord/multisolve.h
@@ -16,20 +16,20 @@ typedef struct {
16 const unsigned char *ptable[MAX_MULTICOORD_NCOORDS]; 16 const unsigned char *ptable[MAX_MULTICOORD_NCOORDS];
17} dfsarg_solve_multicoord_t; 17} dfsarg_solve_multicoord_t;
18 18
19STATIC int64_t solve_multicoord(oriented_cube_t, multicoord_t [static 1], 19STATIC int64_t solve_multicoord(oriented_cube_t, multicoord_t [NON_NULL],
20 uint8_t, uint8_t, uint8_t, uint64_t, uint8_t, uint8_t, uint64_t, 20 uint8_t, uint8_t, uint8_t, uint64_t, uint8_t, uint8_t, uint64_t,
21 const unsigned char *, size_t, char *, int (*)(void *), void *); 21 const unsigned char *, size_t, char *, int (*)(void *), void *);
22STATIC long long solve_multicoord_dispatch(oriented_cube_t, const char *, 22STATIC long long solve_multicoord_dispatch(oriented_cube_t, const char *,
23 unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, 23 unsigned, unsigned, unsigned, unsigned, unsigned, unsigned,
24 unsigned long long, const unsigned char *, unsigned, char *, 24 unsigned long long, const unsigned char *, unsigned, char *,
25 long long [static NISSY_SIZE_SOLVE_STATS], int (*)(void *), void *); 25 long long [SIZE(NISSY_SIZE_SOLVE_STATS)], int (*)(void *), void *);
26STATIC bool multicoord_solution_admissible( 26STATIC bool multicoord_solution_admissible(
27 const dfsarg_solve_multicoord_t [static 1]); 27 const dfsarg_solve_multicoord_t [NON_NULL]);
28STATIC bool multicoord_dfs_stop(const dfsarg_solve_multicoord_t [static 1]); 28STATIC bool multicoord_dfs_stop(const dfsarg_solve_multicoord_t [NON_NULL]);
29STATIC int64_t solve_multicoord_dfs(dfsarg_solve_multicoord_t [static 1]); 29STATIC int64_t solve_multicoord_dfs(dfsarg_solve_multicoord_t [NON_NULL]);
30 30
31STATIC bool 31STATIC bool
32multicoord_solution_admissible(const dfsarg_solve_multicoord_t arg[static 1]) 32multicoord_solution_admissible(const dfsarg_solve_multicoord_t arg[NON_NULL])
33{ 33{
34 uint8_t n, i; 34 uint8_t n, i;
35 const coord_t *c; 35 const coord_t *c;
@@ -49,7 +49,7 @@ multicoord_solution_admissible(const dfsarg_solve_multicoord_t arg[static 1])
49} 49}
50 50
51STATIC bool 51STATIC bool
52multicoord_dfs_stop(const dfsarg_solve_multicoord_t arg[static 1]) 52multicoord_dfs_stop(const dfsarg_solve_multicoord_t arg[NON_NULL])
53{ 53{
54 uint8_t pval, i; 54 uint8_t pval, i;
55 uint64_t cval; 55 uint64_t cval;
@@ -69,7 +69,7 @@ multicoord_dfs_stop(const dfsarg_solve_multicoord_t arg[static 1])
69} 69}
70 70
71STATIC int64_t 71STATIC int64_t
72solve_multicoord_dfs(dfsarg_solve_multicoord_t arg[static 1]) 72solve_multicoord_dfs(dfsarg_solve_multicoord_t arg[NON_NULL])
73{ 73{
74 uint8_t m, l, i; 74 uint8_t m, l, i;
75 uint32_t mm; 75 uint32_t mm;
@@ -141,7 +141,7 @@ solve_multicoord_dispatch(
141 const unsigned char *data, 141 const unsigned char *data,
142 unsigned solutions_size, 142 unsigned solutions_size,
143 char *sols, 143 char *sols,
144 long long stats[static NISSY_SIZE_SOLVE_STATS], 144 long long stats[SIZE(NISSY_SIZE_SOLVE_STATS)],
145 int (*poll_status)(void *), 145 int (*poll_status)(void *),
146 void *poll_status_data 146 void *poll_status_data
147) 147)
@@ -171,7 +171,7 @@ solve_multicoord_dispatch(
171STATIC int64_t 171STATIC int64_t
172solve_multicoord( 172solve_multicoord(
173 oriented_cube_t oc, 173 oriented_cube_t oc,
174 multicoord_t mcoord [static 1], 174 multicoord_t mcoord [NON_NULL],
175 uint8_t trans, 175 uint8_t trans,
176 uint8_t minmoves, 176 uint8_t minmoves,
177 uint8_t maxmoves, 177 uint8_t maxmoves,
diff --git a/src/solvers/coord/solve.h b/src/solvers/coord/solve.h
index 9ea6d1a..fcdb06e 100644
--- a/src/solvers/coord/solve.h
+++ b/src/solvers/coord/solve.h
@@ -13,20 +13,20 @@ typedef struct {
13 const unsigned char *ptable; 13 const unsigned char *ptable;
14} dfsarg_solve_coord_t; 14} dfsarg_solve_coord_t;
15 15
16STATIC int64_t solve_coord(oriented_cube_t, coord_t [static 1], uint8_t, 16STATIC int64_t solve_coord(oriented_cube_t, coord_t [NON_NULL], uint8_t,
17 uint8_t, uint8_t, uint8_t, uint64_t, uint8_t, uint8_t, uint64_t, 17 uint8_t, uint8_t, uint8_t, uint64_t, uint8_t, uint8_t, uint64_t,
18 const unsigned char *, size_t, char *, int (*)(void *), void *); 18 const unsigned char *, size_t, char *, int (*)(void *), void *);
19STATIC long long solve_coord_dispatch(oriented_cube_t, const char *, unsigned, 19STATIC long long solve_coord_dispatch(oriented_cube_t, const char *, unsigned,
20 unsigned, unsigned, unsigned, unsigned, unsigned, unsigned long long, 20 unsigned, unsigned, unsigned, unsigned, unsigned, unsigned long long,
21 const unsigned char *, unsigned, char *, 21 const unsigned char *, unsigned, char *,
22 long long [static NISSY_SIZE_SOLVE_STATS], int (*)(void *), void *); 22 long long [SIZE(NISSY_SIZE_SOLVE_STATS)], int (*)(void *), void *);
23STATIC bool coord_solution_admissible(const dfsarg_solve_coord_t [static 1]); 23STATIC bool coord_solution_admissible(const dfsarg_solve_coord_t [NON_NULL]);
24STATIC bool coord_continue_onnormal(const dfsarg_solve_coord_t [static 1]); 24STATIC bool coord_continue_onnormal(const dfsarg_solve_coord_t [NON_NULL]);
25STATIC bool coord_continue_oninverse(const dfsarg_solve_coord_t [static 1]); 25STATIC bool coord_continue_oninverse(const dfsarg_solve_coord_t [NON_NULL]);
26STATIC int64_t solve_coord_dfs(dfsarg_solve_coord_t [static 1]); 26STATIC int64_t solve_coord_dfs(dfsarg_solve_coord_t [NON_NULL]);
27 27
28STATIC bool 28STATIC bool
29coord_solution_admissible(const dfsarg_solve_coord_t arg[static 1]) 29coord_solution_admissible(const dfsarg_solve_coord_t arg[NON_NULL])
30{ 30{
31 uint8_t n; 31 uint8_t n;
32 32
@@ -39,7 +39,7 @@ coord_solution_admissible(const dfsarg_solve_coord_t arg[static 1])
39} 39}
40 40
41STATIC bool 41STATIC bool
42coord_continue_onnormal(const dfsarg_solve_coord_t arg[static 1]) 42coord_continue_onnormal(const dfsarg_solve_coord_t arg[NON_NULL])
43{ 43{
44 uint8_t flag, nn, ni, swbound_n, swbound_i, pval; 44 uint8_t flag, nn, ni, swbound_n, swbound_i, pval;
45 uint64_t coord; 45 uint64_t coord;
@@ -93,7 +93,7 @@ coord_continue_onnormal(const dfsarg_solve_coord_t arg[static 1])
93} 93}
94 94
95STATIC bool 95STATIC bool
96coord_continue_oninverse(const dfsarg_solve_coord_t arg[static 1]) 96coord_continue_oninverse(const dfsarg_solve_coord_t arg[NON_NULL])
97{ 97{
98 uint8_t flag, nn, ni, swbound_n, swbound_i, pval; 98 uint8_t flag, nn, ni, swbound_n, swbound_i, pval;
99 uint64_t coord; 99 uint64_t coord;
@@ -147,7 +147,7 @@ coord_continue_oninverse(const dfsarg_solve_coord_t arg[static 1])
147} 147}
148 148
149STATIC int64_t 149STATIC int64_t
150solve_coord_dfs(dfsarg_solve_coord_t arg[static 1]) 150solve_coord_dfs(dfsarg_solve_coord_t arg[NON_NULL])
151{ 151{
152 bool lastbackup; 152 bool lastbackup;
153 uint8_t m, l, nnbackup, nibackup, nmoves; 153 uint8_t m, l, nnbackup, nibackup, nmoves;
@@ -258,7 +258,7 @@ solve_coord_dispatch(
258 const unsigned char *data, 258 const unsigned char *data,
259 unsigned solutions_size, 259 unsigned solutions_size,
260 char *sols, 260 char *sols,
261 long long stats[static NISSY_SIZE_SOLVE_STATS], 261 long long stats[SIZE(NISSY_SIZE_SOLVE_STATS)],
262 int (*poll_status)(void *), 262 int (*poll_status)(void *),
263 void *poll_status_data 263 void *poll_status_data
264) 264)
@@ -288,7 +288,7 @@ solve_coord_dispatch(
288STATIC int64_t 288STATIC int64_t
289solve_coord( 289solve_coord(
290 oriented_cube_t oc, 290 oriented_cube_t oc,
291 coord_t coord [static 1], 291 coord_t coord [NON_NULL],
292 uint8_t trans, 292 uint8_t trans,
293 uint8_t nissflag, 293 uint8_t nissflag,
294 uint8_t minmoves, 294 uint8_t minmoves,
diff --git a/src/solvers/coord/types_macros.h b/src/solvers/coord/types_macros.h
index b75fab8..81db9d4 100644
--- a/src/solvers/coord/types_macros.h
+++ b/src/solvers/coord/types_macros.h
@@ -27,8 +27,8 @@ typedef struct {
27 uint64_t moves_mask_gendata; 27 uint64_t moves_mask_gendata;
28 uint64_t moves_mask_solve; 28 uint64_t moves_mask_solve;
29 uint64_t trans_mask; 29 uint64_t trans_mask;
30 bool (*is_admissible)(const solution_moves_t[static 1]); 30 bool (*is_admissible)(const solution_moves_t[NON_NULL]);
31 bool (*solution_prune)(const solution_moves_t[static 1]); 31 bool (*solution_prune)(const solution_moves_t[NON_NULL]);
32 bool (*is_solvable)(cube_t); 32 bool (*is_solvable)(cube_t);
33 /* if is_solved is null, coord == 0 is used */ 33 /* if is_solved is null, coord == 0 is used */
34 bool (*is_solved)(uint64_t, const unsigned char *); 34 bool (*is_solved)(uint64_t, const unsigned char *);
diff --git a/src/solvers/coord/utils.h b/src/solvers/coord/utils.h
index c8a9338..0062587 100644
--- a/src/solvers/coord/utils.h
+++ b/src/solvers/coord/utils.h
@@ -2,7 +2,7 @@ STATIC coord_t *parse_coord(size_t, const char *);
2STATIC multicoord_t *parse_multicoord(size_t, const char *); 2STATIC multicoord_t *parse_multicoord(size_t, const char *);
3STATIC void parse_coord_and_trans( 3STATIC void parse_coord_and_trans(
4 const char *, coord_t **, multicoord_t **, uint8_t *); 4 const char *, coord_t **, multicoord_t **, uint8_t *);
5STATIC long long dataid_coord(const char *, char [static NISSY_SIZE_DATAID]); 5STATIC long long dataid_coord(const char *, char [SIZE(NISSY_SIZE_DATAID)]);
6 6
7STATIC coord_t * 7STATIC coord_t *
8parse_coord(size_t n, const char *coord) 8parse_coord(size_t n, const char *coord)
@@ -60,7 +60,7 @@ parse_coord_and_trans(
60} 60}
61 61
62STATIC long long 62STATIC long long
63dataid_coord(const char *ca, char dataid[static NISSY_SIZE_DATAID]) 63dataid_coord(const char *ca, char dataid[SIZE(NISSY_SIZE_DATAID)])
64{ 64{
65 coord_t *c; 65 coord_t *c;
66 multicoord_t *mc; 66 multicoord_t *mc;
diff --git a/src/solvers/dispatch.h b/src/solvers/dispatch.h
index 3184a28..810247f 100644
--- a/src/solvers/dispatch.h
+++ b/src/solvers/dispatch.h
@@ -1,7 +1,7 @@
1typedef struct { 1typedef struct {
2 const char *solvername; 2 const char *solvername;
3 const char *prefix; 3 const char *prefix;
4 long long (*dataid)(const char *, char [static NISSY_SIZE_DATAID]); 4 long long (*dataid)(const char *, char [SIZE(NISSY_SIZE_DATAID)]);
5 long long (*gendata)( 5 long long (*gendata)(
6 const char *, unsigned long long, unsigned char *); 6 const char *, unsigned long long, unsigned char *);
7 long long (*checkdata)( 7 long long (*checkdata)(
@@ -9,7 +9,7 @@ typedef struct {
9 long long (*solve)(oriented_cube_t, const char *, unsigned, unsigned, 9 long long (*solve)(oriented_cube_t, const char *, unsigned, unsigned,
10 unsigned, unsigned, unsigned, unsigned, unsigned long long, 10 unsigned, unsigned, unsigned, unsigned, unsigned long long,
11 const unsigned char *, unsigned, char *, 11 const unsigned char *, unsigned, char *,
12 long long [static NISSY_SIZE_SOLVE_STATS], 12 long long [SIZE(NISSY_SIZE_SOLVE_STATS)],
13 int (*)(void *), void *); 13 int (*)(void *), void *);
14} solver_dispatch_t; 14} solver_dispatch_t;
15 15
diff --git a/src/solvers/distribution.h b/src/solvers/distribution.h
index 78b9b5e..a996e3db 100644
--- a/src/solvers/distribution.h
+++ b/src/solvers/distribution.h
@@ -12,9 +12,9 @@ typedef struct {
12 12
13STATIC wrapthread_return_t getdistribution_runthread(void *); 13STATIC wrapthread_return_t getdistribution_runthread(void *);
14STATIC void getdistribution(const unsigned char *, 14STATIC void getdistribution(const unsigned char *,
15 uint64_t [static INFO_DISTRIBUTION_LEN], const tableinfo_t [static 1]); 15 uint64_t [SIZE(INFO_DISTRIBUTION_LEN)], const tableinfo_t [NON_NULL]);
16STATIC bool distribution_equal(const uint64_t [static INFO_DISTRIBUTION_LEN], 16STATIC bool distribution_equal(const uint64_t [SIZE(INFO_DISTRIBUTION_LEN)],
17 const uint64_t [static INFO_DISTRIBUTION_LEN], uint8_t); 17 const uint64_t [SIZE(INFO_DISTRIBUTION_LEN)], uint8_t);
18 18
19STATIC wrapthread_return_t 19STATIC wrapthread_return_t
20getdistribution_runthread(void *arg) 20getdistribution_runthread(void *arg)
@@ -39,8 +39,8 @@ getdistribution_runthread(void *arg)
39STATIC void 39STATIC void
40getdistribution( 40getdistribution(
41 const unsigned char *table, 41 const unsigned char *table,
42 uint64_t distr[static INFO_DISTRIBUTION_LEN], 42 uint64_t distr[SIZE(INFO_DISTRIBUTION_LEN)],
43 const tableinfo_t info[static 1] 43 const tableinfo_t info[NON_NULL]
44) { 44) {
45 getdistribution_data_t targ[THREADS]; 45 getdistribution_data_t targ[THREADS];
46 wrapthread_define_var_thread_t(thread[THREADS]); 46 wrapthread_define_var_thread_t(thread[THREADS]);
@@ -80,8 +80,8 @@ getdistribution(
80 80
81STATIC bool 81STATIC bool
82distribution_equal( 82distribution_equal(
83 const uint64_t expected[static INFO_DISTRIBUTION_LEN], 83 const uint64_t expected[SIZE(INFO_DISTRIBUTION_LEN)],
84 const uint64_t actual[static INFO_DISTRIBUTION_LEN], 84 const uint64_t actual[SIZE(INFO_DISTRIBUTION_LEN)],
85 uint8_t maxvalue 85 uint8_t maxvalue
86) 86)
87{ 87{
diff --git a/src/solvers/h48/coordinate.h b/src/solvers/h48/coordinate.h
index a7f0087..695efc3 100644
--- a/src/solvers/h48/coordinate.h
+++ b/src/solvers/h48/coordinate.h
@@ -1,13 +1,13 @@
1STATIC_INLINE uint64_t coord_h48( 1STATIC_INLINE uint64_t coord_h48(
2 cube_t, const uint32_t [static COCSEP_TABLESIZE], uint8_t); 2 cube_t, const uint32_t [SIZE(COCSEP_TABLESIZE)], uint8_t);
3STATIC_INLINE uint64_t coord_h48_edges(cube_t, uint64_t, uint8_t, uint8_t); 3STATIC_INLINE uint64_t coord_h48_edges(cube_t, uint64_t, uint8_t, uint8_t);
4STATIC_INLINE cube_t invcoord_h48( 4STATIC_INLINE cube_t invcoord_h48(
5 uint64_t, const cube_t [static COCSEP_CLASSES], uint8_t); 5 uint64_t, const cube_t [SIZE(COCSEP_CLASSES)], uint8_t);
6 6
7STATIC_INLINE uint64_t 7STATIC_INLINE uint64_t
8coord_h48( 8coord_h48(
9 cube_t c, 9 cube_t c,
10 const uint32_t cocsepdata[static COCSEP_TABLESIZE], 10 const uint32_t cocsepdata[SIZE(COCSEP_TABLESIZE)],
11 uint8_t h 11 uint8_t h
12) 12)
13{ 13{
@@ -47,7 +47,7 @@ returned cube is a transformed cube of one that gives the correct value.
47STATIC_INLINE cube_t 47STATIC_INLINE cube_t
48invcoord_h48( 48invcoord_h48(
49 uint64_t i, 49 uint64_t i,
50 const cube_t crep[static COCSEP_CLASSES], 50 const cube_t crep[SIZE(COCSEP_CLASSES)],
51 uint8_t h 51 uint8_t h
52) 52)
53{ 53{
diff --git a/src/solvers/h48/distribution_h48.h b/src/solvers/h48/distribution_h48.h
index 80c946e..2cb50aa 100644
--- a/src/solvers/h48/distribution_h48.h
+++ b/src/solvers/h48/distribution_h48.h
@@ -6,7 +6,7 @@ to have some duplication than to make these functions needlessly generic.
6 6
7STATIC wrapthread_return_t getdistribution_h48_runthread(void *); 7STATIC wrapthread_return_t getdistribution_h48_runthread(void *);
8STATIC void getdistribution_h48(const unsigned char *, 8STATIC void getdistribution_h48(const unsigned char *,
9 uint64_t [static INFO_DISTRIBUTION_LEN], const tableinfo_t [static 1]); 9 uint64_t [SIZE(INFO_DISTRIBUTION_LEN)], const tableinfo_t [NON_NULL]);
10 10
11STATIC wrapthread_return_t 11STATIC wrapthread_return_t
12getdistribution_h48_runthread(void *arg) 12getdistribution_h48_runthread(void *arg)
@@ -39,8 +39,8 @@ getdistribution_h48_runthread(void *arg)
39STATIC void 39STATIC void
40getdistribution_h48( 40getdistribution_h48(
41 const unsigned char *table, 41 const unsigned char *table,
42 uint64_t distr[static INFO_DISTRIBUTION_LEN], 42 uint64_t distr[SIZE(INFO_DISTRIBUTION_LEN)],
43 const tableinfo_t info[static 1] 43 const tableinfo_t info[NON_NULL]
44) { 44) {
45 getdistribution_data_t targ[THREADS]; 45 getdistribution_data_t targ[THREADS];
46 wrapthread_define_var_thread_t(thread[THREADS]); 46 wrapthread_define_var_thread_t(thread[THREADS]);
diff --git a/src/solvers/h48/gendata_cocsep.h b/src/solvers/h48/gendata_cocsep.h
index db7ac95..17568ea 100644
--- a/src/solvers/h48/gendata_cocsep.h
+++ b/src/solvers/h48/gendata_cocsep.h
@@ -1,13 +1,13 @@
1STATIC size_t gendata_cocsep(unsigned char *, uint64_t *, cube_t *); 1STATIC size_t gendata_cocsep(unsigned char *, uint64_t *, cube_t *);
2STATIC uint32_t gendata_cocsep_dfs(cocsep_dfs_arg_t [static 1]); 2STATIC uint32_t gendata_cocsep_dfs(cocsep_dfs_arg_t [NON_NULL]);
3 3
4STATIC_INLINE bool gendata_cocsep_get_visited( 4STATIC_INLINE bool gendata_cocsep_get_visited(
5 const uint8_t [static COCSEP_VISITEDSIZE], uint64_t); 5 const uint8_t [SIZE(COCSEP_VISITEDSIZE)], uint64_t);
6STATIC_INLINE void gendata_cocsep_set_visited( 6STATIC_INLINE void gendata_cocsep_set_visited(
7 uint8_t [static COCSEP_VISITEDSIZE], uint64_t); 7 uint8_t [SIZE(COCSEP_VISITEDSIZE)], uint64_t);
8 8
9STATIC_INLINE int8_t get_h48_cdata( 9STATIC_INLINE int8_t get_h48_cdata(
10 cube_t, const uint32_t [static COCSEP_TABLESIZE], uint32_t *); 10 cube_t, const uint32_t [SIZE(COCSEP_TABLESIZE)], uint32_t *);
11 11
12STATIC size_t 12STATIC size_t
13gendata_cocsep( 13gendata_cocsep(
@@ -79,7 +79,7 @@ gendata_cocsep_return_size:
79} 79}
80 80
81STATIC uint32_t 81STATIC uint32_t
82gendata_cocsep_dfs(cocsep_dfs_arg_t arg[static 1]) 82gendata_cocsep_dfs(cocsep_dfs_arg_t arg[NON_NULL])
83{ 83{
84 uint8_t m; 84 uint8_t m;
85 uint32_t cc, class, ttrep, depth, olddepth, tinv; 85 uint32_t cc, class, ttrep, depth, olddepth, tinv;
@@ -135,7 +135,7 @@ gendata_cocsep_dfs(cocsep_dfs_arg_t arg[static 1])
135 135
136STATIC_INLINE bool 136STATIC_INLINE bool
137gendata_cocsep_get_visited( 137gendata_cocsep_get_visited(
138 const uint8_t a[static COCSEP_VISITEDSIZE], 138 const uint8_t a[SIZE(COCSEP_VISITEDSIZE)],
139 uint64_t i 139 uint64_t i
140) 140)
141{ 141{
@@ -144,7 +144,7 @@ gendata_cocsep_get_visited(
144 144
145STATIC_INLINE void 145STATIC_INLINE void
146gendata_cocsep_set_visited( 146gendata_cocsep_set_visited(
147 uint8_t a[static COCSEP_VISITEDSIZE], 147 uint8_t a[SIZE(COCSEP_VISITEDSIZE)],
148 uint64_t i 148 uint64_t i
149) 149)
150{ 150{
@@ -154,7 +154,7 @@ gendata_cocsep_set_visited(
154STATIC_INLINE int8_t 154STATIC_INLINE int8_t
155get_h48_cdata( 155get_h48_cdata(
156 cube_t cube, 156 cube_t cube,
157 const uint32_t cocsepdata[static COCSEP_TABLESIZE], 157 const uint32_t cocsepdata[SIZE(COCSEP_TABLESIZE)],
158 uint32_t *cdata 158 uint32_t *cdata
159) 159)
160{ 160{
diff --git a/src/solvers/h48/gendata_eoesep.h b/src/solvers/h48/gendata_eoesep.h
index e9a2794..271e877 100644
--- a/src/solvers/h48/gendata_eoesep.h
+++ b/src/solvers/h48/gendata_eoesep.h
@@ -1,25 +1,25 @@
1STATIC uint64_t coord_eoesep_sym(cube_t, const uint32_t [static ESEP_MAX]); 1STATIC uint64_t coord_eoesep_sym(cube_t, const uint32_t [SIZE(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 [SIZE(ESEP_MAX)], uint16_t [SIZE(ESEP_CLASSES)]);
4STATIC size_t gendata_eoesep(unsigned char *, uint8_t); 4STATIC size_t gendata_eoesep(unsigned char *, uint8_t);
5STATIC uint32_t gendata_eoesep_bfs(uint8_t, uint8_t [static EOESEP_BUF], 5STATIC uint32_t gendata_eoesep_bfs(uint8_t, uint8_t [SIZE(EOESEP_BUF)],
6 uint32_t [static ESEP_MAX], uint16_t [static ESEP_CLASSES]); 6 uint32_t [SIZE(ESEP_MAX)], uint16_t [SIZE(ESEP_CLASSES)]);
7STATIC uint32_t gendata_eoesep_fromnew(uint8_t, uint8_t [static EOESEP_BUF], 7STATIC uint32_t gendata_eoesep_fromnew(uint8_t, uint8_t [SIZE(EOESEP_BUF)],
8 uint32_t [static ESEP_MAX], uint16_t [static ESEP_CLASSES]); 8 uint32_t [SIZE(ESEP_MAX)], uint16_t [SIZE(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 [SIZE(EOESEP_BUF)],
10 uint32_t [static ESEP_MAX], uint16_t [static ESEP_CLASSES]); 10 uint32_t [SIZE(ESEP_MAX)], uint16_t [SIZE(ESEP_CLASSES)]);
11STATIC uint32_t gendata_eoesep_marksim(uint64_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 [SIZE(EOESEP_BUF)], uint32_t [SIZE(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 [SIZE(EOESEP_BUF)], uint32_t [SIZE(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)], uint64_t); 16 const uint8_t [SIZE(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)], uint64_t, uint8_t); 19 uint8_t [SIZE(DIV_ROUND_UP(EOESEP_TABLESIZE, 2))], uint64_t, uint8_t);
20 20
21STATIC uint64_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[SIZE(ESEP_MAX)])
23{ 23{
24 uint8_t ttrep; 24 uint8_t ttrep;
25 uint32_t edata, class; 25 uint32_t edata, class;
@@ -36,8 +36,8 @@ coord_eoesep_sym(cube_t c, const uint32_t esep_classes[static ESEP_MAX])
36 36
37STATIC size_t 37STATIC size_t
38gendata_esep_classes( 38gendata_esep_classes(
39 uint32_t esep_classes[static ESEP_MAX], 39 uint32_t esep_classes[SIZE(ESEP_MAX)],
40 uint16_t rep[static ESEP_CLASSES] 40 uint16_t rep[SIZE(ESEP_CLASSES)]
41) 41)
42{ 42{
43 bool visited[ESEP_MAX]; 43 bool visited[ESEP_MAX];
@@ -121,8 +121,8 @@ STATIC uint32_t
121gendata_eoesep_bfs( 121gendata_eoesep_bfs(
122 uint8_t d, 122 uint8_t d,
123 uint8_t buf8[EOESEP_BUF], 123 uint8_t buf8[EOESEP_BUF],
124 uint32_t esep_classes[static ESEP_MAX], 124 uint32_t esep_classes[SIZE(ESEP_MAX)],
125 uint16_t rep[static ESEP_CLASSES] 125 uint16_t rep[SIZE(ESEP_CLASSES)]
126) 126)
127{ 127{
128 if (d < 9) 128 if (d < 9)
@@ -135,8 +135,8 @@ STATIC uint32_t
135gendata_eoesep_fromdone( 135gendata_eoesep_fromdone(
136 uint8_t d, 136 uint8_t d,
137 uint8_t buf8[EOESEP_BUF], 137 uint8_t buf8[EOESEP_BUF],
138 uint32_t esep_classes[static ESEP_MAX], 138 uint32_t esep_classes[SIZE(ESEP_MAX)],
139 uint16_t rep[static ESEP_CLASSES] 139 uint16_t rep[SIZE(ESEP_CLASSES)]
140) 140)
141{ 141{
142 uint8_t pval; 142 uint8_t pval;
@@ -164,8 +164,8 @@ STATIC uint32_t
164gendata_eoesep_fromnew( 164gendata_eoesep_fromnew(
165 uint8_t d, 165 uint8_t d,
166 uint8_t buf8[EOESEP_BUF], 166 uint8_t buf8[EOESEP_BUF],
167 uint32_t esep_classes[static ESEP_MAX], 167 uint32_t esep_classes[SIZE(ESEP_MAX)],
168 uint16_t rep[static ESEP_CLASSES] 168 uint16_t rep[SIZE(ESEP_CLASSES)]
169) 169)
170{ 170{
171 uint8_t pval; 171 uint8_t pval;
@@ -196,8 +196,8 @@ STATIC uint32_t
196gendata_eoesep_marksim( 196gendata_eoesep_marksim(
197 uint64_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[SIZE(EOESEP_BUF)],
200 uint32_t esep_classes[static ESEP_MAX] 200 uint32_t esep_classes[SIZE(ESEP_MAX)]
201) 201)
202{ 202{
203 uint8_t t, m, pval; 203 uint8_t t, m, pval;
@@ -227,8 +227,8 @@ STATIC bool
227gendata_eoesep_next( 227gendata_eoesep_next(
228 cube_t c, 228 cube_t c,
229 uint8_t d, 229 uint8_t d,
230 uint8_t buf8[static EOESEP_BUF], 230 uint8_t buf8[SIZE(EOESEP_BUF)],
231 uint32_t esep_classes[static ESEP_MAX] 231 uint32_t esep_classes[SIZE(ESEP_MAX)]
232) 232)
233{ 233{
234 uint8_t m, t, pval; 234 uint8_t m, t, pval;
@@ -251,7 +251,7 @@ gendata_eoesep_next(
251 251
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[SIZE(DIV_ROUND_UP(EOESEP_TABLESIZE, 2))],
255 uint64_t i 255 uint64_t i
256) 256)
257{ 257{
@@ -270,7 +270,7 @@ get_eoesep_pval_cube(const unsigned char *data, cube_t c)
270 270
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[SIZE(DIV_ROUND_UP(EOESEP_TABLESIZE, 2))],
274 uint64_t i, 274 uint64_t i,
275 uint8_t val 275 uint8_t val
276) 276)
diff --git a/src/solvers/h48/gendata_h48.h b/src/solvers/h48/gendata_h48.h
index b37bcfb..283c472 100644
--- a/src/solvers/h48/gendata_h48.h
+++ b/src/solvers/h48/gendata_h48.h
@@ -1,15 +1,15 @@
1STATIC long long gendata_h48_dispatch( 1STATIC long long gendata_h48_dispatch(
2 const char *, unsigned long long, unsigned char *); 2 const char *, unsigned long long, unsigned char *);
3STATIC uint64_t gendata_h48short(gendata_h48short_arg_t [static 1]); 3STATIC uint64_t gendata_h48short(gendata_h48short_arg_t [NON_NULL]);
4STATIC int64_t gendata_h48(gendata_h48_arg_t [static 1]); 4STATIC int64_t gendata_h48(gendata_h48_arg_t [NON_NULL]);
5STATIC void gendata_h48_maintable(gendata_h48_arg_t [static 1]); 5STATIC void gendata_h48_maintable(gendata_h48_arg_t [NON_NULL]);
6STATIC wrapthread_return_t gendata_h48_runthread(void *); 6STATIC wrapthread_return_t gendata_h48_runthread(void *);
7 7
8STATIC_INLINE void gendata_h48_mark(gendata_h48_mark_t [static 1]); 8STATIC_INLINE void gendata_h48_mark(gendata_h48_mark_t [NON_NULL]);
9STATIC_INLINE bool gendata_h48_dfs_stop( 9STATIC_INLINE bool gendata_h48_dfs_stop(
10 cube_t, int8_t, h48_dfs_arg_t [static 1]); 10 cube_t, int8_t, h48_dfs_arg_t [NON_NULL]);
11STATIC void gendata_h48_dfs(h48_dfs_arg_t [static 1]); 11STATIC void gendata_h48_dfs(h48_dfs_arg_t [NON_NULL]);
12STATIC tableinfo_t makeinfo_h48(gendata_h48_arg_t [static 1]); 12STATIC tableinfo_t makeinfo_h48(gendata_h48_arg_t [NON_NULL]);
13 13
14STATIC const uint32_t *get_cocsepdata_constptr(const unsigned char *); 14STATIC const uint32_t *get_cocsepdata_constptr(const unsigned char *);
15STATIC const unsigned char *get_h48data_constptr(const unsigned char *); 15STATIC const unsigned char *get_h48data_constptr(const unsigned char *);
@@ -19,7 +19,7 @@ STATIC_INLINE void set_h48_pval(unsigned char *, uint64_t, uint8_t);
19STATIC_INLINE uint8_t get_h48_pvalmin(const unsigned char *, uint64_t); 19STATIC_INLINE uint8_t get_h48_pvalmin(const unsigned char *, uint64_t);
20STATIC_INLINE void set_h48_pvalmin(unsigned char *, uint64_t, uint8_t); 20STATIC_INLINE void set_h48_pvalmin(unsigned char *, uint64_t, uint8_t);
21STATIC_INLINE uint8_t get_h48_pval_and_min( 21STATIC_INLINE uint8_t get_h48_pval_and_min(
22 const unsigned char *, uint64_t, uint8_t [static 1]); 22 const unsigned char *, uint64_t, uint8_t [NON_NULL]);
23 23
24STATIC long long 24STATIC long long
25gendata_h48_dispatch( 25gendata_h48_dispatch(
@@ -43,7 +43,7 @@ gendata_h48_dispatch(
43} 43}
44 44
45STATIC uint64_t 45STATIC uint64_t
46gendata_h48short(gendata_h48short_arg_t arg[static 1]) 46gendata_h48short(gendata_h48short_arg_t arg[NON_NULL])
47{ 47{
48 uint8_t i, m; 48 uint8_t i, m;
49 uint64_t coord; 49 uint64_t coord;
@@ -77,7 +77,7 @@ gendata_h48short(gendata_h48short_arg_t arg[static 1])
77} 77}
78 78
79STATIC int64_t 79STATIC int64_t
80gendata_h48(gendata_h48_arg_t arg[static 1]) 80gendata_h48(gendata_h48_arg_t arg[NON_NULL])
81{ 81{
82 uint64_t size, cocsepsize, h48size, eoesepsize; 82 uint64_t size, cocsepsize, h48size, eoesepsize;
83 long long r; 83 long long r;
@@ -149,7 +149,7 @@ gendata_h48(gendata_h48_arg_t arg[static 1])
149} 149}
150 150
151STATIC void 151STATIC void
152gendata_h48_maintable(gendata_h48_arg_t arg[static 1]) 152gendata_h48_maintable(gendata_h48_arg_t arg[NON_NULL])
153{ 153{
154 /* 154 /*
155 * A good base value for the h48 tables have few positions with value 155 * A good base value for the h48 tables have few positions with value
@@ -332,7 +332,7 @@ gendata_h48_runthread(void *arg)
332} 332}
333 333
334STATIC void 334STATIC void
335gendata_h48_dfs(h48_dfs_arg_t arg[static 1]) 335gendata_h48_dfs(h48_dfs_arg_t arg[NON_NULL])
336{ 336{
337 int8_t d; 337 int8_t d;
338 uint8_t m[4]; 338 uint8_t m[4];
@@ -411,7 +411,7 @@ gendata_h48_dfs(h48_dfs_arg_t arg[static 1])
411} 411}
412 412
413STATIC_INLINE void 413STATIC_INLINE void
414gendata_h48_mark(gendata_h48_mark_t arg[static 1]) 414gendata_h48_mark(gendata_h48_mark_t arg[NON_NULL])
415{ 415{
416 uint8_t oldval, newval, v; 416 uint8_t oldval, newval, v;
417 uint64_t coord, coordext, coordmin; 417 uint64_t coord, coordext, coordmin;
@@ -435,7 +435,7 @@ gendata_h48_mark(gendata_h48_mark_t arg[static 1])
435} 435}
436 436
437STATIC_INLINE bool 437STATIC_INLINE bool
438gendata_h48_dfs_stop(cube_t cube, int8_t d, h48_dfs_arg_t arg[static 1]) 438gendata_h48_dfs_stop(cube_t cube, int8_t d, h48_dfs_arg_t arg[NON_NULL])
439{ 439{
440 uint64_t val; 440 uint64_t val;
441 uint64_t coord, coordext; 441 uint64_t coord, coordext;
@@ -463,7 +463,7 @@ gendata_h48_dfs_stop(cube_t cube, int8_t d, h48_dfs_arg_t arg[static 1])
463} 463}
464 464
465STATIC tableinfo_t 465STATIC tableinfo_t
466makeinfo_h48(gendata_h48_arg_t arg[static 1]) 466makeinfo_h48(gendata_h48_arg_t arg[NON_NULL])
467{ 467{
468 tableinfo_t info; 468 tableinfo_t info;
469 469
@@ -533,7 +533,7 @@ STATIC_INLINE uint8_t
533get_h48_pval_and_min( 533get_h48_pval_and_min(
534 const unsigned char *table, 534 const unsigned char *table,
535 uint64_t coord_noext, 535 uint64_t coord_noext,
536 uint8_t pval_min[static 1] 536 uint8_t pval_min[NON_NULL]
537) 537)
538{ 538{
539 uint64_t iext, imin; 539 uint64_t iext, imin;
diff --git a/src/solvers/h48/map.h b/src/solvers/h48/map.h
index b603ee3..c9cfb06 100644
--- a/src/solvers/h48/map.h
+++ b/src/solvers/h48/map.h
@@ -1,13 +1,13 @@
1STATIC void h48map_create(h48map_t [static 1], uint64_t, uint64_t); 1STATIC void h48map_create(h48map_t [NON_NULL], uint64_t, uint64_t);
2STATIC void h48map_clear(h48map_t [static 1]); 2STATIC void h48map_clear(h48map_t [NON_NULL]);
3STATIC void h48map_destroy(h48map_t [static 1]); 3STATIC void h48map_destroy(h48map_t [NON_NULL]);
4STATIC uint64_t h48map_lookup(h48map_t [static 1], uint64_t); 4STATIC uint64_t h48map_lookup(h48map_t [NON_NULL], uint64_t);
5STATIC void h48map_insertmin(h48map_t [static 1], uint64_t, uint64_t); 5STATIC void h48map_insertmin(h48map_t [NON_NULL], uint64_t, uint64_t);
6STATIC uint64_t h48map_value(h48map_t [static 1], uint64_t); 6STATIC uint64_t h48map_value(h48map_t [NON_NULL], uint64_t);
7STATIC kvpair_t h48map_nextkvpair(h48map_t [static 1], uint64_t [static 1]); 7STATIC kvpair_t h48map_nextkvpair(h48map_t [NON_NULL], uint64_t [NON_NULL]);
8 8
9STATIC void 9STATIC void
10h48map_create(h48map_t map[static 1], uint64_t capacity, uint64_t randomizer) 10h48map_create(h48map_t map[NON_NULL], uint64_t capacity, uint64_t randomizer)
11{ 11{
12 map->capacity = capacity; 12 map->capacity = capacity;
13 map->randomizer = randomizer; 13 map->randomizer = randomizer;
@@ -17,20 +17,20 @@ h48map_create(h48map_t map[static 1], uint64_t capacity, uint64_t randomizer)
17} 17}
18 18
19STATIC void 19STATIC void
20h48map_clear(h48map_t map[static 1]) 20h48map_clear(h48map_t map[NON_NULL])
21{ 21{
22 memset(map->table, 0xFF, map->capacity * sizeof(uint64_t)); 22 memset(map->table, 0xFF, map->capacity * sizeof(uint64_t));
23 map->n = 0; 23 map->n = 0;
24} 24}
25 25
26STATIC void 26STATIC void
27h48map_destroy(h48map_t map[static 1]) 27h48map_destroy(h48map_t map[NON_NULL])
28{ 28{
29 free(map->table); 29 free(map->table);
30} 30}
31 31
32STATIC_INLINE uint64_t 32STATIC_INLINE uint64_t
33h48map_lookup(h48map_t map[static 1], uint64_t x) 33h48map_lookup(h48map_t map[NON_NULL], uint64_t x)
34{ 34{
35 uint64_t hash, i; 35 uint64_t hash, i;
36 36
@@ -44,7 +44,7 @@ h48map_lookup(h48map_t map[static 1], uint64_t x)
44} 44}
45 45
46STATIC_INLINE void 46STATIC_INLINE void
47h48map_insertmin(h48map_t map[static 1], uint64_t key, uint64_t val) 47h48map_insertmin(h48map_t map[NON_NULL], uint64_t key, uint64_t val)
48{ 48{
49 uint64_t i, oldval, min; 49 uint64_t i, oldval, min;
50 50
@@ -57,13 +57,13 @@ h48map_insertmin(h48map_t map[static 1], uint64_t key, uint64_t val)
57} 57}
58 58
59STATIC_INLINE uint64_t 59STATIC_INLINE uint64_t
60h48map_value(h48map_t map[static 1], uint64_t key) 60h48map_value(h48map_t map[NON_NULL], uint64_t key)
61{ 61{
62 return map->table[h48map_lookup(map, key)] >> MAP_KEYSHIFT; 62 return map->table[h48map_lookup(map, key)] >> MAP_KEYSHIFT;
63} 63}
64 64
65STATIC kvpair_t 65STATIC kvpair_t
66h48map_nextkvpair(h48map_t map[static 1], uint64_t p[static 1]) 66h48map_nextkvpair(h48map_t map[NON_NULL], uint64_t p[NON_NULL])
67{ 67{
68 kvpair_t kv; 68 kvpair_t kv;
69 uint64_t pair; 69 uint64_t pair;
diff --git a/src/solvers/h48/solve.h b/src/solvers/h48/solve.h
index 4fd0aea..295ef88 100644
--- a/src/solvers/h48/solve.h
+++ b/src/solvers/h48/solve.h
@@ -64,27 +64,27 @@ typedef struct {
64STATIC long long solve_h48_dispatch(oriented_cube_t, const char *, unsigned, 64STATIC long long solve_h48_dispatch(oriented_cube_t, const char *, unsigned,
65 unsigned, unsigned, unsigned, unsigned, unsigned, unsigned long long, 65 unsigned, unsigned, unsigned, unsigned, unsigned, unsigned long long,
66 const unsigned char *, unsigned, char *, 66 const unsigned char *, unsigned, char *,
67 long long [static NISSY_SIZE_SOLVE_STATS], int (*)(void *), void *); 67 long long [SIZE(NISSY_SIZE_SOLVE_STATS)], int (*)(void *), void *);
68STATIC_INLINE void h48_prune_pipeline(dfsarg_solve_h48_t [static 1], 68STATIC_INLINE void h48_prune_pipeline(dfsarg_solve_h48_t [NON_NULL],
69 h48_prune_t [static NMOVES], uint8_t, bool); 69 h48_prune_t [SIZE(NMOVES)], uint8_t, bool);
70STATIC_INLINE uint8_t h48_prune_lookup( 70STATIC_INLINE uint8_t h48_prune_lookup(
71 uint64_t, cube_t, dfsarg_solve_h48_t [static 1]); 71 uint64_t, cube_t, dfsarg_solve_h48_t [NON_NULL]);
72STATIC_INLINE uint8_t h48_prune_lookup_nocoord( 72STATIC_INLINE uint8_t h48_prune_lookup_nocoord(
73 cube_t, dfsarg_solve_h48_t [static 1]); 73 cube_t, dfsarg_solve_h48_t [NON_NULL]);
74STATIC_INLINE void h48_prune_restore_normal(const h48_prune_t [static 1], 74STATIC_INLINE void h48_prune_restore_normal(const h48_prune_t [NON_NULL],
75 dfsarg_solve_h48_t [static 1], uint8_t); 75 dfsarg_solve_h48_t [NON_NULL], uint8_t);
76STATIC_INLINE void h48_prune_restore_inverse(const h48_prune_t [static 1], 76STATIC_INLINE void h48_prune_restore_inverse(const h48_prune_t [NON_NULL],
77 dfsarg_solve_h48_t [static 1], uint8_t); 77 dfsarg_solve_h48_t [NON_NULL], uint8_t);
78STATIC int64_t solve_h48_maketasks( 78STATIC int64_t solve_h48_maketasks(
79 dfsarg_solve_h48_t [static 1], dfsarg_solve_h48_maketasks_t [static 1], 79 dfsarg_solve_h48_t [NON_NULL], dfsarg_solve_h48_maketasks_t [NON_NULL],
80 solve_h48_task_t [static H48_STARTING_CUBES], int [static 1]); 80 solve_h48_task_t [SIZE(H48_STARTING_CUBES)], int [NON_NULL]);
81STATIC wrapthread_return_t solve_h48_runthread(void *); 81STATIC wrapthread_return_t solve_h48_runthread(void *);
82STATIC int64_t solve_h48_dfs(dfsarg_solve_h48_t [static 1]); 82STATIC int64_t solve_h48_dfs(dfsarg_solve_h48_t [NON_NULL]);
83STATIC void solve_h48_log_solutions(solution_list_t [static 1], size_t); 83STATIC void solve_h48_log_solutions(solution_list_t [NON_NULL], size_t);
84STATIC int solve_h48_compare_tasks(const void *, const void *); 84STATIC int solve_h48_compare_tasks(const void *, const void *);
85STATIC int64_t solve_h48(oriented_cube_t, uint8_t, uint8_t, uint64_t, uint8_t, 85STATIC int64_t solve_h48(oriented_cube_t, uint8_t, uint8_t, uint64_t, uint8_t,
86 uint8_t, uint64_t, const unsigned char *, size_t, char *, 86 uint8_t, uint64_t, const unsigned char *, size_t, char *,
87 long long [static NISSY_SIZE_SOLVE_STATS], int (*)(void *), void *); 87 long long [SIZE(NISSY_SIZE_SOLVE_STATS)], int (*)(void *), void *);
88 88
89STATIC long long solve_h48_dispatch( 89STATIC long long solve_h48_dispatch(
90 oriented_cube_t oc, 90 oriented_cube_t oc,
@@ -99,7 +99,7 @@ STATIC long long solve_h48_dispatch(
99 const unsigned char *data, 99 const unsigned char *data,
100 unsigned sols_size, 100 unsigned sols_size,
101 char *sols, 101 char *sols,
102 long long stats[static NISSY_SIZE_SOLVE_STATS], 102 long long stats[SIZE(NISSY_SIZE_SOLVE_STATS)],
103 int (*poll_status)(void *), 103 int (*poll_status)(void *),
104 void *poll_status_data 104 void *poll_status_data
105) 105)
@@ -120,7 +120,7 @@ STATIC_INLINE uint8_t
120h48_prune_lookup( 120h48_prune_lookup(
121 uint64_t coord, 121 uint64_t coord,
122 cube_t cube, 122 cube_t cube,
123 dfsarg_solve_h48_t arg[static 1] 123 dfsarg_solve_h48_t arg[NON_NULL]
124) 124)
125{ 125{
126 uint8_t p, pmin, pe; 126 uint8_t p, pmin, pe;
@@ -139,7 +139,7 @@ h48_prune_lookup(
139STATIC_INLINE uint8_t 139STATIC_INLINE uint8_t
140h48_prune_lookup_nocoord( 140h48_prune_lookup_nocoord(
141 cube_t cube, 141 cube_t cube,
142 dfsarg_solve_h48_t arg[static 1] 142 dfsarg_solve_h48_t arg[NON_NULL]
143) 143)
144{ 144{
145 uint32_t cdata; 145 uint32_t cdata;
@@ -152,8 +152,8 @@ h48_prune_lookup_nocoord(
152 152
153STATIC_INLINE void 153STATIC_INLINE void
154h48_prune_pipeline( 154h48_prune_pipeline(
155 dfsarg_solve_h48_t arg[static 1], 155 dfsarg_solve_h48_t arg[NON_NULL],
156 h48_prune_t prune[static NMOVES], 156 h48_prune_t prune[SIZE(NMOVES)],
157 uint8_t target, 157 uint8_t target,
158 bool normal 158 bool normal
159) 159)
@@ -252,8 +252,8 @@ h48_prune_pipeline(
252 252
253STATIC_INLINE void 253STATIC_INLINE void
254h48_prune_restore_normal( 254h48_prune_restore_normal(
255 const h48_prune_t prune[static 1], 255 const h48_prune_t prune[NON_NULL],
256 dfsarg_solve_h48_t arg[static 1], 256 dfsarg_solve_h48_t arg[NON_NULL],
257 uint8_t target 257 uint8_t target
258) 258)
259{ 259{
@@ -276,8 +276,8 @@ h48_prune_restore_normal(
276 276
277STATIC_INLINE void 277STATIC_INLINE void
278h48_prune_restore_inverse( 278h48_prune_restore_inverse(
279 const h48_prune_t prune[static 1], 279 const h48_prune_t prune[NON_NULL],
280 dfsarg_solve_h48_t arg[static 1], 280 dfsarg_solve_h48_t arg[NON_NULL],
281 uint8_t target 281 uint8_t target
282) 282)
283{ 283{
@@ -299,7 +299,7 @@ h48_prune_restore_inverse(
299} 299}
300 300
301STATIC int64_t 301STATIC int64_t
302solve_h48_dfs(dfsarg_solve_h48_t arg[static 1]) 302solve_h48_dfs(dfsarg_solve_h48_t arg[NON_NULL])
303{ 303{
304 int64_t ret, n; 304 int64_t ret, n;
305 uint8_t m, nm, nn, ni, target; 305 uint8_t m, nm, nn, ni, target;
@@ -450,10 +450,10 @@ solve_h48_runthread_end:
450 450
451STATIC int64_t 451STATIC int64_t
452solve_h48_maketasks( 452solve_h48_maketasks(
453 dfsarg_solve_h48_t solve_arg[static 1], 453 dfsarg_solve_h48_t solve_arg[NON_NULL],
454 dfsarg_solve_h48_maketasks_t mtarg[static 1], 454 dfsarg_solve_h48_maketasks_t mtarg[NON_NULL],
455 solve_h48_task_t tasks[static H48_STARTING_CUBES], 455 solve_h48_task_t tasks[SIZE(H48_STARTING_CUBES)],
456 int ntasks[static 1] 456 int ntasks[NON_NULL]
457) 457)
458{ 458{
459 int r; 459 int r;
@@ -524,7 +524,7 @@ solve_h48_maketasks(
524} 524}
525 525
526STATIC void 526STATIC void
527solve_h48_log_solutions(solution_list_t s[static 1], size_t e) 527solve_h48_log_solutions(solution_list_t s[NON_NULL], size_t e)
528{ 528{
529 size_t i; 529 size_t i;
530 char b; 530 char b;
@@ -561,7 +561,7 @@ solve_h48(
561 const unsigned char *data, 561 const unsigned char *data,
562 size_t solutions_size, 562 size_t solutions_size,
563 char *solutions, 563 char *solutions,
564 long long stats[static NISSY_SIZE_SOLVE_STATS], 564 long long stats[SIZE(NISSY_SIZE_SOLVE_STATS)],
565 int (*poll_status)(void *), 565 int (*poll_status)(void *),
566 void *poll_status_data 566 void *poll_status_data
567) 567)
diff --git a/src/solvers/h48/utils.h b/src/solvers/h48/utils.h
index 27fb2e5..d181eab 100644
--- a/src/solvers/h48/utils.h
+++ b/src/solvers/h48/utils.h
@@ -4,11 +4,11 @@
4#define H48_HMAX UINT8_C(7) 4#define H48_HMAX UINT8_C(7)
5#endif 5#endif
6 6
7long long parse_h48h(const char *, uint8_t [static 1]); 7long long parse_h48h(const char *, uint8_t [NON_NULL]);
8STATIC long long dataid_h48(const char *, char [static NISSY_SIZE_DATAID]); 8STATIC long long dataid_h48(const char *, char [SIZE(NISSY_SIZE_DATAID)]);
9 9
10long long 10long long
11parse_h48h(const char *buf, uint8_t h[static 1]) 11parse_h48h(const char *buf, uint8_t h[NON_NULL])
12{ 12{
13 char format_error_msg[100]; 13 char format_error_msg[100];
14 sprintf(format_error_msg, "[H48] Error parsing H48 solver: must be in " 14 sprintf(format_error_msg, "[H48] Error parsing H48 solver: must be in "
@@ -51,7 +51,7 @@ parse_h48h_error:
51} 51}
52 52
53STATIC long long 53STATIC long long
54dataid_h48(const char *str, char buf[static NISSY_SIZE_DATAID]) 54dataid_h48(const char *str, char buf[SIZE(NISSY_SIZE_DATAID)])
55{ 55{
56 uint8_t h; 56 uint8_t h;
57 long long err; 57 long long err;
diff --git a/src/solvers/solutions.h b/src/solvers/solutions.h
index 8817348..f1f0c58 100644
--- a/src/solvers/solutions.h
+++ b/src/solvers/solutions.h
@@ -1,35 +1,35 @@
1STATIC void solution_moves_reset(solution_moves_t [static 1]); 1STATIC void solution_moves_reset(solution_moves_t [NON_NULL]);
2STATIC void solution_moves_transform(solution_moves_t [static 1], size_t, 2STATIC void solution_moves_transform(solution_moves_t [NON_NULL], size_t,
3 uint8_t); 3 uint8_t);
4STATIC void solution_moves_reorient(solution_moves_t [static 1], uint8_t); 4STATIC void solution_moves_reorient(solution_moves_t [NON_NULL], uint8_t);
5STATIC bool solution_list_init(solution_list_t [static 1], size_t, char *); 5STATIC bool solution_list_init(solution_list_t [NON_NULL], size_t, char *);
6STATIC bool solution_moves_equal( 6STATIC bool solution_moves_equal(
7 const solution_moves_t [static 1], const solution_moves_t [static 1]); 7 const solution_moves_t [NON_NULL], const solution_moves_t [NON_NULL]);
8STATIC bool last_solution_is_duplicate(const solution_list_t [static 1]); 8STATIC bool last_solution_is_duplicate(const solution_list_t [NON_NULL]);
9STATIC bool appendchar(solution_list_t [static 1], char); 9STATIC bool appendchar(solution_list_t [NON_NULL], char);
10STATIC bool appendnormal( 10STATIC bool appendnormal(
11 const solution_moves_t [static 1], solution_list_t [static 1]); 11 const solution_moves_t [NON_NULL], solution_list_t [NON_NULL]);
12STATIC bool appendinverse( 12STATIC bool appendinverse(
13 const solution_moves_t [static 1], solution_list_t [static 1]); 13 const solution_moves_t [NON_NULL], solution_list_t [NON_NULL]);
14STATIC void appendsolution_dfs(const solution_moves_t [static 1], size_t, 14STATIC void appendsolution_dfs(const solution_moves_t [NON_NULL], size_t,
15 const uint64_t *, size_t, uint8_t *, const solution_settings_t [static 1], 15 const uint64_t *, size_t, uint8_t *, const solution_settings_t [NON_NULL],
16 solution_list_t [static 1], 16 solution_list_t [NON_NULL],
17 solution_moves_t [static NTRANS * SOLUTION_MAXLEN], int64_t [static 1]); 17 solution_moves_t [static NTRANS * SOLUTION_MAXLEN], int64_t [NON_NULL]);
18STATIC int64_t appendsolution(const solution_moves_t [static 1], 18STATIC int64_t appendsolution(const solution_moves_t [NON_NULL],
19 size_t, const uint64_t *, const solution_settings_t [static 1], 19 size_t, const uint64_t *, const solution_settings_t [NON_NULL],
20 solution_list_t [static 1]); 20 solution_list_t [NON_NULL]);
21STATIC bool solutions_done(const solution_list_t [static 1], 21STATIC bool solutions_done(const solution_list_t [NON_NULL],
22 const solution_settings_t [static 1], int8_t depth); 22 const solution_settings_t [NON_NULL], int8_t depth);
23 23
24STATIC void 24STATIC void
25solution_moves_reset(solution_moves_t sol[static 1]) 25solution_moves_reset(solution_moves_t sol[NON_NULL])
26{ 26{
27 sol->nmoves = 0; 27 sol->nmoves = 0;
28 sol->npremoves = 0; 28 sol->npremoves = 0;
29} 29}
30 30
31STATIC void 31STATIC void
32solution_moves_transform(solution_moves_t moves[static 1], size_t z, uint8_t t) 32solution_moves_transform(solution_moves_t moves[NON_NULL], size_t z, uint8_t t)
33{ 33{
34 uint8_t i; 34 uint8_t i;
35 35
@@ -41,7 +41,7 @@ solution_moves_transform(solution_moves_t moves[static 1], size_t z, uint8_t t)
41} 41}
42 42
43STATIC void 43STATIC void
44solution_moves_reorient(solution_moves_t moves[static 1], uint8_t or) 44solution_moves_reorient(solution_moves_t moves[NON_NULL], uint8_t or)
45{ 45{
46 uint8_t i; 46 uint8_t i;
47 47
@@ -55,7 +55,7 @@ solution_moves_reorient(solution_moves_t moves[static 1], uint8_t or)
55} 55}
56 56
57STATIC bool 57STATIC bool
58solution_list_init(solution_list_t sols[static 1], size_t n, char *buf) 58solution_list_init(solution_list_t sols[NON_NULL], size_t n, char *buf)
59{ 59{
60 if (n == 0) 60 if (n == 0)
61 return false; 61 return false;
@@ -72,8 +72,8 @@ solution_list_init(solution_list_t sols[static 1], size_t n, char *buf)
72 72
73STATIC bool 73STATIC bool
74solution_moves_equal( 74solution_moves_equal(
75 const solution_moves_t a[static 1], 75 const solution_moves_t a[NON_NULL],
76 const solution_moves_t b[static 1] 76 const solution_moves_t b[NON_NULL]
77) 77)
78{ 78{
79 uint8_t i; 79 uint8_t i;
@@ -93,7 +93,7 @@ solution_moves_equal(
93} 93}
94 94
95STATIC bool 95STATIC bool
96last_solution_is_duplicate(const solution_list_t l[static 1]) 96last_solution_is_duplicate(const solution_list_t l[NON_NULL])
97{ 97{
98 size_t i, j; 98 size_t i, j;
99 99
@@ -119,7 +119,7 @@ last_solution_is_duplicate(const solution_list_t l[static 1])
119} 119}
120 120
121STATIC bool 121STATIC bool
122appendchar(solution_list_t solutions[static 1], char c) 122appendchar(solution_list_t solutions[NON_NULL], char c)
123{ 123{
124 if (solutions->size <= solutions->used) 124 if (solutions->size <= solutions->used)
125 return false; 125 return false;
@@ -131,8 +131,8 @@ appendchar(solution_list_t solutions[static 1], char c)
131 131
132STATIC bool 132STATIC bool
133appendnormal( 133appendnormal(
134 const solution_moves_t moves[static 1], 134 const solution_moves_t moves[NON_NULL],
135 solution_list_t list[static 1] 135 solution_list_t list[NON_NULL]
136) 136)
137{ 137{
138 int64_t strl; 138 int64_t strl;
@@ -150,8 +150,8 @@ appendnormal(
150 150
151STATIC bool 151STATIC bool
152appendinverse( 152appendinverse(
153 const solution_moves_t moves[static 1], 153 const solution_moves_t moves[NON_NULL],
154 solution_list_t list[static 1] 154 solution_list_t list[NON_NULL]
155) 155)
156{ 156{
157 int64_t strl; 157 int64_t strl;
@@ -172,15 +172,15 @@ appendinverse(
172 172
173STATIC void 173STATIC void
174appendsolution_dfs( 174appendsolution_dfs(
175 const solution_moves_t moves[static 1], 175 const solution_moves_t moves[NON_NULL],
176 size_t ntmask, 176 size_t ntmask,
177 const uint64_t *tmask, 177 const uint64_t *tmask,
178 size_t itm, 178 size_t itm,
179 uint8_t *tt, 179 uint8_t *tt,
180 const solution_settings_t settings[static 1], 180 const solution_settings_t settings[NON_NULL],
181 solution_list_t list[static 1], 181 solution_list_t list[NON_NULL],
182 solution_moves_t tsol[static NTRANS * SOLUTION_MAXLEN], 182 solution_moves_t tsol[static NTRANS * SOLUTION_MAXLEN],
183 int64_t r[static 1] 183 int64_t r[NON_NULL]
184) 184)
185{ 185{
186 /* 186 /*
@@ -276,11 +276,11 @@ appendsolution_dfs_error_buffer:
276 276
277STATIC int64_t 277STATIC int64_t
278appendsolution( 278appendsolution(
279 const solution_moves_t moves[static 1], 279 const solution_moves_t moves[NON_NULL],
280 size_t ntmask, 280 size_t ntmask,
281 const uint64_t *tmask, 281 const uint64_t *tmask,
282 const solution_settings_t settings[static 1], 282 const solution_settings_t settings[NON_NULL],
283 solution_list_t list[static 1] 283 solution_list_t list[NON_NULL]
284) 284)
285{ 285{
286 int64_t r; 286 int64_t r;
@@ -329,8 +329,8 @@ appendsolution_error_solution_length:
329 329
330STATIC bool 330STATIC bool
331solutions_done( 331solutions_done(
332 const solution_list_t list[static 1], 332 const solution_list_t list[NON_NULL],
333 const solution_settings_t settings[static 1], 333 const solution_settings_t settings[NON_NULL],
334 int8_t depth 334 int8_t depth
335) 335)
336{ 336{
diff --git a/src/solvers/tables.h b/src/solvers/tables.h
index b7a1079..8211ab3 100644
--- a/src/solvers/tables.h
+++ b/src/solvers/tables.h
@@ -1,17 +1,17 @@
1STATIC uint64_t read_unaligned_u64( 1STATIC uint64_t read_unaligned_u64(
2 const unsigned char [static sizeof(uint64_t)]); 2 const unsigned char [SIZE(sizeof(uint64_t))]);
3STATIC void write_unaligned_u64( 3STATIC void write_unaligned_u64(
4 unsigned char [static sizeof(uint64_t)], uint64_t); 4 unsigned char [SIZE(sizeof(uint64_t))], uint64_t);
5STATIC int64_t readtableinfo( 5STATIC int64_t readtableinfo(
6 size_t, const unsigned char *, tableinfo_t [static 1]); 6 size_t, const unsigned char *, tableinfo_t [NON_NULL]);
7STATIC int64_t readtableinfo_n( 7STATIC int64_t readtableinfo_n(
8 size_t, const unsigned char *, uint8_t, tableinfo_t [static 1]); 8 size_t, const unsigned char *, uint8_t, tableinfo_t [NON_NULL]);
9STATIC int64_t writetableinfo( 9STATIC int64_t writetableinfo(
10 const tableinfo_t [static 1], size_t, unsigned char *); 10 const tableinfo_t [NON_NULL], size_t, unsigned char *);
11STATIC void append_name(tableinfo_t [static 1], const char *); 11STATIC void append_name(tableinfo_t [NON_NULL], const char *);
12 12
13STATIC uint64_t 13STATIC uint64_t
14read_unaligned_u64(const unsigned char buf[static sizeof(uint64_t)]) 14read_unaligned_u64(const unsigned char buf[SIZE(sizeof(uint64_t))])
15{ 15{
16 uint64_t ret; 16 uint64_t ret;
17 17
@@ -21,7 +21,7 @@ read_unaligned_u64(const unsigned char buf[static sizeof(uint64_t)])
21} 21}
22 22
23STATIC void 23STATIC void
24write_unaligned_u64(unsigned char buf[static sizeof(uint64_t)], uint64_t x) 24write_unaligned_u64(unsigned char buf[SIZE(sizeof(uint64_t))], uint64_t x)
25{ 25{
26 memcpy(buf, &x, sizeof(uint64_t)); 26 memcpy(buf, &x, sizeof(uint64_t));
27} 27}
@@ -30,7 +30,7 @@ STATIC int64_t
30readtableinfo( 30readtableinfo(
31 size_t buf_size, 31 size_t buf_size,
32 const unsigned char *buf, 32 const unsigned char *buf,
33 tableinfo_t info[static 1] 33 tableinfo_t info[NON_NULL]
34) 34)
35{ 35{
36 size_t i; 36 size_t i;
@@ -75,7 +75,7 @@ readtableinfo_n(
75 size_t buf_size, 75 size_t buf_size,
76 const unsigned char *buf, 76 const unsigned char *buf,
77 uint8_t n, 77 uint8_t n,
78 tableinfo_t info[static 1] 78 tableinfo_t info[NON_NULL]
79) 79)
80{ 80{
81 int64_t ret; 81 int64_t ret;
@@ -89,7 +89,7 @@ readtableinfo_n(
89 89
90STATIC int64_t 90STATIC int64_t
91writetableinfo( 91writetableinfo(
92 const tableinfo_t info[static 1], 92 const tableinfo_t info[NON_NULL],
93 size_t data_size, 93 size_t data_size,
94 unsigned char *buf 94 unsigned char *buf
95) 95)
@@ -138,7 +138,7 @@ writetableinfo(
138} 138}
139 139
140STATIC void 140STATIC void
141append_name(tableinfo_t info[static 1], const char *str) 141append_name(tableinfo_t info[NON_NULL], const char *str)
142{ 142{
143 int i, j; 143 int i, j;
144 144

Generated with cgit - Back to sebastiano.tronto.net