diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2024-09-26 15:57:25 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2024-09-26 16:33:27 +0200 |
| commit | bc2cba8529a163d129dec91b5ec448a29a14591a (patch) | |
| tree | 618827c2192b446bd6b8d8f72e99db268bd540d2 /src/solvers/h48/gendata_cocsep.h | |
| parent | 818186b480d7c05e0c58ff89da2180f5b2476434 (diff) | |
| download | nissy-core-bc2cba8529a163d129dec91b5ec448a29a14591a.tar.gz nissy-core-bc2cba8529a163d129dec91b5ec448a29a14591a.zip | |
Added checkdata function
Diffstat (limited to 'src/solvers/h48/gendata_cocsep.h')
| -rw-r--r-- | src/solvers/h48/gendata_cocsep.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/solvers/h48/gendata_cocsep.h b/src/solvers/h48/gendata_cocsep.h index 2189145..262793b 100644 --- a/src/solvers/h48/gendata_cocsep.h +++ b/src/solvers/h48/gendata_cocsep.h | |||
| @@ -25,6 +25,7 @@ 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 | STATIC void getdistribution_cocsep(const uint32_t *, uint64_t [static 21]); | ||
| 28 | 29 | ||
| 29 | STATIC_INLINE int8_t get_h48_cdata(cube_t, uint32_t *, uint32_t *); | 30 | STATIC_INLINE int8_t get_h48_cdata(cube_t, uint32_t *, uint32_t *); |
| 30 | 31 | ||
| @@ -157,6 +158,17 @@ gendata_cocsep_dfs(cocsep_dfs_arg_t *arg) | |||
| 157 | return cc; | 158 | return cc; |
| 158 | } | 159 | } |
| 159 | 160 | ||
| 161 | STATIC void | ||
| 162 | getdistribution_cocsep(const uint32_t *table, uint64_t distr[static 21]) | ||
| 163 | { | ||
| 164 | size_t i; | ||
| 165 | |||
| 166 | memset(distr, 0, 21 * sizeof(uint64_t)); | ||
| 167 | |||
| 168 | for (i = 0; i < COCSEP_TABLESIZE; i++) | ||
| 169 | distr[CBOUND(table[i])]++; | ||
| 170 | } | ||
| 171 | |||
| 160 | STATIC_INLINE bool | 172 | STATIC_INLINE bool |
| 161 | get_visited(const uint8_t *a, int64_t i) | 173 | get_visited(const uint8_t *a, int64_t i) |
| 162 | { | 174 | { |
