aboutsummaryrefslogtreecommitdiff
path: root/src/solvers/coord/gendata.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/solvers/coord/gendata.h')
-rw-r--r--src/solvers/coord/gendata.h54
1 files changed, 27 insertions, 27 deletions
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)

Generated with cgit - Back to sebastiano.tronto.net