aboutsummaryrefslogtreecommitdiff
path: root/src
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
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 '')
-rw-r--r--src/nissy.c26
-rw-r--r--src/nissy.h6
-rw-r--r--src/solvers/coord/common.h46
-rw-r--r--src/solvers/coord/dr.h16
-rw-r--r--src/solvers/coord/dreo.h16
-rw-r--r--src/solvers/coord/eo.h16
-rw-r--r--src/solvers/coord/gendata.h54
-rw-r--r--src/solvers/coord/solve.h26
-rw-r--r--src/solvers/coord/types_macros.h8
-rw-r--r--src/solvers/h48/gendata_cocsep.h4
-rw-r--r--src/solvers/h48/gendata_eoesep.h21
-rw-r--r--src/solvers/h48/gendata_h48.h90
-rw-r--r--src/solvers/h48/gendata_types_macros.h16
-rw-r--r--src/solvers/h48/solve.h18
-rw-r--r--src/solvers/tables.h31
-rw-r--r--src/solvers/tables_types_macros.h2
16 files changed, 203 insertions, 193 deletions
diff --git a/src/nissy.c b/src/nissy.c
index f744fa8..dfa1a90 100644
--- a/src/nissy.c
+++ b/src/nissy.c
@@ -14,14 +14,14 @@
14 14
15long long parse_h48_solver( 15long long parse_h48_solver(
16 const char *, uint8_t [static 1], uint8_t [static 1]); 16 const char *, uint8_t [static 1], uint8_t [static 1]);
17STATIC bool checkdata(const char *, const tableinfo_t [static 1]); 17STATIC bool checkdata(const unsigned char *, const tableinfo_t [static 1]);
18STATIC bool distribution_equal(const uint64_t [static INFO_DISTRIBUTION_LEN], 18STATIC bool distribution_equal(const uint64_t [static INFO_DISTRIBUTION_LEN],
19 const uint64_t [static INFO_DISTRIBUTION_LEN], uint8_t); 19 const uint64_t [static INFO_DISTRIBUTION_LEN], uint8_t);
20STATIC long long write_result(cube_t, char [static NISSY_SIZE_B32]); 20STATIC long long write_result(cube_t, char [static NISSY_SIZE_B32]);
21STATIC size_t my_strnlen(const char *, size_t); 21STATIC size_t my_strnlen(const char *, size_t);
22STATIC long long nissy_dataid(const char *, char [static NISSY_SIZE_DATAID]); 22STATIC long long nissy_dataid(const char *, char [static NISSY_SIZE_DATAID]);
23STATIC long long nissy_gendata_unsafe( 23STATIC long long nissy_gendata_unsafe(
24 const char *, unsigned long long, char *); 24 const char *, unsigned long long, unsigned char *);
25 25
26#define GETCUBE_OPTIONS(S, F) { .option = S, .fix = F } 26#define GETCUBE_OPTIONS(S, F) { .option = S, .fix = F }
27struct { 27struct {
@@ -66,7 +66,7 @@ parse_h48_solver_error:
66} 66}
67 67
68STATIC bool 68STATIC bool
69checkdata(const char *buf, const tableinfo_t info[static 1]) 69checkdata(const unsigned char *buf, const tableinfo_t info[static 1])
70{ 70{
71 uint64_t distr[INFO_DISTRIBUTION_LEN]; 71 uint64_t distr[INFO_DISTRIBUTION_LEN];
72 72
@@ -78,10 +78,10 @@ checkdata(const char *buf, const tableinfo_t info[static 1])
78 getdistribution_cocsep( 78 getdistribution_cocsep(
79 (uint32_t *)((char *)buf + INFOSIZE), distr); 79 (uint32_t *)((char *)buf + INFOSIZE), distr);
80 } else if (!strncmp(info->solver, "h48", 3)) { 80 } else if (!strncmp(info->solver, "h48", 3)) {
81 getdistribution_h48((uint8_t *)buf + INFOSIZE, distr, 81 getdistribution_h48(buf + INFOSIZE, distr,
82 info->h48h, info->bits); 82 info->h48h, info->bits);
83 } else if (!strncmp(info->solver, "coordinate solver for ", 22)) { 83 } else if (!strncmp(info->solver, "coordinate solver for ", 22)) {
84 getdistribution_coord((uint8_t *)buf + INFOSIZE, 84 getdistribution_coord(buf + INFOSIZE,
85 info->solver + 22, distr); 85 info->solver + 22, distr);
86 } else if (!strncmp(info->solver, "eoesep data for h48", 19)) { 86 } else if (!strncmp(info->solver, "eoesep data for h48", 19)) {
87 return true; 87 return true;
@@ -366,7 +366,7 @@ nissy_getcube(
366long long 366long long
367nissy_datainfo( 367nissy_datainfo(
368 uint64_t data_size, 368 uint64_t data_size,
369 const char data[data_size] 369 const unsigned char data[data_size]
370) 370)
371{ 371{
372 uint8_t i; 372 uint8_t i;
@@ -405,8 +405,7 @@ nissy_datainfo(
405 } 405 }
406 406
407 if (info.next != 0) 407 if (info.next != 0)
408 return nissy_datainfo( 408 return nissy_datainfo(data_size - info.next, data + info.next);
409 data_size - info.next, (char *)data + info.next);
410 409
411 LOG("\n---------\n"); 410 LOG("\n---------\n");
412 411
@@ -452,7 +451,7 @@ long long
452nissy_gendata( 451nissy_gendata(
453 const char *solver, 452 const char *solver,
454 unsigned long long data_size, 453 unsigned long long data_size,
455 char data[data_size] 454 unsigned char data[data_size]
456) 455)
457{ 456{
458 return nissy_gendata_unsafe(solver, data_size, data); 457 return nissy_gendata_unsafe(solver, data_size, data);
@@ -462,7 +461,7 @@ STATIC long long
462nissy_gendata_unsafe( 461nissy_gendata_unsafe(
463 const char *solver, 462 const char *solver,
464 unsigned long long data_size, 463 unsigned long long data_size,
465 char *data 464 unsigned char *data
466) 465)
467{ 466{
468 long long parse_ret; 467 long long parse_ret;
@@ -497,10 +496,9 @@ nissy_gendata_unsafe(
497long long 496long long
498nissy_checkdata( 497nissy_checkdata(
499 unsigned long long data_size, 498 unsigned long long data_size,
500 const char data[data_size] 499 const unsigned char data[data_size]
501) 500)
502{ 501{
503 char *buf;
504 tableinfo_t info; 502 tableinfo_t info;
505 int64_t err; 503 int64_t err;
506 504
@@ -509,7 +507,7 @@ nissy_checkdata(
509 return NISSY_ERROR_DATA; 507 return NISSY_ERROR_DATA;
510 } 508 }
511 509
512 for (buf = (char *)data; 510 for (const unsigned char *buf = data;
513 (err = readtableinfo(data_size, buf, &info)) == NISSY_OK; 511 (err = readtableinfo(data_size, buf, &info)) == NISSY_OK;
514 buf += info.next, data_size -= info.next) 512 buf += info.next, data_size -= info.next)
515 { 513 {
@@ -537,7 +535,7 @@ nissy_solve(
537 unsigned optimal, 535 unsigned optimal,
538 unsigned threads, 536 unsigned threads,
539 unsigned long long data_size, 537 unsigned long long data_size,
540 const char data[data_size], 538 const unsigned char data[data_size],
541 unsigned sols_size, 539 unsigned sols_size,
542 char sols[sols_size], 540 char sols[sols_size],
543 long long stats[static NISSY_SIZE_SOLVE_STATS] 541 long long stats[static NISSY_SIZE_SOLVE_STATS]
diff --git a/src/nissy.h b/src/nissy.h
index c23f338..a5b3015 100644
--- a/src/nissy.h
+++ b/src/nissy.h
@@ -329,7 +329,7 @@ long long
329nissy_gendata( 329nissy_gendata(
330 const char *solver, 330 const char *solver,
331 unsigned long long data_size, 331 unsigned long long data_size,
332 char data[data_size] 332 unsigned char data[data_size]
333); 333);
334 334
335/* 335/*
@@ -347,7 +347,7 @@ Return values:
347long long 347long long
348nissy_checkdata( 348nissy_checkdata(
349 unsigned long long data_size, 349 unsigned long long data_size,
350 const char data[data_size] 350 const unsigned char data[data_size]
351); 351);
352 352
353/* 353/*
@@ -395,7 +395,7 @@ nissy_solve(
395 unsigned optimal, 395 unsigned optimal,
396 unsigned threads, 396 unsigned threads,
397 unsigned long long data_size, 397 unsigned long long data_size,
398 const char data[data_size], 398 const unsigned char data[data_size],
399 unsigned sols_size, 399 unsigned sols_size,
400 char sols[sols_size], 400 char sols[sols_size],
401 long long stats[static NISSY_SIZE_SOLVE_STATS] 401 long long stats[static NISSY_SIZE_SOLVE_STATS]
diff --git a/src/solvers/coord/common.h b/src/solvers/coord/common.h
index 2eb5ad0..8fd405c 100644
--- a/src/solvers/coord/common.h
+++ b/src/solvers/coord/common.h
@@ -1,25 +1,29 @@
1STATIC uint64_t coord_coord_generic( 1STATIC uint64_t coord_coord_generic(
2 const coord_t [static 1], cube_t, const void *); 2 const coord_t [static 1], 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 void *); 4 const coord_t [static 1], uint64_t, const unsigned char *);
5STATIC bool coord_isnasty_generic( 5STATIC bool coord_isnasty_generic(
6 const coord_t [static 1], uint64_t, const void *); 6 const coord_t [static 1], uint64_t, const unsigned char *);
7STATIC size_t coord_gendata_generic(const coord_t [static 1], void *); 7STATIC size_t coord_gendata_generic(const coord_t [static 1], unsigned char *);
8 8
9STATIC void append_coord_name(const coord_t [static 1], char *); 9STATIC void append_coord_name(const coord_t [static 1], char *);
10STATIC bool solution_lastqt_cw(const solution_moves_t [static 1]); 10STATIC bool solution_lastqt_cw(const solution_moves_t [static 1]);
11STATIC bool coord_can_switch( 11STATIC bool coord_can_switch(const coord_t [static 1], const unsigned char *,
12 const coord_t [static 1], const void *, size_t n, const uint8_t [n]); 12 size_t n, const uint8_t [n]);
13 13
14STATIC uint64_t 14STATIC uint64_t
15coord_coord_generic(const coord_t coord[static 1], cube_t c, const void *data) 15coord_coord_generic(
16 const coord_t coord[static 1],
17 cube_t c,
18 const unsigned char *data
19)
16{ 20{
17 const char *datanoinfo; 21 const unsigned char *datanoinfo;
18 const uint32_t *data32; 22 const uint32_t *data32;
19 uint32_t d; 23 uint32_t d;
20 cube_t tr; 24 cube_t tr;
21 25
22 datanoinfo = (const char *)data + INFOSIZE; 26 datanoinfo = data + INFOSIZE;
23 data32 = (const uint32_t *)datanoinfo; 27 data32 = (const uint32_t *)datanoinfo;
24 d = data32[coord->sym.coord(c)]; 28 d = data32[coord->sym.coord(c)];
25 tr = transform(c, COORD_TTREP(d)); 29 tr = transform(c, COORD_TTREP(d));
@@ -28,13 +32,17 @@ coord_coord_generic(const coord_t coord[static 1], cube_t c, const void *data)
28} 32}
29 33
30STATIC cube_t 34STATIC cube_t
31coord_cube_generic(const coord_t coord[static 1], uint64_t i, const void *data) 35coord_cube_generic(
36 const coord_t coord[static 1],
37 uint64_t i,
38 const unsigned char *data
39)
32{ 40{
33 const char *datanoinfo; 41 const unsigned char *datanoinfo;
34 const uint32_t *rep32; 42 const uint32_t *rep32;
35 cube_t c; 43 cube_t c;
36 44
37 datanoinfo = (const char *)data + INFOSIZE; 45 datanoinfo = data + INFOSIZE;
38 rep32 = (const uint32_t *)(datanoinfo + 4 * (size_t)coord->sym.max); 46 rep32 = (const uint32_t *)(datanoinfo + 4 * (size_t)coord->sym.max);
39 c = coord->sym.cube(rep32[i / coord->sym.max2]); 47 c = coord->sym.cube(rep32[i / coord->sym.max2]);
40 48
@@ -45,14 +53,14 @@ STATIC bool
45coord_isnasty_generic( 53coord_isnasty_generic(
46 const coord_t coord[static 1], 54 const coord_t coord[static 1],
47 uint64_t i, 55 uint64_t i,
48 const void *data 56 const unsigned char *data
49) 57)
50{ 58{
51 const char *datanoinfo; 59 const unsigned char *datanoinfo;
52 const uint32_t *classttrep, *rep32; 60 const uint32_t *classttrep, *rep32;
53 uint32_t r; 61 uint32_t r;
54 62
55 datanoinfo = (const char *)data + INFOSIZE; 63 datanoinfo = data + INFOSIZE;
56 classttrep = (const uint32_t *)datanoinfo; 64 classttrep = (const uint32_t *)datanoinfo;
57 rep32 = (const uint32_t *)(datanoinfo + 4 * (size_t)coord->sym.max); 65 rep32 = (const uint32_t *)(datanoinfo + 4 * (size_t)coord->sym.max);
58 r = rep32[i / coord->sym.max2]; 66 r = rep32[i / coord->sym.max2];
@@ -63,11 +71,11 @@ coord_isnasty_generic(
63STATIC size_t 71STATIC size_t
64coord_gendata_generic( 72coord_gendata_generic(
65 const coord_t coord[static 1], 73 const coord_t coord[static 1],
66 void *data 74 unsigned char *data
67) 75)
68{ 76{
69 uint64_t i, j, n, t, nasty; 77 uint64_t i, j, n, t, nasty;
70 char *datanoinfo; 78 unsigned char *datanoinfo;
71 uint32_t *classttrep, *rep; 79 uint32_t *classttrep, *rep;
72 size_t coord_datasize; 80 size_t coord_datasize;
73 cube_t c; 81 cube_t c;
@@ -78,7 +86,7 @@ coord_gendata_generic(
78 if (data == NULL) 86 if (data == NULL)
79 return coord_datasize; 87 return coord_datasize;
80 88
81 datanoinfo = (char *)data + INFOSIZE; 89 datanoinfo = data + INFOSIZE;
82 classttrep = (uint32_t *)datanoinfo; 90 classttrep = (uint32_t *)datanoinfo;
83 rep = classttrep + coord->sym.max; 91 rep = classttrep + coord->sym.max;
84 memset(data, 0xFF, coord_datasize); 92 memset(data, 0xFF, coord_datasize);
@@ -154,7 +162,7 @@ solution_lastqt_cw(const solution_moves_t s[static 1])
154STATIC bool 162STATIC bool
155coord_can_switch( 163coord_can_switch(
156 const coord_t coord[static 1], 164 const coord_t coord[static 1],
157 const void *data, 165 const unsigned char *data,
158 size_t n, 166 size_t n,
159 const uint8_t moves[n] 167 const uint8_t moves[n]
160) 168)
diff --git a/src/solvers/coord/dr.h b/src/solvers/coord/dr.h
index 3bc4c6d..e197f8c 100644
--- a/src/solvers/coord/dr.h
+++ b/src/solvers/coord/dr.h
@@ -5,10 +5,10 @@ STATIC uint64_t coord_dreoesep_nosym(cube_t);
5STATIC cube_t invcoord_dreoesep_nosym(uint64_t); 5STATIC cube_t invcoord_dreoesep_nosym(uint64_t);
6STATIC cube_t coordinate_dr_merge(cube_t, cube_t); 6STATIC cube_t coordinate_dr_merge(cube_t, cube_t);
7 7
8STATIC uint64_t coordinate_dr_coord(cube_t, const void *); 8STATIC uint64_t coordinate_dr_coord(cube_t, const unsigned char *);
9STATIC cube_t coordinate_dr_cube(uint64_t, const void *); 9STATIC cube_t coordinate_dr_cube(uint64_t, const unsigned char *);
10STATIC bool coordinate_dr_isnasty(uint64_t, const void *); 10STATIC bool coordinate_dr_isnasty(uint64_t, const unsigned char *);
11STATIC size_t coordinate_dr_gendata(void *); 11STATIC size_t coordinate_dr_gendata(unsigned char *);
12 12
13STATIC bool is_eoco_solvable(cube_t); 13STATIC bool is_eoco_solvable(cube_t);
14 14
@@ -81,25 +81,25 @@ coordinate_dr_merge(cube_t c1, cube_t c2)
81} 81}
82 82
83STATIC uint64_t 83STATIC uint64_t
84coordinate_dr_coord(cube_t cube, const void *data) 84coordinate_dr_coord(cube_t cube, const unsigned char *data)
85{ 85{
86 return coord_coord_generic(&coordinate_dr, cube, data); 86 return coord_coord_generic(&coordinate_dr, cube, data);
87} 87}
88 88
89STATIC cube_t 89STATIC cube_t
90coordinate_dr_cube(uint64_t i, const void *data) 90coordinate_dr_cube(uint64_t i, const unsigned char *data)
91{ 91{
92 return coord_cube_generic(&coordinate_dr, i, data); 92 return coord_cube_generic(&coordinate_dr, i, data);
93} 93}
94 94
95STATIC bool 95STATIC bool
96coordinate_dr_isnasty(uint64_t i, const void *data) 96coordinate_dr_isnasty(uint64_t i, const unsigned char *data)
97{ 97{
98 return coord_isnasty_generic(&coordinate_dr, i, data); 98 return coord_isnasty_generic(&coordinate_dr, i, data);
99} 99}
100 100
101STATIC size_t 101STATIC size_t
102coordinate_dr_gendata(void *data) 102coordinate_dr_gendata(unsigned char *data)
103{ 103{
104 return coord_gendata_generic(&coordinate_dr, data); 104 return coord_gendata_generic(&coordinate_dr, data);
105} 105}
diff --git a/src/solvers/coord/dreo.h b/src/solvers/coord/dreo.h
index 37de0d3..2bc8cd1 100644
--- a/src/solvers/coord/dreo.h
+++ b/src/solvers/coord/dreo.h
@@ -4,10 +4,10 @@ STATIC uint64_t coord_dresep_nosym(cube_t);
4STATIC cube_t invcoord_dresep_nosym(uint64_t); 4STATIC cube_t invcoord_dresep_nosym(uint64_t);
5STATIC cube_t coordinate_dreo_merge(cube_t, cube_t); 5STATIC cube_t coordinate_dreo_merge(cube_t, cube_t);
6 6
7STATIC uint64_t coordinate_dreo_coord(cube_t, const void *); 7STATIC uint64_t coordinate_dreo_coord(cube_t, const unsigned char *);
8STATIC cube_t coordinate_dreo_cube(uint64_t, const void *); 8STATIC cube_t coordinate_dreo_cube(uint64_t, const unsigned char *);
9STATIC bool coordinate_dreo_isnasty(uint64_t, const void *); 9STATIC bool coordinate_dreo_isnasty(uint64_t, const unsigned char *);
10STATIC size_t coordinate_dreo_gendata(void *); 10STATIC size_t coordinate_dreo_gendata(unsigned char *);
11 11
12STATIC bool is_dreo_solvable(cube_t); 12STATIC bool is_dreo_solvable(cube_t);
13 13
@@ -63,25 +63,25 @@ coordinate_dreo_merge(cube_t c1, cube_t c2)
63} 63}
64 64
65STATIC uint64_t 65STATIC uint64_t
66coordinate_dreo_coord(cube_t cube, const void *data) 66coordinate_dreo_coord(cube_t cube, const unsigned char *data)
67{ 67{
68 return coord_coord_generic(&coordinate_dreo, cube, data); 68 return coord_coord_generic(&coordinate_dreo, cube, data);
69} 69}
70 70
71STATIC cube_t 71STATIC cube_t
72coordinate_dreo_cube(uint64_t i, const void *data) 72coordinate_dreo_cube(uint64_t i, const unsigned char *data)
73{ 73{
74 return coord_cube_generic(&coordinate_dreo, i, data); 74 return coord_cube_generic(&coordinate_dreo, i, data);
75} 75}
76 76
77STATIC bool 77STATIC bool
78coordinate_dreo_isnasty(uint64_t i, const void *data) 78coordinate_dreo_isnasty(uint64_t i, const unsigned char *data)
79{ 79{
80 return coord_isnasty_generic(&coordinate_dreo, i, data); 80 return coord_isnasty_generic(&coordinate_dreo, i, data);
81} 81}
82 82
83STATIC size_t 83STATIC size_t
84coordinate_dreo_gendata(void *data) 84coordinate_dreo_gendata(unsigned char *data)
85{ 85{
86 return coord_gendata_generic(&coordinate_dreo, data); 86 return coord_gendata_generic(&coordinate_dreo, data);
87} 87}
diff --git a/src/solvers/coord/eo.h b/src/solvers/coord/eo.h
index a0685c4..c8faaea 100644
--- a/src/solvers/coord/eo.h
+++ b/src/solvers/coord/eo.h
@@ -1,7 +1,7 @@
1STATIC uint64_t coordinate_eo_coord(cube_t, const void *); 1STATIC uint64_t coordinate_eo_coord(cube_t, const unsigned char *);
2STATIC cube_t coordinate_eo_cube(uint64_t, const void *); 2STATIC cube_t coordinate_eo_cube(uint64_t, const unsigned char *);
3STATIC bool coordinate_eo_isnasty(uint64_t, const void *); 3STATIC bool coordinate_eo_isnasty(uint64_t, const unsigned char *);
4STATIC size_t coordinate_eo_gendata(void *); 4STATIC size_t coordinate_eo_gendata(unsigned char *);
5STATIC bool is_eo_even(cube_t); 5STATIC bool is_eo_even(cube_t);
6 6
7STATIC coord_t coordinate_eo = { 7STATIC coord_t coordinate_eo = {
@@ -24,13 +24,13 @@ STATIC coord_t coordinate_eo = {
24}; 24};
25 25
26STATIC uint64_t 26STATIC uint64_t
27coordinate_eo_coord(cube_t c, const void *data) 27coordinate_eo_coord(cube_t c, const unsigned char *data)
28{ 28{
29 return (uint64_t)coord_eo(c); 29 return (uint64_t)coord_eo(c);
30} 30}
31 31
32STATIC cube_t 32STATIC cube_t
33coordinate_eo_cube(uint64_t c, const void *data) 33coordinate_eo_cube(uint64_t c, const unsigned char *data)
34{ 34{
35 cube_t cube = SOLVED_CUBE; 35 cube_t cube = SOLVED_CUBE;
36 set_eo(&cube, (int64_t)c); 36 set_eo(&cube, (int64_t)c);
@@ -38,13 +38,13 @@ coordinate_eo_cube(uint64_t c, const void *data)
38} 38}
39 39
40STATIC bool 40STATIC bool
41coordinate_eo_isnasty(uint64_t c, const void *data) 41coordinate_eo_isnasty(uint64_t c, const unsigned char *data)
42{ 42{
43 return false; 43 return false;
44} 44}
45 45
46STATIC size_t 46STATIC size_t
47coordinate_eo_gendata(void *data) 47coordinate_eo_gendata(unsigned char *data)
48{ 48{
49 return 0; 49 return 0;
50} 50}
diff --git a/src/solvers/coord/gendata.h b/src/solvers/coord/gendata.h
index ae7b39e..7a974f8 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], void *); 1STATIC size_t gendata_coord(const coord_t [static 1], unsigned char *);
2STATIC int64_t gendata_coord_dispatch(const char *, void *); 2STATIC int64_t gendata_coord_dispatch(const char *, unsigned char *);
3STATIC tableinfo_t genptable_coord( 3STATIC tableinfo_t genptable_coord(
4 const coord_t [static 1], const void *, uint8_t *); 4 const coord_t [static 1], const unsigned char *, unsigned char *);
5STATIC bool switch_to_fromnew(uint64_t, uint64_t, uint64_t); 5STATIC bool switch_to_fromnew(uint64_t, uint64_t, uint64_t);
6STATIC uint64_t genptable_coord_fillneighbors( 6STATIC uint64_t genptable_coord_fillneighbors(const coord_t [static 1],
7 const coord_t [static 1], const void *, uint64_t, uint8_t, uint8_t *); 7 const unsigned char *, uint64_t, uint8_t, unsigned char *);
8STATIC uint64_t genptable_coord_fillfromnew( 8STATIC uint64_t genptable_coord_fillfromnew(const coord_t [static 1],
9 const coord_t [static 1], const void *, uint64_t, uint8_t, uint8_t *); 9 const unsigned char *, uint64_t, uint8_t, unsigned char *);
10STATIC void getdistribution_coord( 10STATIC void getdistribution_coord(const unsigned char *, const char *,
11 const uint8_t *, const char *, uint64_t [static INFO_DISTRIBUTION_LEN]); 11 uint64_t [static INFO_DISTRIBUTION_LEN]);
12STATIC uint8_t get_coord_pval( 12STATIC uint8_t get_coord_pval(
13 const coord_t [static 1], const uint8_t *, uint64_t); 13 const coord_t [static 1], const unsigned char *, uint64_t);
14STATIC void set_coord_pval( 14STATIC void set_coord_pval(
15 const coord_t [static 1], uint8_t *, uint64_t, uint8_t); 15 const coord_t [static 1], unsigned char *, uint64_t, uint8_t);
16 16
17STATIC int64_t 17STATIC int64_t
18gendata_coord_dispatch(const char *coordstr, void *buf) 18gendata_coord_dispatch(const char *coordstr, unsigned char *buf)
19{ 19{
20 coord_t *coord; 20 coord_t *coord;
21 21
@@ -30,14 +30,14 @@ gendata_coord_dispatch(const char *coordstr, void *buf)
30} 30}
31 31
32STATIC size_t 32STATIC size_t
33gendata_coord(const coord_t coord[static 1], void *buf) 33gendata_coord(const coord_t coord[static 1], unsigned char *buf)
34{ 34{
35 uint64_t coord_dsize, tablesize, ninfo; 35 uint64_t coord_dsize, tablesize, ninfo;
36 void *pruningbuf, *coord_data; 36 unsigned char *pruningbuf, *coord_data;
37 uint8_t *table; 37 unsigned char *table;
38 tableinfo_t coord_data_info, pruning_info; 38 tableinfo_t coord_data_info, pruning_info;
39 39
40 coord_data = buf == NULL ? NULL : ((uint8_t *)buf) + INFOSIZE; 40 coord_data = buf == NULL ? NULL : buf + INFOSIZE;
41 coord_dsize = coord->gendata(coord_data); 41 coord_dsize = coord->gendata(coord_data);
42 if (coord_dsize == SIZE_MAX) 42 if (coord_dsize == SIZE_MAX)
43 goto gendata_coord_error; 43 goto gendata_coord_error;
@@ -69,12 +69,12 @@ gendata_coord(const coord_t coord[static 1], void *buf)
69 69
70 writetableinfo(&coord_data_info, INFOSIZE + coord_dsize, buf); 70 writetableinfo(&coord_data_info, INFOSIZE + coord_dsize, buf);
71 71
72 pruningbuf = ((uint8_t *)buf) + INFOSIZE + coord_dsize; 72 pruningbuf = buf + INFOSIZE + coord_dsize;
73 } else { 73 } else {
74 pruningbuf = buf; 74 pruningbuf = buf;
75 } 75 }
76 76
77 table = ((uint8_t *)pruningbuf) + INFOSIZE; 77 table = pruningbuf + INFOSIZE;
78 pruning_info = genptable_coord(coord, coord_data, table); 78 pruning_info = genptable_coord(coord, coord_data, table);
79 writetableinfo(&pruning_info, INFOSIZE + tablesize, pruningbuf); 79 writetableinfo(&pruning_info, INFOSIZE + tablesize, pruningbuf);
80 80
@@ -89,8 +89,8 @@ gendata_coord_error:
89STATIC tableinfo_t 89STATIC tableinfo_t
90genptable_coord( 90genptable_coord(
91 const coord_t coord[static 1], 91 const coord_t coord[static 1],
92 const void *data, 92 const unsigned char *data,
93 uint8_t *table 93 unsigned char *table
94) 94)
95{ 95{
96 uint64_t tablesize, i, d, tot, t, nm; 96 uint64_t tablesize, i, d, tot, t, nm;
@@ -161,10 +161,10 @@ switch_to_fromnew(uint64_t done, uint64_t max, uint64_t nm)
161STATIC uint64_t 161STATIC uint64_t
162genptable_coord_fillneighbors( 162genptable_coord_fillneighbors(
163 const coord_t coord[static 1], 163 const coord_t coord[static 1],
164 const void *data, 164 const unsigned char *data,
165 uint64_t i, 165 uint64_t i,
166 uint8_t d, 166 uint8_t d,
167 uint8_t *table 167 unsigned char *table
168) 168)
169{ 169{
170 bool isnasty; 170 bool isnasty;
@@ -198,10 +198,10 @@ genptable_coord_fillneighbors(
198STATIC uint64_t 198STATIC uint64_t
199genptable_coord_fillfromnew( 199genptable_coord_fillfromnew(
200 const coord_t coord[static 1], 200 const coord_t coord[static 1],
201 const void *data, 201 const unsigned char *data,
202 uint64_t i, 202 uint64_t i,
203 uint8_t d, 203 uint8_t d,
204 uint8_t *table 204 unsigned char *table
205) 205)
206{ 206{
207 bool found; 207 bool found;
@@ -251,7 +251,7 @@ genptable_coord_fillfromnew(
251 251
252STATIC void 252STATIC void
253getdistribution_coord( 253getdistribution_coord(
254 const uint8_t *table, 254 const unsigned char *table,
255 const char *coord, 255 const char *coord,
256 uint64_t distr[static INFO_DISTRIBUTION_LEN] 256 uint64_t distr[static INFO_DISTRIBUTION_LEN]
257) 257)
@@ -274,7 +274,7 @@ getdistribution_coord(
274STATIC uint8_t 274STATIC uint8_t
275get_coord_pval( 275get_coord_pval(
276 const coord_t coord[static 1], 276 const coord_t coord[static 1],
277 const uint8_t *table, 277 const unsigned char *table,
278 uint64_t i 278 uint64_t i
279) 279)
280{ 280{
@@ -284,7 +284,7 @@ get_coord_pval(
284STATIC void 284STATIC void
285set_coord_pval( 285set_coord_pval(
286 const coord_t coord[static 1], 286 const coord_t coord[static 1],
287 uint8_t *table, 287 unsigned char *table,
288 uint64_t i, 288 uint64_t i,
289 uint8_t val 289 uint8_t val
290) 290)
diff --git a/src/solvers/coord/solve.h b/src/solvers/coord/solve.h
index 072aa27..fb996ac 100644
--- a/src/solvers/coord/solve.h
+++ b/src/solvers/coord/solve.h
@@ -8,16 +8,16 @@ typedef struct {
8 uint8_t nissflag; 8 uint8_t nissflag;
9 bool lastisnormal; 9 bool lastisnormal;
10 coord_t *coord; 10 coord_t *coord;
11 const void *coord_data; 11 const unsigned char *coord_data;
12 const uint8_t *ptable; 12 const unsigned char *ptable;
13} dfsarg_solve_coord_t; 13} dfsarg_solve_coord_t;
14 14
15STATIC int64_t solve_coord(cube_t, coord_t [static 1], uint8_t, uint8_t, 15STATIC int64_t solve_coord(cube_t, coord_t [static 1], uint8_t, uint8_t,
16 uint8_t, uint8_t, uint64_t, uint8_t, uint8_t, uint64_t, const void *, 16 uint8_t, uint8_t, uint64_t, uint8_t, uint8_t, uint64_t,
17 size_t n, char [n]); 17 const unsigned char *, size_t n, char [n]);
18STATIC int64_t solve_coord_dispatch(cube_t, const char *, uint8_t, uint8_t, 18STATIC int64_t solve_coord_dispatch(cube_t, const char *, uint8_t, uint8_t,
19 uint8_t, uint64_t, uint8_t, uint8_t, uint64_t, const void *, size_t n, 19 uint8_t, uint64_t, uint8_t, uint8_t, uint64_t, const unsigned char *,
20 char [n]); 20 size_t n, char [n]);
21STATIC bool coord_solution_admissible(const dfsarg_solve_coord_t [static 1]); 21STATIC bool coord_solution_admissible(const dfsarg_solve_coord_t [static 1]);
22STATIC bool solve_coord_dfs_stop(const dfsarg_solve_coord_t [static 1]); 22STATIC bool solve_coord_dfs_stop(const dfsarg_solve_coord_t [static 1]);
23STATIC bool coord_continue_onnormal(const dfsarg_solve_coord_t [static 1]); 23STATIC bool coord_continue_onnormal(const dfsarg_solve_coord_t [static 1]);
@@ -209,7 +209,7 @@ solve_coord_dispatch(
209 uint8_t optimal, 209 uint8_t optimal,
210 uint8_t threads, 210 uint8_t threads,
211 uint64_t data_size, 211 uint64_t data_size,
212 const void *data, 212 const unsigned char *data,
213 size_t solutions_size, 213 size_t solutions_size,
214 char sols[solutions_size] 214 char sols[solutions_size]
215) 215)
@@ -248,7 +248,7 @@ solve_coord(
248 uint8_t optimal, 248 uint8_t optimal,
249 uint8_t threads, 249 uint8_t threads,
250 uint64_t data_size, 250 uint64_t data_size,
251 const void *data, 251 const unsigned char *data,
252 size_t solutions_size, 252 size_t solutions_size,
253 char sols[solutions_size] 253 char sols[solutions_size]
254) 254)
@@ -257,8 +257,8 @@ solve_coord(
257 uint8_t t; 257 uint8_t t;
258 int64_t ndepth; 258 int64_t ndepth;
259 cube_t c; 259 cube_t c;
260 const void *coord_data; 260 const unsigned char *coord_data;
261 const uint8_t *ptable; 261 const unsigned char *ptable;
262 dfsarg_solve_coord_t arg; 262 dfsarg_solve_coord_t arg;
263 tableinfo_t info; 263 tableinfo_t info;
264 solution_moves_t solution_moves; 264 solution_moves_t solution_moves;
@@ -280,11 +280,11 @@ solve_coord(
280 if (info.type == TABLETYPE_PRUNING) { 280 if (info.type == TABLETYPE_PRUNING) {
281 /* Only the pruning table */ 281 /* Only the pruning table */
282 coord_data = NULL; 282 coord_data = NULL;
283 ptable = (uint8_t *)data + INFOSIZE; 283 ptable = data + INFOSIZE;
284 } else { 284 } else {
285 /* Coordinate has extra data */ 285 /* Coordinate has extra data */
286 coord_data = (uint8_t *)data + INFOSIZE; 286 coord_data = data + INFOSIZE;
287 ptable = (uint8_t *)data + info.next + INFOSIZE; 287 ptable = data + info.next + INFOSIZE;
288 } 288 }
289 289
290 solution_moves_reset(&solution_moves); 290 solution_moves_reset(&solution_moves);
diff --git a/src/solvers/coord/types_macros.h b/src/solvers/coord/types_macros.h
index 84ed8eb..2767dcc 100644
--- a/src/solvers/coord/types_macros.h
+++ b/src/solvers/coord/types_macros.h
@@ -16,10 +16,10 @@
16 16
17typedef struct { 17typedef struct {
18 const char name[255]; 18 const char name[255];
19 uint64_t (*coord)(cube_t, const void *); 19 uint64_t (*coord)(cube_t, const unsigned char *);
20 cube_t (*cube)(uint64_t, const void *); 20 cube_t (*cube)(uint64_t, const unsigned char *);
21 bool (*isnasty)(uint64_t, const void *); 21 bool (*isnasty)(uint64_t, const unsigned char *);
22 size_t (*gendata)(void *); 22 size_t (*gendata)(unsigned char *);
23 uint64_t max; 23 uint64_t max;
24 uint32_t moves_mask; 24 uint32_t moves_mask;
25 uint64_t trans_mask; 25 uint64_t trans_mask;
diff --git a/src/solvers/h48/gendata_cocsep.h b/src/solvers/h48/gendata_cocsep.h
index f07b71a..2eac383 100644
--- a/src/solvers/h48/gendata_cocsep.h
+++ b/src/solvers/h48/gendata_cocsep.h
@@ -1,4 +1,4 @@
1STATIC size_t gendata_cocsep(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 [static 1]);
3STATIC void getdistribution_cocsep( 3STATIC void getdistribution_cocsep(
4 const uint32_t [static COCSEP_TABLESIZE], uint64_t [static 21]); 4 const uint32_t [static COCSEP_TABLESIZE], uint64_t [static 21]);
@@ -13,7 +13,7 @@ STATIC_INLINE int8_t get_h48_cdata(
13 13
14STATIC size_t 14STATIC size_t
15gendata_cocsep( 15gendata_cocsep(
16 char *buf, 16 unsigned char *buf,
17 uint64_t *selfsim, 17 uint64_t *selfsim,
18 cube_t *rep 18 cube_t *rep
19) 19)
diff --git a/src/solvers/h48/gendata_eoesep.h b/src/solvers/h48/gendata_eoesep.h
index 4bf5a84..f1e3d4c 100644
--- a/src/solvers/h48/gendata_eoesep.h
+++ b/src/solvers/h48/gendata_eoesep.h
@@ -1,7 +1,7 @@
1STATIC int64_t coord_eoesep_sym(cube_t, const uint32_t [static ESEP_MAX]); 1STATIC int64_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(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 [static EOESEP_BUF],
6 uint32_t [static ESEP_MAX], uint16_t [static ESEP_CLASSES]); 6 uint32_t [static ESEP_MAX], uint16_t [static 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 [static EOESEP_BUF],
@@ -14,7 +14,7 @@ STATIC 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)], int64_t);
17STATIC uint8_t get_eoesep_pval_cube(const void *, 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)], int64_t, uint8_t);
20 20
@@ -67,9 +67,10 @@ gendata_esep_classes(
67} 67}
68 68
69STATIC size_t 69STATIC size_t
70gendata_eoesep(char *buf, uint8_t maxdepth) 70gendata_eoesep(unsigned char *buf, uint8_t maxdepth)
71{ 71{
72 uint8_t *buf8, d; 72 uint8_t d;
73 unsigned char *buf8;
73 uint16_t rep[ESEP_CLASSES]; 74 uint16_t rep[ESEP_CLASSES];
74 uint32_t *esep_classes, done, level; 75 uint32_t *esep_classes, done, level;
75 int64_t coord; 76 int64_t coord;
@@ -81,7 +82,7 @@ gendata_eoesep(char *buf, uint8_t maxdepth)
81 LOG("Computing eoesep data\n"); 82 LOG("Computing eoesep data\n");
82 memset(buf, 0xFF, EOESEP_FULLSIZE); 83 memset(buf, 0xFF, EOESEP_FULLSIZE);
83 esep_classes = (uint32_t *)(buf + INFOSIZE); 84 esep_classes = (uint32_t *)(buf + INFOSIZE);
84 buf8 = (uint8_t *)(buf + INFOSIZE + 4*ESEP_MAX); 85 buf8 = buf + INFOSIZE + 4*ESEP_MAX;
85 gendata_esep_classes(esep_classes, rep); 86 gendata_esep_classes(esep_classes, rep);
86 87
87 info = (tableinfo_t) { 88 info = (tableinfo_t) {
@@ -258,17 +259,13 @@ get_eoesep_pval(
258} 259}
259 260
260STATIC uint8_t 261STATIC uint8_t
261get_eoesep_pval_cube(const void *data, cube_t c) 262get_eoesep_pval_cube(const unsigned char *data, cube_t c)
262{ 263{
263 int64_t coord; 264 int64_t coord;
264 const uint8_t *table;
265 const uint32_t *esep_classes;
266 265
267 esep_classes = (const uint32_t *)data; 266 coord = coord_eoesep_sym(c, (const uint32_t *)data);
268 table = (const uint8_t *)data + 4*ESEP_MAX;
269 coord = coord_eoesep_sym(c, esep_classes);
270 267
271 return get_eoesep_pval(table, coord); 268 return get_eoesep_pval(data + 4*ESEP_MAX, coord);
272} 269}
273 270
274STATIC void 271STATIC void
diff --git a/src/solvers/h48/gendata_h48.h b/src/solvers/h48/gendata_h48.h
index 18157dc..a878978 100644
--- a/src/solvers/h48/gendata_h48.h
+++ b/src/solvers/h48/gendata_h48.h
@@ -13,20 +13,20 @@ STATIC_INLINE bool gendata_h48k2_dfs_stop(
13STATIC void gendata_h48k2_dfs(h48k2_dfs_arg_t [static 1]); 13STATIC void gendata_h48k2_dfs(h48k2_dfs_arg_t [static 1]);
14STATIC tableinfo_t makeinfo_h48k2(gendata_h48_arg_t [static 1]); 14STATIC tableinfo_t makeinfo_h48k2(gendata_h48_arg_t [static 1]);
15STATIC void *getdistribution_h48_runthread(void *); 15STATIC void *getdistribution_h48_runthread(void *);
16STATIC void getdistribution_h48(const uint8_t *, 16STATIC void getdistribution_h48(const unsigned char *,
17 uint64_t [static INFO_DISTRIBUTION_LEN], uint8_t, uint8_t); 17 uint64_t [static INFO_DISTRIBUTION_LEN], uint8_t, uint8_t);
18 18
19STATIC const uint32_t *get_cocsepdata_constptr(const void *); 19STATIC const uint32_t *get_cocsepdata_constptr(const unsigned char *);
20STATIC const uint8_t *get_h48data_constptr(const void *); 20STATIC const unsigned char *get_h48data_constptr(const unsigned char *);
21 21
22STATIC_INLINE uint8_t get_h48_pval(const uint8_t *, int64_t, uint8_t); 22STATIC_INLINE uint8_t get_h48_pval(const unsigned char *, int64_t, uint8_t);
23STATIC_INLINE void set_h48_pval(uint8_t *, int64_t, uint8_t, uint8_t); 23STATIC_INLINE void set_h48_pval(unsigned char *, int64_t, uint8_t, uint8_t);
24STATIC_INLINE uint8_t get_h48_pval_atomic( 24STATIC_INLINE uint8_t get_h48_pval_atomic(
25 _Atomic const uint8_t *, int64_t, uint8_t); 25 _Atomic const unsigned char *, int64_t, uint8_t);
26STATIC_INLINE void set_h48_pval_atomic( 26STATIC_INLINE void set_h48_pval_atomic(
27 _Atomic uint8_t *, int64_t, uint8_t, uint8_t); 27 _Atomic unsigned char *, int64_t, uint8_t, uint8_t);
28 28
29size_t gendata_h48_derive(uint8_t, const void *, void *); 29size_t gendata_h48_derive(uint8_t, const unsigned char *, unsigned char *);
30 30
31STATIC uint64_t 31STATIC uint64_t
32gendata_h48short(gendata_h48short_arg_t arg[static 1]) 32gendata_h48short(gendata_h48short_arg_t arg[static 1])
@@ -67,7 +67,7 @@ gendata_h48(gendata_h48_arg_t arg[static 1])
67{ 67{
68 uint64_t size, cocsepsize, h48size, fallbacksize, fallback2size, of; 68 uint64_t size, cocsepsize, h48size, fallbacksize, fallback2size, of;
69 long long r; 69 long long r;
70 void *cocsepdata_offset; 70 unsigned char *cocsepdata_offset;
71 tableinfo_t cocsepinfo, h48info, fallbackinfo; 71 tableinfo_t cocsepinfo, h48info, fallbackinfo;
72 gendata_h48_arg_t arg_h0k4; 72 gendata_h48_arg_t arg_h0k4;
73 73
@@ -95,9 +95,9 @@ gendata_h48(gendata_h48_arg_t arg[static 1])
95 95
96 gendata_cocsep(arg->buf, arg->selfsim, arg->crep); 96 gendata_cocsep(arg->buf, arg->selfsim, arg->crep);
97 97
98 cocsepdata_offset = (char *)arg->buf + INFOSIZE; 98 cocsepdata_offset = arg->buf + INFOSIZE;
99 arg->cocsepdata = (uint32_t *)cocsepdata_offset; 99 arg->cocsepdata = (uint32_t *)cocsepdata_offset;
100 arg->h48buf = (char *)arg->buf + cocsepsize; 100 arg->h48buf = (_Atomic unsigned char*)arg->buf + cocsepsize;
101 101
102 arg->base = 99; /* TODO: set this somewhere else */ 102 arg->base = 99; /* TODO: set this somewhere else */
103 103
@@ -136,8 +136,8 @@ gendata_h48(gendata_h48_arg_t arg[static 1])
136 arg_h0k4.base = 0; 136 arg_h0k4.base = 0;
137 arg_h0k4.maxdepth = 20; 137 arg_h0k4.maxdepth = 20;
138 arg_h0k4.buf_size = arg->buf_size - h48size; 138 arg_h0k4.buf_size = arg->buf_size - h48size;
139 arg_h0k4.buf = (char *)arg->buf + cocsepsize + h48size; 139 arg_h0k4.buf = arg->buf + cocsepsize + h48size;
140 arg_h0k4.h48buf = (char *)arg->h48buf + h48size; 140 arg_h0k4.h48buf = arg->h48buf + h48size;
141 141
142 gendata_h48h0k4(&arg_h0k4); 142 gendata_h48h0k4(&arg_h0k4);
143 143
@@ -145,7 +145,7 @@ gendata_h48(gendata_h48_arg_t arg[static 1])
145 145
146 /* Add eoesep fallback table */ 146 /* Add eoesep fallback table */
147 147
148 gendata_eoesep((char *)arg->buf + (size - fallback2size), 20); 148 gendata_eoesep(arg->buf + (size - fallback2size), 20);
149 149
150 /* Update tableinfo with correct next values */ 150 /* Update tableinfo with correct next values */
151 151
@@ -157,7 +157,7 @@ gendata_h48(gendata_h48_arg_t arg[static 1])
157 } 157 }
158 h48info.next = h48size; 158 h48info.next = h48size;
159 r = writetableinfo(&h48info, 159 r = writetableinfo(&h48info,
160 arg->buf_size - cocsepsize, (char *)arg->buf + cocsepsize); 160 arg->buf_size - cocsepsize, arg->buf + cocsepsize);
161 if (r != NISSY_OK) { 161 if (r != NISSY_OK) {
162 LOG("[H48 gendata] Error: could not write info " 162 LOG("[H48 gendata] Error: could not write info "
163 "for h48 table\n"); 163 "for h48 table\n");
@@ -174,8 +174,8 @@ gendata_h48(gendata_h48_arg_t arg[static 1])
174 174
175 of = cocsepsize + h48size; 175 of = cocsepsize + h48size;
176 fallbackinfo.next = fallbacksize; 176 fallbackinfo.next = fallbacksize;
177 r = writetableinfo(&fallbackinfo, 177 r = writetableinfo(
178 arg->buf_size - of, (char *)arg->buf + of); 178 &fallbackinfo, arg->buf_size - of, arg->buf + of);
179 if (r != NISSY_OK) { 179 if (r != NISSY_OK) {
180 LOG("[H48 gendata] Error: could not write info for " 180 LOG("[H48 gendata] Error: could not write info for "
181 "h48 fallback table\n"); 181 "h48 fallback table\n");
@@ -189,7 +189,7 @@ gendata_h48(gendata_h48_arg_t arg[static 1])
189STATIC void 189STATIC void
190gendata_h48h0k4(gendata_h48_arg_t arg[static 1]) 190gendata_h48h0k4(gendata_h48_arg_t arg[static 1])
191{ 191{
192 _Atomic uint8_t *table; 192 _Atomic unsigned char *table;
193 uint8_t val; 193 uint8_t val;
194 int64_t i, sc, done, d, h48max; 194 int64_t i, sc, done, d, h48max;
195 uint64_t t, tt, isize, cc, bufsize; 195 uint64_t t, tt, isize, cc, bufsize;
@@ -212,7 +212,7 @@ gendata_h48h0k4(gendata_h48_arg_t arg[static 1])
212 .next = 0, 212 .next = 0,
213 }; 213 };
214 214
215 table = (_Atomic uint8_t *)arg->h48buf + INFOSIZE; 215 table = arg->h48buf + INFOSIZE;
216 memset(table, 0xFF, H48_TABLESIZE(0, 4)); 216 memset(table, 0xFF, H48_TABLESIZE(0, 4));
217 217
218 h48max = (int64_t)H48_COORDMAX(0); 218 h48max = (int64_t)H48_COORDMAX(0);
@@ -261,7 +261,7 @@ gendata_h48h0k4(gendata_h48_arg_t arg[static 1])
261 261
262 arg->info.maxvalue = d - 1; 262 arg->info.maxvalue = d - 1;
263 bufsize = arg->buf_size - COCSEP_FULLSIZE; 263 bufsize = arg->buf_size - COCSEP_FULLSIZE;
264 writetableinfo(&arg->info, bufsize, arg->h48buf); 264 writetableinfo(&arg->info, bufsize, (unsigned char *)arg->h48buf);
265} 265}
266 266
267STATIC void * 267STATIC void *
@@ -374,7 +374,7 @@ gendata_h48k2(gendata_h48_arg_t arg[static 1])
374 }; 374 };
375 375
376 uint8_t t; 376 uint8_t t;
377 uint8_t *table; 377 unsigned char *table;
378 int64_t j; 378 int64_t j;
379 uint64_t i, ii, inext, count, bufsize; 379 uint64_t i, ii, inext, count, bufsize;
380 h48map_t shortcubes; 380 h48map_t shortcubes;
@@ -383,7 +383,7 @@ gendata_h48k2(gendata_h48_arg_t arg[static 1])
383 pthread_t thread[THREADS]; 383 pthread_t thread[THREADS];
384 pthread_mutex_t shortcubes_mutex, table_mutex[CHUNKS]; 384 pthread_mutex_t shortcubes_mutex, table_mutex[CHUNKS];
385 385
386 table = (uint8_t *)arg->h48buf + INFOSIZE; 386 table = (unsigned char *)arg->h48buf + INFOSIZE;
387 memset(table, 0xFF, H48_TABLESIZE(arg->h, arg->k)); 387 memset(table, 0xFF, H48_TABLESIZE(arg->h, arg->k));
388 388
389 LOG("[H48 gendata] Computing depth <=%" PRIu8 "\n", shortdepth) 389 LOG("[H48 gendata] Computing depth <=%" PRIu8 "\n", shortdepth)
@@ -439,7 +439,7 @@ gendata_h48k2(gendata_h48_arg_t arg[static 1])
439 } 439 }
440 440
441 bufsize = arg->buf_size - COCSEP_FULLSIZE; 441 bufsize = arg->buf_size - COCSEP_FULLSIZE;
442 writetableinfo(&arg->info, bufsize, arg->h48buf); 442 writetableinfo(&arg->info, bufsize, (unsigned char *)arg->h48buf);
443} 443}
444 444
445STATIC void * 445STATIC void *
@@ -653,7 +653,7 @@ STATIC void *
653getdistribution_h48_runthread(void *arg) 653getdistribution_h48_runthread(void *arg)
654{ 654{
655 getdistribution_h48_data_t *data = (getdistribution_h48_data_t *)arg; 655 getdistribution_h48_data_t *data = (getdistribution_h48_data_t *)arg;
656 const uint8_t *table; 656 const unsigned char *table;
657 uint8_t j, k, m; 657 uint8_t j, k, m;
658 int64_t i; 658 int64_t i;
659 659
@@ -671,7 +671,7 @@ getdistribution_h48_runthread(void *arg)
671 671
672STATIC void 672STATIC void
673getdistribution_h48( 673getdistribution_h48(
674 const uint8_t *table, 674 const unsigned char *table,
675 uint64_t distr[static INFO_DISTRIBUTION_LEN], 675 uint64_t distr[static INFO_DISTRIBUTION_LEN],
676 uint8_t h, 676 uint8_t h,
677 uint8_t k 677 uint8_t k
@@ -708,50 +708,55 @@ getdistribution_h48(
708} 708}
709 709
710STATIC const uint32_t * 710STATIC const uint32_t *
711get_cocsepdata_constptr(const void *data) 711get_cocsepdata_constptr(const unsigned char *data)
712{ 712{
713 return (uint32_t *)((char *)data + INFOSIZE); 713 return (uint32_t *)(data + INFOSIZE);
714} 714}
715 715
716STATIC const uint8_t * 716STATIC const unsigned char *
717get_h48data_constptr(const void *data) 717get_h48data_constptr(const unsigned char *data)
718{ 718{
719 return (uint8_t *)data + COCSEP_FULLSIZE + INFOSIZE; 719 return data + COCSEP_FULLSIZE + INFOSIZE;
720} 720}
721 721
722STATIC_INLINE uint8_t 722STATIC_INLINE uint8_t
723get_h48_pval(const uint8_t *table, int64_t i, uint8_t k) 723get_h48_pval(const unsigned char *table, int64_t i, uint8_t k)
724{ 724{
725 return (table[H48_INDEX(i, k)] & H48_MASK(i, k)) >> H48_SHIFT(i, k); 725 return (table[H48_INDEX(i, k)] & H48_MASK(i, k)) >> H48_SHIFT(i, k);
726} 726}
727 727
728STATIC_INLINE uint8_t 728STATIC_INLINE uint8_t
729get_h48_pval_atomic(_Atomic const uint8_t *table, int64_t i, uint8_t k) 729get_h48_pval_atomic(_Atomic const unsigned char *table, int64_t i, uint8_t k)
730{ 730{
731 return (table[H48_INDEX(i, k)] & H48_MASK(i, k)) >> H48_SHIFT(i, k); 731 return (table[H48_INDEX(i, k)] & H48_MASK(i, k)) >> H48_SHIFT(i, k);
732} 732}
733 733
734STATIC_INLINE void 734STATIC_INLINE void
735set_h48_pval(uint8_t *table, int64_t i, uint8_t k, uint8_t val) 735set_h48_pval(unsigned char *table, int64_t i, uint8_t k, uint8_t val)
736{ 736{
737 table[H48_INDEX(i, k)] = (table[H48_INDEX(i, k)] & (~H48_MASK(i, k))) 737 table[H48_INDEX(i, k)] = (table[H48_INDEX(i, k)] & (~H48_MASK(i, k)))
738 | (val << H48_SHIFT(i, k)); 738 | (val << H48_SHIFT(i, k));
739} 739}
740 740
741STATIC_INLINE void 741STATIC_INLINE void
742set_h48_pval_atomic(_Atomic uint8_t *table, int64_t i, uint8_t k, uint8_t val) 742set_h48_pval_atomic(
743 _Atomic unsigned char *table,
744 int64_t i,
745 uint8_t k,
746 uint8_t val
747)
743{ 748{
744 table[H48_INDEX(i, k)] = (table[H48_INDEX(i, k)] & (~H48_MASK(i, k))) 749 table[H48_INDEX(i, k)] = (table[H48_INDEX(i, k)] & (~H48_MASK(i, k)))
745 | (val << H48_SHIFT(i, k)); 750 | (val << H48_SHIFT(i, k));
746} 751}
747 752
748size_t 753size_t
749gendata_h48_derive(uint8_t h, const void *fulltable, void *buf) 754gendata_h48_derive(uint8_t h, const unsigned char *fulltable, unsigned char *buf)
750{ 755{
751 size_t cocsepsize, h48size; 756 size_t cocsepsize, h48size;
752 uint8_t val_full, val_derive; 757 uint8_t val_full, val_derive;
753 const uint8_t *h48full; 758 const unsigned char *h48full;
754 uint8_t *h48derive; 759 unsigned char *h48derive;
755 int64_t i, j, h48max; 760 int64_t i, j, h48max;
756 uint64_t bufsize; 761 uint64_t bufsize;
757 gendata_h48_arg_t arg; 762 gendata_h48_arg_t arg;
@@ -770,14 +775,14 @@ gendata_h48_derive(uint8_t h, const void *fulltable, void *buf)
770 arg.k = fulltableinfo.bits; 775 arg.k = fulltableinfo.bits;
771 arg.maxdepth = 20; 776 arg.maxdepth = 20;
772 arg.buf = buf; 777 arg.buf = buf;
773 arg.cocsepdata = (uint32_t *)((char *)buf + INFOSIZE); 778 arg.cocsepdata = (uint32_t *)(buf + INFOSIZE);
774 arg.base = fulltableinfo.base; 779 arg.base = fulltableinfo.base;
775 arg.info = makeinfo_h48k2(&arg); 780 arg.info = makeinfo_h48k2(&arg);
776 781
777 /* Technically this step is redundant, except that we 782 /* Technically this step is redundant, except that we
778 need selfsim and crep */ 783 need selfsim and crep */
779 cocsepsize = gendata_cocsep(buf, arg.selfsim, arg.crep); 784 cocsepsize = gendata_cocsep(buf, arg.selfsim, arg.crep);
780 arg.h48buf = (_Atomic uint8_t *)buf + cocsepsize; 785 arg.h48buf = (_Atomic unsigned char *)buf + cocsepsize;
781 h48size = H48_TABLESIZE(h, arg.k) + INFOSIZE; 786 h48size = H48_TABLESIZE(h, arg.k) + INFOSIZE;
782 787
783 if (buf == NULL) 788 if (buf == NULL)
@@ -798,8 +803,8 @@ gendata_h48_derive(uint8_t h, const void *fulltable, void *buf)
798 goto gendata_h48_derive_error; 803 goto gendata_h48_derive_error;
799 } 804 }
800 805
801 h48full = (const uint8_t *)fulltable + cocsepsize + INFOSIZE; 806 h48full = fulltable + cocsepsize + INFOSIZE;
802 h48derive = (uint8_t *)arg.h48buf + INFOSIZE; 807 h48derive = (unsigned char *)arg.h48buf + INFOSIZE;
803 memset(h48derive, 0xFF, H48_TABLESIZE(h, arg.k)); 808 memset(h48derive, 0xFF, H48_TABLESIZE(h, arg.k));
804 memset(arg.info.distribution, 0, 809 memset(arg.info.distribution, 0,
805 INFO_DISTRIBUTION_LEN * sizeof(uint64_t)); 810 INFO_DISTRIBUTION_LEN * sizeof(uint64_t));
@@ -819,7 +824,8 @@ gendata_h48_derive(uint8_t h, const void *fulltable, void *buf)
819 getdistribution_h48(h48derive, arg.info.distribution, h, arg.k); 824 getdistribution_h48(h48derive, arg.info.distribution, h, arg.k);
820 825
821 bufsize = arg.buf_size - COCSEP_FULLSIZE - INFOSIZE; 826 bufsize = arg.buf_size - COCSEP_FULLSIZE - INFOSIZE;
822 if (writetableinfo(&arg.info, bufsize, arg.h48buf) != NISSY_OK) { 827 if (writetableinfo(&arg.info, bufsize, (unsigned char *)arg.h48buf)
828 != NISSY_OK) {
823 LOG("H48 derive gendata] Error: could not write info " 829 LOG("H48 derive gendata] Error: could not write info "
824 "for table\n"); 830 "for table\n");
825 goto gendata_h48_derive_error; 831 goto gendata_h48_derive_error;
diff --git a/src/solvers/h48/gendata_types_macros.h b/src/solvers/h48/gendata_types_macros.h
index 3f0c666..c4b1b5a 100644
--- a/src/solvers/h48/gendata_types_macros.h
+++ b/src/solvers/h48/gendata_types_macros.h
@@ -55,7 +55,7 @@ typedef struct {
55 uint8_t maxdepth; 55 uint8_t maxdepth;
56 uint16_t *n; 56 uint16_t *n;
57 uint32_t *buf32; 57 uint32_t *buf32;
58 uint8_t *visited; 58 unsigned char *visited;
59 uint64_t *selfsim; 59 uint64_t *selfsim;
60 cube_t *rep; 60 cube_t *rep;
61} cocsep_dfs_arg_t; 61} cocsep_dfs_arg_t;
@@ -67,8 +67,8 @@ typedef struct {
67 uint8_t maxdepth; 67 uint8_t maxdepth;
68 tableinfo_t info; 68 tableinfo_t info;
69 uint64_t buf_size; 69 uint64_t buf_size;
70 void *buf; 70 unsigned char *buf;
71 void *h48buf; 71 _Atomic unsigned char *h48buf;
72 uint32_t *cocsepdata; 72 uint32_t *cocsepdata;
73 uint64_t selfsim[COCSEP_CLASSES]; 73 uint64_t selfsim[COCSEP_CLASSES];
74 cube_t crep[COCSEP_CLASSES]; 74 cube_t crep[COCSEP_CLASSES];
@@ -85,7 +85,7 @@ typedef struct {
85typedef struct { 85typedef struct {
86 uint8_t depth; 86 uint8_t depth;
87 uint32_t *cocsepdata; 87 uint32_t *cocsepdata;
88 _Atomic uint8_t *table; 88 _Atomic unsigned char *table;
89 uint64_t *selfsim; 89 uint64_t *selfsim;
90 cube_t *crep; 90 cube_t *crep;
91 uint64_t start; 91 uint64_t start;
@@ -100,7 +100,7 @@ typedef struct {
100 uint8_t base; 100 uint8_t base;
101 uint8_t shortdepth; 101 uint8_t shortdepth;
102 uint32_t *cocsepdata; 102 uint32_t *cocsepdata;
103 uint8_t *table; 103 unsigned char *table;
104 uint64_t *selfsim; 104 uint64_t *selfsim;
105 cube_t *crep; 105 cube_t *crep;
106 h48map_t *shortcubes; 106 h48map_t *shortcubes;
@@ -117,8 +117,8 @@ typedef struct {
117 uint8_t k; 117 uint8_t k;
118 uint32_t *cocsepdata; 118 uint32_t *cocsepdata;
119 uint64_t *selfsim; 119 uint64_t *selfsim;
120 uint8_t *table; 120 unsigned char *table;
121 _Atomic uint8_t *table_atomic; 121 _Atomic unsigned char *table_atomic;
122 pthread_mutex_t **table_mutex; 122 pthread_mutex_t **table_mutex;
123} gendata_h48_mark_t; 123} gendata_h48_mark_t;
124 124
@@ -127,5 +127,5 @@ typedef struct {
127 int64_t max; 127 int64_t max;
128 uint8_t k; 128 uint8_t k;
129 uint64_t *distr; 129 uint64_t *distr;
130 const uint8_t *table; 130 const unsigned char *table;
131} getdistribution_h48_data_t; 131} getdistribution_h48_data_t;
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;
diff --git a/src/solvers/tables.h b/src/solvers/tables.h
index db888b5..9147972 100644
--- a/src/solvers/tables.h
+++ b/src/solvers/tables.h
@@ -1,13 +1,14 @@
1STATIC uint64_t read_unaligned_u64(const char [static sizeof(uint64_t)]); 1STATIC uint64_t read_unaligned_u64(const unsigned char [static sizeof(uint64_t)]);
2STATIC void write_unaligned_u64(char [static sizeof(uint64_t)], uint64_t); 2STATIC void write_unaligned_u64(unsigned char [static sizeof(uint64_t)], uint64_t);
3STATIC int64_t readtableinfo(size_t n, const char [n], tableinfo_t [static 1]); 3STATIC int64_t readtableinfo(
4 size_t n, const unsigned char [n], tableinfo_t [static 1]);
4STATIC int64_t readtableinfo_n( 5STATIC int64_t readtableinfo_n(
5 size_t n, const char [n], uint8_t, tableinfo_t [static 1]); 6 size_t n, const unsigned char [n], uint8_t, tableinfo_t [static 1]);
6STATIC int64_t writetableinfo( 7STATIC int64_t writetableinfo(
7 const tableinfo_t [static 1], size_t n, char [n]); 8 const tableinfo_t [static 1], size_t n, unsigned char [n]);
8 9
9STATIC uint64_t 10STATIC uint64_t
10read_unaligned_u64(const char buf[static sizeof(uint64_t)]) 11read_unaligned_u64(const unsigned char buf[static sizeof(uint64_t)])
11{ 12{
12 uint64_t ret; 13 uint64_t ret;
13 14
@@ -17,7 +18,7 @@ read_unaligned_u64(const char buf[static sizeof(uint64_t)])
17} 18}
18 19
19STATIC void 20STATIC void
20write_unaligned_u64(char buf[static sizeof(uint64_t)], uint64_t x) 21write_unaligned_u64(unsigned char buf[static sizeof(uint64_t)], uint64_t x)
21{ 22{
22 memcpy(buf, &x, sizeof(uint64_t)); 23 memcpy(buf, &x, sizeof(uint64_t));
23} 24}
@@ -25,7 +26,7 @@ write_unaligned_u64(char buf[static sizeof(uint64_t)], uint64_t x)
25STATIC int64_t 26STATIC int64_t
26readtableinfo( 27readtableinfo(
27 size_t buf_size, 28 size_t buf_size,
28 const char buf[buf_size], 29 const unsigned char buf[buf_size],
29 tableinfo_t info[static 1] 30 tableinfo_t info[static 1]
30) 31)
31{ 32{
@@ -69,7 +70,7 @@ readtableinfo(
69STATIC int64_t 70STATIC int64_t
70readtableinfo_n( 71readtableinfo_n(
71 size_t buf_size, 72 size_t buf_size,
72 const char buf[buf_size], 73 const unsigned char buf[buf_size],
73 uint8_t n, 74 uint8_t n,
74 tableinfo_t info[static 1] 75 tableinfo_t info[static 1]
75) 76)
@@ -87,12 +88,12 @@ STATIC int64_t
87writetableinfo( 88writetableinfo(
88 const tableinfo_t info[static 1], 89 const tableinfo_t info[static 1],
89 size_t data_size, 90 size_t data_size,
90 char buf[data_size] 91 unsigned char buf[data_size]
91) 92)
92{ 93{
93 size_t i; 94 size_t i;
94 bool end; 95 bool end;
95 char *c; 96 unsigned char *c;
96 97
97 if (data_size < info->fullsize) { 98 if (data_size < info->fullsize) {
98 LOG("Error writing table: buffer size is too small " 99 LOG("Error writing table: buffer size is too small "
@@ -125,10 +126,10 @@ writetableinfo(
125 *c = 0; 126 *c = 0;
126 } 127 }
127 128
128 *(uint8_t *)OFFSET(buf, INFO_OFFSET_H48H) = info->h48h; 129 *OFFSET(buf, INFO_OFFSET_H48H) = (unsigned char)info->h48h;
129 *(uint8_t *)OFFSET(buf, INFO_OFFSET_BITS) = info->bits; 130 *OFFSET(buf, INFO_OFFSET_BITS) = (unsigned char)info->bits;
130 *(uint8_t *)OFFSET(buf, INFO_OFFSET_BASE) = info->base; 131 *OFFSET(buf, INFO_OFFSET_BASE) = (unsigned char)info->base;
131 *(uint8_t *)OFFSET(buf, INFO_OFFSET_MAXVALUE) = info->maxvalue; 132 *OFFSET(buf, INFO_OFFSET_MAXVALUE) = (unsigned char)info->maxvalue;
132 133
133 return NISSY_OK; 134 return NISSY_OK;
134} 135}
diff --git a/src/solvers/tables_types_macros.h b/src/solvers/tables_types_macros.h
index 465bed1..3db2d25 100644
--- a/src/solvers/tables_types_macros.h
+++ b/src/solvers/tables_types_macros.h
@@ -1,4 +1,4 @@
1#define OFFSET(B, K) (((char *)B) + K) 1#define OFFSET(B, K) (((unsigned char *)B) + K)
2 2
3#define INFOSIZE INT64_C(512) 3#define INFOSIZE INT64_C(512)
4#define INFO_SOLVER_STRLEN INT64_C(100) 4#define INFO_SOLVER_STRLEN INT64_C(100)

Generated with cgit - Back to sebastiano.tronto.net