diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2024-09-05 08:53:38 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2024-09-05 08:55:25 +0200 |
| commit | fd5ddb3db9f50411ca579d84f225f265ca35b56a (patch) | |
| tree | b659112cc0e2abd6c7edb08b0938c0d2de4ca066 /src/solvers/h48/gendata_cocsep.h | |
| parent | c9e2d6466e42d6b779ac9ffa7c5ee9a9c7558df8 (diff) | |
| download | nissy-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.h | 22 |
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); | 23 | STATIC_INLINE bool get_visited(const uint8_t *, int64_t); |
| 24 | _static_inline void set_visited(uint8_t *, int64_t); | 24 | STATIC_INLINE void set_visited(uint8_t *, int64_t); |
| 25 | 25 | ||
| 26 | _static size_t gendata_cocsep(void *, uint64_t *, cube_t *); | 26 | STATIC size_t gendata_cocsep(void *, uint64_t *, cube_t *); |
| 27 | _static uint32_t gendata_cocsep_dfs(cocsep_dfs_arg_t *); | 27 | STATIC 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 *); | 29 | STATIC_INLINE int8_t get_h48_cdata(cube_t, uint32_t *, uint32_t *); |
| 30 | 30 | ||
| 31 | /* | 31 | /* |
| 32 | Each element of the cocsep table is a uint32_t used as follows: | 32 | Each 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 | 42 | STATIC size_t |
| 43 | gendata_cocsep(void *buf, uint64_t *selfsim, cube_t *rep) | 43 | gendata_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 | 94 | STATIC uint32_t |
| 95 | gendata_cocsep_dfs(cocsep_dfs_arg_t *arg) | 95 | gendata_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 | 148 | STATIC_INLINE bool |
| 149 | get_visited(const uint8_t *a, int64_t i) | 149 | get_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 | 154 | STATIC_INLINE void |
| 155 | set_visited(uint8_t *a, int64_t i) | 155 | set_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 | 160 | STATIC_INLINE int8_t |
| 161 | get_h48_cdata(cube_t cube, uint32_t *cocsepdata, uint32_t *cdata) | 161 | get_h48_cdata(cube_t cube, uint32_t *cocsepdata, uint32_t *cdata) |
| 162 | { | 162 | { |
| 163 | int64_t coord; | 163 | int64_t coord; |
