diff options
| -rw-r--r-- | src/solve_h48.h | 26 | ||||
| -rw-r--r-- | test/102_gendata_h48/00_h_0.out | 4 | ||||
| -rw-r--r-- | test/102_gendata_h48/01_h_1.out | 4 |
3 files changed, 18 insertions, 16 deletions
diff --git a/src/solve_h48.h b/src/solve_h48.h index d08fc72..a2e3184 100644 --- a/src/solve_h48.h +++ b/src/solve_h48.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | #define COCSEP_CLASSES 3393U | 1 | #define COCSEP_CLASSES 3393U |
| 2 | #define COCSEP_TABLESIZE (_3p7 << 7U) | 2 | #define COCSEP_TABLESIZE (_3p7 << 7ULL) |
| 3 | #define COCSEP_VISITEDSIZE ((COCSEP_TABLESIZE + 7U) / 8U) | 3 | #define COCSEP_VISITEDSIZE ((COCSEP_TABLESIZE + 7ULL) / 8ULL) |
| 4 | #define COCSEP_FULLSIZE (4*(COCSEP_TABLESIZE + 12)) | 4 | #define COCSEP_FULLSIZE (4*(COCSEP_TABLESIZE + 12)) |
| 5 | 5 | ||
| 6 | #define ESEP_MAX(h) ((COCSEP_CLASSES * _12c4 * _8c4) << (h)) | 6 | #define ESEP_MAX(h) ((COCSEP_CLASSES * _12c4 * _8c4) << (h)) |
| @@ -8,11 +8,11 @@ | |||
| 8 | 8 | ||
| 9 | #define H48_ESIZE(h) ((_12c4 * _8c4) << (h)) | 9 | #define H48_ESIZE(h) ((_12c4 * _8c4) << (h)) |
| 10 | 10 | ||
| 11 | #define _esep_ind(i) (i / 8U) | 11 | #define _esep_ind(i) (i / 8ULL) |
| 12 | #define _esep_shift(i) (4U * (i % 8U)) | 12 | #define _esep_shift(i) (4ULL * (i % 8ULL)) |
| 13 | #define _esep_mask(i) (((1U << 4U) - 1U) << _esep_shift(i)) | 13 | #define _esep_mask(i) (((1ULL << 4ULL) - 1ULL) << _esep_shift(i)) |
| 14 | #define _visited_ind(i) (i / 8U) | 14 | #define _visited_ind(i) (i / 8ULL) |
| 15 | #define _visited_mask(i) (1U << (i % 8U)) | 15 | #define _visited_mask(i) (1ULL << (i % 8ULL)) |
| 16 | 16 | ||
| 17 | typedef struct { | 17 | typedef struct { |
| 18 | cube_fast_t cube; | 18 | cube_fast_t cube; |
| @@ -163,8 +163,9 @@ gendata_cocsep(void *buf, uint64_t *selfsim, cube_fast_t *rep) | |||
| 163 | _static uint32_t | 163 | _static uint32_t |
| 164 | gendata_cocsep_dfs(dfsarg_cocsep_t *arg) | 164 | gendata_cocsep_dfs(dfsarg_cocsep_t *arg) |
| 165 | { | 165 | { |
| 166 | uint8_t m, t, tinv, olddepth; | 166 | uint8_t m, tinv, olddepth; |
| 167 | uint32_t cc; | 167 | uint32_t cc; |
| 168 | uint64_t t, is; | ||
| 168 | int64_t i, ii; | 169 | int64_t i, ii; |
| 169 | cube_fast_t d; | 170 | cube_fast_t d; |
| 170 | dfsarg_cocsep_t nextarg; | 171 | dfsarg_cocsep_t nextarg; |
| @@ -182,7 +183,8 @@ gendata_cocsep_dfs(dfsarg_cocsep_t *arg) | |||
| 182 | for (t = 0, cc = 0; t < 48; t++) { | 183 | for (t = 0, cc = 0; t < 48; t++) { |
| 183 | d = transform_corners(arg->cube, t); | 184 | d = transform_corners(arg->cube, t); |
| 184 | ii = coord_fast_cocsep(d); | 185 | ii = coord_fast_cocsep(d); |
| 185 | arg->selfsim[*arg->n] |= (i == ii) << t; | 186 | is = (i == ii); |
| 187 | arg->selfsim[*arg->n] |= is << t; | ||
| 186 | set_visited(arg->visited, ii); | 188 | set_visited(arg->visited, ii); |
| 187 | tinv = inverse_trans(t); | 189 | tinv = inverse_trans(t); |
| 188 | cc += (arg->buf32[ii] & 0xFFU) == 0xFFU; | 190 | cc += (arg->buf32[ii] & 0xFFU) == 0xFFU; |
| @@ -262,9 +264,9 @@ gendata_h48(void *buf, uint8_t h, uint8_t maxdepth) | |||
| 262 | _static uint64_t | 264 | _static uint64_t |
| 263 | gendata_esep_bfs(bfsarg_esep_t *arg) | 265 | gendata_esep_bfs(bfsarg_esep_t *arg) |
| 264 | { | 266 | { |
| 265 | uint8_t c, m, t, x; | 267 | uint8_t c, m, x; |
| 266 | uint32_t cc; | 268 | uint32_t cc; |
| 267 | uint64_t i, j, k, cocsep_coord, sim; | 269 | uint64_t i, j, k, t, cocsep_coord, sim; |
| 268 | cube_fast_t cube, moved, transd; | 270 | cube_fast_t cube, moved, transd; |
| 269 | 271 | ||
| 270 | for (i = 0, cc = 0; i < ESEP_MAX(arg->h); i++) { | 272 | for (i = 0, cc = 0; i < ESEP_MAX(arg->h); i++) { |
| @@ -288,7 +290,7 @@ gendata_esep_bfs(bfsarg_esep_t *arg) | |||
| 288 | cocsep_coord = j / H48_ESIZE(arg->h); | 290 | cocsep_coord = j / H48_ESIZE(arg->h); |
| 289 | sim = arg->selfsim[cocsep_coord]; | 291 | sim = arg->selfsim[cocsep_coord]; |
| 290 | for (t = 1; t < 48; t++) { /* Skip trivial trans */ | 292 | for (t = 1; t < 48; t++) { /* Skip trivial trans */ |
| 291 | if (!(sim & (1 << t))) | 293 | if (!(sim & (1ULL << t))) |
| 292 | continue; | 294 | continue; |
| 293 | transd = transform(moved, t); | 295 | transd = transform(moved, t); |
| 294 | k = coord_h48(transd, arg->cocsepdata, arg->h); | 296 | k = coord_h48(transd, arg->cocsepdata, arg->h); |
diff --git a/test/102_gendata_h48/00_h_0.out b/test/102_gendata_h48/00_h_0.out index 8c629f8..db6e121 100644 --- a/test/102_gendata_h48/00_h_0.out +++ b/test/102_gendata_h48/00_h_0.out | |||
| @@ -19,5 +19,5 @@ h48: | |||
| 19 | 1: 1 | 19 | 1: 1 |
| 20 | 2: 4 | 20 | 2: 4 |
| 21 | 3: 34 | 21 | 3: 34 |
| 22 | 4: 331 | 22 | 4: 329 |
| 23 | 5: 3608 | 23 | 5: 3587 |
diff --git a/test/102_gendata_h48/01_h_1.out b/test/102_gendata_h48/01_h_1.out index 56b7066..456305d 100644 --- a/test/102_gendata_h48/01_h_1.out +++ b/test/102_gendata_h48/01_h_1.out | |||
| @@ -19,5 +19,5 @@ h48: | |||
| 19 | 1: 1 | 19 | 1: 1 |
| 20 | 2: 4 | 20 | 2: 4 |
| 21 | 3: 34 | 21 | 3: 34 |
| 22 | 4: 377 | 22 | 4: 375 |
| 23 | 5: 4113 | 23 | 5: 4078 |
