diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2024-09-18 11:38:05 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2024-09-18 11:38:05 +0200 |
| commit | 4adeab7cdfb957db832bd6730060fa5eca952d82 (patch) | |
| tree | 3cac7fac9919076ef353175f63172f310e2450b9 | |
| parent | 324cfaf3b9ff7b1b8576e679e4ce571628f37fde (diff) | |
| download | nissy-core-4adeab7cdfb957db832bd6730060fa5eca952d82.tar.gz nissy-core-4adeab7cdfb957db832bd6730060fa5eca952d82.zip | |
Small cleanup
| -rw-r--r-- | src/solvers/h48/gendata_h48.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/solvers/h48/gendata_h48.h b/src/solvers/h48/gendata_h48.h index 0362c69..e8ffee3 100644 --- a/src/solvers/h48/gendata_h48.h +++ b/src/solvers/h48/gendata_h48.h | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | #define H48_MASK(i, k) ((UINT8_BIT(k) - UINT8_C(1)) << H48_SHIFT(i, k)) | 9 | #define H48_MASK(i, k) ((UINT8_BIT(k) - UINT8_C(1)) << H48_SHIFT(i, k)) |
| 10 | 10 | ||
| 11 | #define MAXLEN 20 | 11 | #define MAXLEN 20 |
| 12 | #define CHUNKS COCSEP_CLASSES /* Must be a divisor of H48_COORDMAX_NOEO */ | 12 | #define CHUNKS COCSEP_CLASSES |
| 13 | 13 | ||
| 14 | /* | 14 | /* |
| 15 | TODO: This loop over similar h48 coordinates can be improved by only | 15 | TODO: This loop over similar h48 coordinates can be improved by only |
| @@ -55,7 +55,6 @@ typedef struct { | |||
| 55 | uint32_t *cocsepdata; | 55 | uint32_t *cocsepdata; |
| 56 | uint8_t *table; | 56 | uint8_t *table; |
| 57 | uint64_t *selfsim; | 57 | uint64_t *selfsim; |
| 58 | int64_t done; | ||
| 59 | cube_t *crep; | 58 | cube_t *crep; |
| 60 | } h48h0k4_bfs_arg_t; | 59 | } h48h0k4_bfs_arg_t; |
| 61 | 60 | ||
| @@ -190,7 +189,7 @@ gendata_h48h0k4(gendata_h48_arg_t *arg) | |||
| 190 | uint32_t j; | 189 | uint32_t j; |
| 191 | uint8_t *table; | 190 | uint8_t *table; |
| 192 | h48h0k4_bfs_arg_t bfsarg; | 191 | h48h0k4_bfs_arg_t bfsarg; |
| 193 | int64_t sc, cc, h48max; | 192 | int64_t sc, cc, done, h48max; |
| 194 | 193 | ||
| 195 | if (arg->buf == NULL) | 194 | if (arg->buf == NULL) |
| 196 | goto gendata_h48h0k4_return_size; | 195 | goto gendata_h48h0k4_return_size; |
| @@ -224,13 +223,13 @@ gendata_h48h0k4(gendata_h48_arg_t *arg) | |||
| 224 | .crep = arg->crep | 223 | .crep = arg->crep |
| 225 | }; | 224 | }; |
| 226 | for ( | 225 | for ( |
| 227 | bfsarg.done = 1, bfsarg.depth = 1, cc = 0; | 226 | done = 1, bfsarg.depth = 1, cc = 0; |
| 228 | bfsarg.done < h48max && bfsarg.depth <= arg->maxdepth; | 227 | done < h48max && bfsarg.depth <= arg->maxdepth; |
| 229 | bfsarg.depth++ | 228 | bfsarg.depth++ |
| 230 | ) { | 229 | ) { |
| 231 | LOG("h48: generating depth %" PRIu8 "\n", bfsarg.depth); | 230 | LOG("h48: generating depth %" PRIu8 "\n", bfsarg.depth); |
| 232 | cc = gendata_h48h0k4_bfs(&bfsarg); | 231 | cc = gendata_h48h0k4_bfs(&bfsarg); |
| 233 | bfsarg.done += cc; | 232 | done += cc; |
| 234 | arg->info.distribution[bfsarg.depth] = cc; | 233 | arg->info.distribution[bfsarg.depth] = cc; |
| 235 | LOG("found %" PRId64 "\n", cc); | 234 | LOG("found %" PRId64 "\n", cc); |
| 236 | } | 235 | } |
