aboutsummaryrefslogtreecommitdiff
path: root/src/solvers/h48/solve.h
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2025-04-21 14:33:01 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2025-04-21 14:44:07 +0200
commit510a7471348788fccba6b7c4b9f7b7cc9aee6ba9 (patch)
tree58df7791242d9a4f52e80da93ad3af20ed5e3528 /src/solvers/h48/solve.h
parent1d9b8acfeece68c4f55d2499d8aed127f98a383c (diff)
downloadnissy-core-510a7471348788fccba6b7c4b9f7b7cc9aee6ba9.tar.gz
nissy-core-510a7471348788fccba6b7c4b9f7b7cc9aee6ba9.zip
Always use unsigned char * for data buffers
Before this commit I was inconsistently using one of void *, char * and uint8_t *.
Diffstat (limited to 'src/solvers/h48/solve.h')
-rw-r--r--src/solvers/h48/solve.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/solvers/h48/solve.h b/src/solvers/h48/solve.h
index 0fd419d..cf7095c 100644
--- a/src/solvers/h48/solve.h
+++ b/src/solvers/h48/solve.h
@@ -22,9 +22,9 @@ typedef struct {
22 uint8_t k; 22 uint8_t k;
23 uint8_t base; 23 uint8_t base;
24 const uint32_t *cocsepdata; 24 const uint32_t *cocsepdata;
25 const uint8_t *h48data; 25 const unsigned char *h48data;
26 const uint8_t *h48data_fallback_h0k4; 26 const unsigned char *h48data_fallback_h0k4;
27 const void *h48data_fallback_eoesep; 27 const unsigned char *h48data_fallback_eoesep;
28 uint32_t movemask_normal; 28 uint32_t movemask_normal;
29 uint32_t movemask_inverse; 29 uint32_t movemask_inverse;
30 int64_t nodes_visited; 30 int64_t nodes_visited;
@@ -53,7 +53,7 @@ STATIC int64_t solve_h48_maketasks(
53STATIC void *solve_h48_runthread(void *); 53STATIC void *solve_h48_runthread(void *);
54STATIC int64_t solve_h48_dfs(dfsarg_solve_h48_t [static 1]); 54STATIC int64_t solve_h48_dfs(dfsarg_solve_h48_t [static 1]);
55STATIC int64_t solve_h48(cube_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, 55STATIC int64_t solve_h48(cube_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t,
56 uint64_t, const void *, size_t n, char [n], 56 uint64_t, const unsigned char *, size_t n, char [n],
57 long long [static NISSY_SIZE_SOLVE_STATS]); 57 long long [static NISSY_SIZE_SOLVE_STATS]);
58 58
59STATIC_INLINE bool 59STATIC_INLINE bool
@@ -349,7 +349,7 @@ solve_h48(
349 uint8_t optimal, 349 uint8_t optimal,
350 uint8_t threads, 350 uint8_t threads,
351 uint64_t data_size, 351 uint64_t data_size,
352 const void *data, 352 const unsigned char *data,
353 size_t solutions_size, 353 size_t solutions_size,
354 char solutions[solutions_size], 354 char solutions[solutions_size],
355 long long stats[static NISSY_SIZE_SOLVE_STATS] 355 long long stats[static NISSY_SIZE_SOLVE_STATS]
@@ -365,8 +365,8 @@ solve_h48(
365 int64_t nodes_visited, table_lookups, table_fallbacks; 365 int64_t nodes_visited, table_lookups, table_fallbacks;
366 tableinfo_t info, fbinfo, fbinfo2; 366 tableinfo_t info, fbinfo, fbinfo2;
367 const uint32_t *cocsepdata; 367 const uint32_t *cocsepdata;
368 const uint8_t *fallback, *h48data; 368 const unsigned char *fallback, *h48data;
369 const void *fallback2; 369 const unsigned char *fallback2;
370 solution_moves_t solution_moves[THREADS]; 370 solution_moves_t solution_moves[THREADS];
371 solution_settings_t settings; 371 solution_settings_t settings;
372 solution_list_t sollist; 372 solution_list_t sollist;
@@ -379,8 +379,8 @@ solve_h48(
379 if (readtableinfo_n(data_size, data, 2, &info) != NISSY_OK) 379 if (readtableinfo_n(data_size, data, 2, &info) != NISSY_OK)
380 goto solve_h48_error_data; 380 goto solve_h48_error_data;
381 381
382 cocsepdata = (uint32_t *)((char *)data + INFOSIZE); 382 cocsepdata = (uint32_t *)(data + INFOSIZE);
383 h48data = (uint8_t *)data + COCSEP_FULLSIZE + INFOSIZE; 383 h48data = data + COCSEP_FULLSIZE + INFOSIZE;
384 384
385 /* Read fallback table(s) */ 385 /* Read fallback table(s) */
386 fallback = NULL; 386 fallback = NULL;

Generated with cgit - Back to sebastiano.tronto.net