aboutsummaryrefslogtreecommitdiff
path: root/src/solvers/h48/gendata_cocsep.h
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2024-09-05 08:53:38 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2024-09-05 08:55:25 +0200
commitfd5ddb3db9f50411ca579d84f225f265ca35b56a (patch)
treeb659112cc0e2abd6c7edb08b0938c0d2de4ca066 /src/solvers/h48/gendata_cocsep.h
parentc9e2d6466e42d6b779ac9ffa7c5ee9a9c7558df8 (diff)
downloadnissy-core-fd5ddb3db9f50411ca579d84f225f265ca35b56a.tar.gz
nissy-core-fd5ddb3db9f50411ca579d84f225f265ca35b56a.zip
Rename constants from _underscore to CAPS
Diffstat (limited to 'src/solvers/h48/gendata_cocsep.h')
-rw-r--r--src/solvers/h48/gendata_cocsep.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/solvers/h48/gendata_cocsep.h b/src/solvers/h48/gendata_cocsep.h
index b7d28e1..54e092e 100644
--- a/src/solvers/h48/gendata_cocsep.h
+++ b/src/solvers/h48/gendata_cocsep.h
@@ -1,5 +1,5 @@
1#define COCSEP_CLASSES ((size_t)3393) 1#define COCSEP_CLASSES ((size_t)3393)
2#define COCSEP_TABLESIZE ((size_t)_3p7 << (size_t)7) 2#define COCSEP_TABLESIZE ((size_t)POW_3_7 << (size_t)7)
3#define COCSEP_VISITEDSIZE ((COCSEP_TABLESIZE + (size_t)7) / (size_t)8) 3#define COCSEP_VISITEDSIZE ((COCSEP_TABLESIZE + (size_t)7) / (size_t)8)
4#define COCSEP_FULLSIZE ((size_t)4 * (COCSEP_TABLESIZE + (size_t)12)) 4#define COCSEP_FULLSIZE ((size_t)4 * (COCSEP_TABLESIZE + (size_t)12))
5 5
@@ -20,13 +20,13 @@ typedef struct {
20 cube_t *rep; 20 cube_t *rep;
21} cocsep_dfs_arg_t; 21} cocsep_dfs_arg_t;
22 22
23_static_inline bool get_visited(const uint8_t *, int64_t); 23STATIC_INLINE bool get_visited(const uint8_t *, int64_t);
24_static_inline void set_visited(uint8_t *, int64_t); 24STATIC_INLINE void set_visited(uint8_t *, int64_t);
25 25
26_static size_t gendata_cocsep(void *, uint64_t *, cube_t *); 26STATIC size_t gendata_cocsep(void *, uint64_t *, cube_t *);
27_static uint32_t gendata_cocsep_dfs(cocsep_dfs_arg_t *); 27STATIC uint32_t gendata_cocsep_dfs(cocsep_dfs_arg_t *);
28 28
29_static_inline int8_t get_h48_cdata(cube_t, uint32_t *, uint32_t *); 29STATIC_INLINE int8_t get_h48_cdata(cube_t, uint32_t *, uint32_t *);
30 30
31/* 31/*
32Each element of the cocsep table is a uint32_t used as follows: 32Each element of the cocsep table is a uint32_t used as follows:
@@ -39,7 +39,7 @@ After the data as described above, more auxiliary information is appended:
39 - One uint32_t for each "line" of the pruning table, representing the number 39 - One uint32_t for each "line" of the pruning table, representing the number
40 of positions having that pruning value. 40 of positions having that pruning value.
41*/ 41*/
42_static size_t 42STATIC size_t
43gendata_cocsep(void *buf, uint64_t *selfsim, cube_t *rep) 43gendata_cocsep(void *buf, uint64_t *selfsim, cube_t *rep)
44{ 44{
45 uint32_t *buf32, *info, cc; 45 uint32_t *buf32, *info, cc;
@@ -91,7 +91,7 @@ gendata_cocsep_return_size:
91 return COCSEP_FULLSIZE; 91 return COCSEP_FULLSIZE;
92} 92}
93 93
94_static uint32_t 94STATIC uint32_t
95gendata_cocsep_dfs(cocsep_dfs_arg_t *arg) 95gendata_cocsep_dfs(cocsep_dfs_arg_t *arg)
96{ 96{
97 uint8_t m; 97 uint8_t m;
@@ -145,19 +145,19 @@ gendata_cocsep_dfs(cocsep_dfs_arg_t *arg)
145 return cc; 145 return cc;
146} 146}
147 147
148_static_inline bool 148STATIC_INLINE bool
149get_visited(const uint8_t *a, int64_t i) 149get_visited(const uint8_t *a, int64_t i)
150{ 150{
151 return a[VISITED_IND(i)] & VISITED_MASK(i); 151 return a[VISITED_IND(i)] & VISITED_MASK(i);
152} 152}
153 153
154_static_inline void 154STATIC_INLINE void
155set_visited(uint8_t *a, int64_t i) 155set_visited(uint8_t *a, int64_t i)
156{ 156{
157 a[VISITED_IND(i)] |= VISITED_MASK(i); 157 a[VISITED_IND(i)] |= VISITED_MASK(i);
158} 158}
159 159
160_static_inline int8_t 160STATIC_INLINE int8_t
161get_h48_cdata(cube_t cube, uint32_t *cocsepdata, uint32_t *cdata) 161get_h48_cdata(cube_t cube, uint32_t *cocsepdata, uint32_t *cdata)
162{ 162{
163 int64_t coord; 163 int64_t coord;

Generated with cgit - Back to sebastiano.tronto.net