diff options
Diffstat (limited to 'src/solvers/h48/gendata_cocsep.h')
| -rw-r--r-- | src/solvers/h48/gendata_cocsep.h | 39 |
1 files changed, 28 insertions, 11 deletions
diff --git a/src/solvers/h48/gendata_cocsep.h b/src/solvers/h48/gendata_cocsep.h index bf67962..cda1608 100644 --- a/src/solvers/h48/gendata_cocsep.h +++ b/src/solvers/h48/gendata_cocsep.h | |||
| @@ -1,11 +1,15 @@ | |||
| 1 | STATIC_INLINE bool gendata_cocsep_get_visited(const uint8_t *, int64_t); | ||
| 2 | STATIC_INLINE void gendata_cocsep_set_visited(uint8_t *, int64_t); | ||
| 3 | |||
| 4 | STATIC size_t gendata_cocsep(char *, uint64_t *, cube_t *); | 1 | STATIC size_t gendata_cocsep(char *, uint64_t *, cube_t *); |
| 5 | STATIC uint32_t gendata_cocsep_dfs(cocsep_dfs_arg_t *); | 2 | STATIC uint32_t gendata_cocsep_dfs(cocsep_dfs_arg_t [static 1]); |
| 6 | STATIC void getdistribution_cocsep(const uint32_t *, uint64_t [static 21]); | 3 | STATIC void getdistribution_cocsep( |
| 4 | const uint32_t [static COCSEP_TABLESIZE], uint64_t [static 21]); | ||
| 5 | |||
| 6 | STATIC_INLINE bool gendata_cocsep_get_visited( | ||
| 7 | const uint8_t [static COCSEP_VISITEDSIZE], int64_t); | ||
| 8 | STATIC_INLINE void gendata_cocsep_set_visited( | ||
| 9 | uint8_t [static COCSEP_VISITEDSIZE], int64_t); | ||
| 7 | 10 | ||
| 8 | STATIC_INLINE int8_t get_h48_cdata(cube_t, const uint32_t *, uint32_t *); | 11 | STATIC_INLINE int8_t get_h48_cdata( |
| 12 | cube_t, const uint32_t [static COCSEP_TABLESIZE], uint32_t *); | ||
| 9 | 13 | ||
| 10 | STATIC size_t | 14 | STATIC size_t |
| 11 | gendata_cocsep( | 15 | gendata_cocsep( |
| @@ -78,7 +82,7 @@ gendata_cocsep_return_size: | |||
| 78 | } | 82 | } |
| 79 | 83 | ||
| 80 | STATIC uint32_t | 84 | STATIC uint32_t |
| 81 | gendata_cocsep_dfs(cocsep_dfs_arg_t *arg) | 85 | gendata_cocsep_dfs(cocsep_dfs_arg_t arg[static 1]) |
| 82 | { | 86 | { |
| 83 | uint8_t m; | 87 | uint8_t m; |
| 84 | uint32_t cc, class, ttrep, depth, olddepth, tinv; | 88 | uint32_t cc, class, ttrep, depth, olddepth, tinv; |
| @@ -133,7 +137,10 @@ gendata_cocsep_dfs(cocsep_dfs_arg_t *arg) | |||
| 133 | } | 137 | } |
| 134 | 138 | ||
| 135 | STATIC void | 139 | STATIC void |
| 136 | getdistribution_cocsep(const uint32_t *table, uint64_t distr[static 21]) | 140 | getdistribution_cocsep( |
| 141 | const uint32_t table[static COCSEP_TABLESIZE], | ||
| 142 | uint64_t distr[static 21] | ||
| 143 | ) | ||
| 137 | { | 144 | { |
| 138 | size_t i; | 145 | size_t i; |
| 139 | 146 | ||
| @@ -144,19 +151,29 @@ getdistribution_cocsep(const uint32_t *table, uint64_t distr[static 21]) | |||
| 144 | } | 151 | } |
| 145 | 152 | ||
| 146 | STATIC_INLINE bool | 153 | STATIC_INLINE bool |
| 147 | gendata_cocsep_get_visited(const uint8_t *a, int64_t i) | 154 | gendata_cocsep_get_visited( |
| 155 | const uint8_t a[static COCSEP_VISITEDSIZE], | ||
| 156 | int64_t i | ||
| 157 | ) | ||
| 148 | { | 158 | { |
| 149 | return a[VISITED_IND(i)] & VISITED_MASK(i); | 159 | return a[VISITED_IND(i)] & VISITED_MASK(i); |
| 150 | } | 160 | } |
| 151 | 161 | ||
| 152 | STATIC_INLINE void | 162 | STATIC_INLINE void |
| 153 | gendata_cocsep_set_visited(uint8_t *a, int64_t i) | 163 | gendata_cocsep_set_visited( |
| 164 | uint8_t a[static COCSEP_VISITEDSIZE], | ||
| 165 | int64_t i | ||
| 166 | ) | ||
| 154 | { | 167 | { |
| 155 | a[VISITED_IND(i)] |= VISITED_MASK(i); | 168 | a[VISITED_IND(i)] |= VISITED_MASK(i); |
| 156 | } | 169 | } |
| 157 | 170 | ||
| 158 | STATIC_INLINE int8_t | 171 | STATIC_INLINE int8_t |
| 159 | get_h48_cdata(cube_t cube, const uint32_t *cocsepdata, uint32_t *cdata) | 172 | get_h48_cdata( |
| 173 | cube_t cube, | ||
| 174 | const uint32_t cocsepdata[static COCSEP_TABLESIZE], | ||
| 175 | uint32_t *cdata | ||
| 176 | ) | ||
| 160 | { | 177 | { |
| 161 | int64_t coord; | 178 | int64_t coord; |
| 162 | 179 | ||
