diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/cube.h | 66 | ||||
| -rw-r--r-- | src/core/moves.h | 88 | ||||
| -rw-r--r-- | src/core/transform.h | 18 | ||||
| -rw-r--r-- | src/core/transform_with_switch.h | 18 | ||||
| -rw-r--r-- | src/solvers/h48/solve.h | 46 | ||||
| -rw-r--r-- | src/utils/constants.h | 7 |
6 files changed, 124 insertions, 119 deletions
diff --git a/src/core/cube.h b/src/core/cube.h index 4b28103..df5161a 100644 --- a/src/core/cube.h +++ b/src/core/cube.h | |||
| @@ -1,25 +1,12 @@ | |||
| 1 | #define _move(M, c) compose(c, _move_cube_ ## M) | ||
| 2 | #define _premove(M, c) compose(_move_cube_ ## M, c) | ||
| 3 | |||
| 4 | _static cube_t cubefromarray(uint8_t [static 8], uint8_t [static 12]); | 1 | _static cube_t cubefromarray(uint8_t [static 8], uint8_t [static 12]); |
| 5 | _static cube_t solvedcube(void); | 2 | _static cube_t solvedcube(void); |
| 6 | _static bool isconsistent(cube_t); | 3 | _static bool isconsistent(cube_t); |
| 7 | _static bool issolvable(cube_t); | 4 | _static bool issolvable(cube_t); |
| 8 | _static bool issolved(cube_t); | 5 | _static bool issolved(cube_t); |
| 9 | _static bool iserror(cube_t); | 6 | _static bool iserror(cube_t); |
| 10 | _static cube_t applymoves(cube_t, const char *); | ||
| 11 | _static cube_t applytrans(cube_t, const char *); | ||
| 12 | _static cube_t frommoves(const char *); | ||
| 13 | _static void getcube_fix(int64_t *, int64_t *, int64_t *, int64_t *); | 7 | _static void getcube_fix(int64_t *, int64_t *, int64_t *, int64_t *); |
| 14 | _static cube_t getcube(int64_t, int64_t, int64_t, int64_t); | 8 | _static cube_t getcube(int64_t, int64_t, int64_t, int64_t); |
| 15 | 9 | ||
| 16 | _static cube_t transform_edges(cube_t, uint8_t); | ||
| 17 | _static cube_t transform_corners(cube_t, uint8_t); | ||
| 18 | _static cube_t transform(cube_t, uint8_t); | ||
| 19 | |||
| 20 | /* declared in moves.h */ | ||
| 21 | _static cube_t move(cube_t, uint8_t); | ||
| 22 | |||
| 23 | _static cube_t | 10 | _static cube_t |
| 24 | cubefromarray(uint8_t c[static 8], uint8_t e[static 12]) | 11 | cubefromarray(uint8_t c[static 8], uint8_t e[static 12]) |
| 25 | { | 12 | { |
| @@ -149,41 +136,6 @@ iserror(cube_t cube) | |||
| 149 | return equal(cube, zero); | 136 | return equal(cube, zero); |
| 150 | } | 137 | } |
| 151 | 138 | ||
| 152 | _static cube_t | ||
| 153 | applymoves(cube_t cube, const char *buf) | ||
| 154 | { | ||
| 155 | uint8_t r, m; | ||
| 156 | const char *b; | ||
| 157 | |||
| 158 | DBG_ASSERT(isconsistent(cube), zero, | ||
| 159 | "move error: inconsistent cube\n"); | ||
| 160 | |||
| 161 | for (b = buf; *b != '\0'; b++) { | ||
| 162 | while (*b == ' ' || *b == '\t' || *b == '\n') | ||
| 163 | b++; | ||
| 164 | if (*b == '\0') | ||
| 165 | goto applymoves_finish; | ||
| 166 | if ((r = readmove(*b)) == _error) | ||
| 167 | goto applymoves_error; | ||
| 168 | if ((m = readmodifier(*(b+1))) != 0) | ||
| 169 | b++; | ||
| 170 | cube = move(cube, r + m); | ||
| 171 | } | ||
| 172 | |||
| 173 | applymoves_finish: | ||
| 174 | return cube; | ||
| 175 | |||
| 176 | applymoves_error: | ||
| 177 | LOG("applymoves error\n"); | ||
| 178 | return zero; | ||
| 179 | } | ||
| 180 | |||
| 181 | _static cube_t | ||
| 182 | frommoves(const char *buf) | ||
| 183 | { | ||
| 184 | return applymoves(solved, buf); | ||
| 185 | } | ||
| 186 | |||
| 187 | _static void | 139 | _static void |
| 188 | getcube_fix(int64_t *ep, int64_t *eo, int64_t *cp, int64_t *co) | 140 | getcube_fix(int64_t *ep, int64_t *eo, int64_t *cp, int64_t *co) |
| 189 | { | 141 | { |
| @@ -227,21 +179,3 @@ getcube(int64_t ep, int64_t eo, int64_t cp, int64_t co) | |||
| 227 | 179 | ||
| 228 | return cubefromarray(carr, earr); | 180 | return cubefromarray(carr, earr); |
| 229 | } | 181 | } |
| 230 | |||
| 231 | _static cube_t | ||
| 232 | applytrans(cube_t cube, const char *buf) | ||
| 233 | { | ||
| 234 | uint8_t t; | ||
| 235 | |||
| 236 | DBG_ASSERT(isconsistent(cube), zero, | ||
| 237 | "transformation error: inconsistent cube\n"); | ||
| 238 | |||
| 239 | t = readtrans(buf); | ||
| 240 | |||
| 241 | return transform(cube, t); | ||
| 242 | } | ||
| 243 | |||
| 244 | /* | ||
| 245 | TODO transform is now relegated to a separated file because it is too long. | ||
| 246 | It would be nice to make it shorter without loosing performance. | ||
| 247 | */ | ||
diff --git a/src/core/moves.h b/src/core/moves.h index 8f9c8f5..71ef470 100644 --- a/src/core/moves.h +++ b/src/core/moves.h | |||
| @@ -1,13 +1,7 @@ | |||
| 1 | /* probably these can be placed in constants file */ | 1 | #define _move(M, c) compose(c, _move_cube_ ## M) |
| 2 | #define NORMAL 0x00 | 2 | #define _premove(M, c) compose(_move_cube_ ## M, c) |
| 3 | #define INVERSE 0x01 | ||
| 4 | #define INVERSEBRANCH 0x03 | ||
| 5 | #define NORMALBRANCH 0x02 | ||
| 6 | #define ALLMOVES 0x3FFFF | ||
| 7 | #define NOHALFTURNS 0x2DB6D | ||
| 8 | 3 | ||
| 9 | _static_inline bool allowednextmove(uint8_t *, uint8_t); | 4 | _static_inline bool allowednextmove(uint8_t *, uint8_t); |
| 10 | _static uint32_t allowednextmoveH48(uint8_t *, uint8_t, uint32_t); | ||
| 11 | 5 | ||
| 12 | _static_inline uint8_t inverse_trans(uint8_t); | 6 | _static_inline uint8_t inverse_trans(uint8_t); |
| 13 | _static_inline uint8_t movebase(uint8_t); | 7 | _static_inline uint8_t movebase(uint8_t); |
| @@ -17,7 +11,10 @@ _static_inline uint32_t disable_moves(uint32_t, uint8_t); | |||
| 17 | _static cube_t move(cube_t, uint8_t); | 11 | _static cube_t move(cube_t, uint8_t); |
| 18 | _static cube_t premove(cube_t, uint8_t); | 12 | _static cube_t premove(cube_t, uint8_t); |
| 19 | _static uint8_t inverse_move(uint8_t); | 13 | _static uint8_t inverse_move(uint8_t); |
| 20 | _static uint8_t* invertpremoves(uint8_t *, uint8_t); | 14 | _static void invertmoves(uint8_t *, uint8_t, uint8_t *); |
| 15 | |||
| 16 | _static cube_t applymoves(cube_t, const char *); | ||
| 17 | _static cube_t frommoves(const char *); | ||
| 21 | 18 | ||
| 22 | _static bool | 19 | _static bool |
| 23 | allowednextmove(uint8_t *moves, uint8_t n) | 20 | allowednextmove(uint8_t *moves, uint8_t n) |
| @@ -50,34 +47,6 @@ disable_moves(uint32_t current_result, uint8_t base_index) | |||
| 50 | return current_result & ~(7 << base_index); | 47 | return current_result & ~(7 << base_index); |
| 51 | } | 48 | } |
| 52 | 49 | ||
| 53 | _static uint32_t | ||
| 54 | allowednextmoveH48(uint8_t *moves, uint8_t n, uint32_t h48branch) | ||
| 55 | { | ||
| 56 | uint32_t result = ALLMOVES; | ||
| 57 | if (h48branch & NORMALBRANCH) | ||
| 58 | result &= NOHALFTURNS; | ||
| 59 | if (n < 1) | ||
| 60 | return result; | ||
| 61 | |||
| 62 | uint8_t base1 = movebase(moves[n-1]); | ||
| 63 | uint8_t axis1 = moveaxis(moves[n-1]); | ||
| 64 | |||
| 65 | result = disable_moves(result, base1 * 3); | ||
| 66 | if (base1 % 2) | ||
| 67 | result = disable_moves(result, (base1 - 1) * 3); | ||
| 68 | |||
| 69 | if (n == 1) | ||
| 70 | return result; | ||
| 71 | |||
| 72 | uint8_t base2 = movebase(moves[n-2]); | ||
| 73 | uint8_t axis2 = moveaxis(moves[n-2]); | ||
| 74 | |||
| 75 | if(axis1 == axis2) | ||
| 76 | result = disable_moves(result, base2 * 3); | ||
| 77 | |||
| 78 | return result; | ||
| 79 | } | ||
| 80 | |||
| 81 | _static_inline uint8_t | 50 | _static_inline uint8_t |
| 82 | inverse_trans(uint8_t t) | 51 | inverse_trans(uint8_t t) |
| 83 | { | 52 | { |
| @@ -194,17 +163,46 @@ inverse_move(uint8_t m) | |||
| 194 | return m - 2 * (m % 3) + 2; | 163 | return m - 2 * (m % 3) + 2; |
| 195 | } | 164 | } |
| 196 | 165 | ||
| 197 | _static uint8_t* | 166 | _static void |
| 198 | invertpremoves(uint8_t *moves, uint8_t nmoves) | 167 | invertmoves(uint8_t *moves, uint8_t nmoves, uint8_t *ret) |
| 199 | { | 168 | { |
| 200 | uint8_t i; | 169 | uint8_t i; |
| 201 | uint8_t *ret = malloc(nmoves * sizeof(uint8_t)); | ||
| 202 | 170 | ||
| 203 | for (i = 0; i < nmoves; i++) | 171 | for (i = 0; i < nmoves; i++) |
| 204 | ret[i] = inverse_move(moves[i]); | 172 | ret[i] = inverse_move(moves[nmoves - i - 1]); |
| 173 | } | ||
| 205 | 174 | ||
| 206 | // invert elements in the array | 175 | _static cube_t |
| 207 | for (i = 0; i < nmoves / 2; i++) | 176 | applymoves(cube_t cube, const char *buf) |
| 208 | _swap(ret[i], ret[nmoves - i - 1]); | 177 | { |
| 209 | return ret; | 178 | uint8_t r, m; |
| 179 | const char *b; | ||
| 180 | |||
| 181 | DBG_ASSERT(isconsistent(cube), zero, | ||
| 182 | "move error: inconsistent cube\n"); | ||
| 183 | |||
| 184 | for (b = buf; *b != '\0'; b++) { | ||
| 185 | while (*b == ' ' || *b == '\t' || *b == '\n') | ||
| 186 | b++; | ||
| 187 | if (*b == '\0') | ||
| 188 | goto applymoves_finish; | ||
| 189 | if ((r = readmove(*b)) == _error) | ||
| 190 | goto applymoves_error; | ||
| 191 | if ((m = readmodifier(*(b+1))) != 0) | ||
| 192 | b++; | ||
| 193 | cube = move(cube, r + m); | ||
| 194 | } | ||
| 195 | |||
| 196 | applymoves_finish: | ||
| 197 | return cube; | ||
| 198 | |||
| 199 | applymoves_error: | ||
| 200 | LOG("applymoves error\n"); | ||
| 201 | return zero; | ||
| 202 | } | ||
| 203 | |||
| 204 | _static cube_t | ||
| 205 | frommoves(const char *buf) | ||
| 206 | { | ||
| 207 | return applymoves(solved, buf); | ||
| 210 | } | 208 | } |
diff --git a/src/core/transform.h b/src/core/transform.h index 358b051..fa7ce59 100644 --- a/src/core/transform.h +++ b/src/core/transform.h | |||
| @@ -19,6 +19,11 @@ | |||
| 19 | invertco(compose(compose(_trans_cube_ ## T, c), \ | 19 | invertco(compose(compose(_trans_cube_ ## T, c), \ |
| 20 | _trans_cube_ ## T ## _inverse)) | 20 | _trans_cube_ ## T ## _inverse)) |
| 21 | 21 | ||
| 22 | _static cube_t transform_edges(cube_t, uint8_t); | ||
| 23 | _static cube_t transform_corners(cube_t, uint8_t); | ||
| 24 | _static cube_t transform(cube_t, uint8_t); | ||
| 25 | _static cube_t applytrans(cube_t, const char *); | ||
| 26 | |||
| 22 | static cube_t cube_trans_table[48] = { | 27 | static cube_t cube_trans_table[48] = { |
| 23 | [_trans_UFr] = _trans_cube_UFr, | 28 | [_trans_UFr] = _trans_cube_UFr, |
| 24 | [_trans_UFm] = _trans_cube_UFm, | 29 | [_trans_UFm] = _trans_cube_UFm, |
| @@ -174,3 +179,16 @@ transform(cube_t c, uint8_t t) | |||
| 174 | 179 | ||
| 175 | return t < 24 ? ret : invertco(ret); | 180 | return t < 24 ? ret : invertco(ret); |
| 176 | } | 181 | } |
| 182 | |||
| 183 | _static cube_t | ||
| 184 | applytrans(cube_t cube, const char *buf) | ||
| 185 | { | ||
| 186 | uint8_t t; | ||
| 187 | |||
| 188 | DBG_ASSERT(isconsistent(cube), zero, | ||
| 189 | "transformation error: inconsistent cube\n"); | ||
| 190 | |||
| 191 | t = readtrans(buf); | ||
| 192 | |||
| 193 | return transform(cube, t); | ||
| 194 | } | ||
diff --git a/src/core/transform_with_switch.h b/src/core/transform_with_switch.h index d3a108c..429e656 100644 --- a/src/core/transform_with_switch.h +++ b/src/core/transform_with_switch.h | |||
| @@ -17,6 +17,11 @@ | |||
| 17 | invertco(compose(compose(_trans_cube_ ## T, c), \ | 17 | invertco(compose(compose(_trans_cube_ ## T, c), \ |
| 18 | _trans_cube_ ## T ## _inverse)) | 18 | _trans_cube_ ## T ## _inverse)) |
| 19 | 19 | ||
| 20 | _static cube_t transform_edges(cube_t, uint8_t); | ||
| 21 | _static cube_t transform_corners(cube_t, uint8_t); | ||
| 22 | _static cube_t transform(cube_t, uint8_t); | ||
| 23 | _static cube_t applytrans(cube_t, const char *); | ||
| 24 | |||
| 20 | _static cube_t | 25 | _static cube_t |
| 21 | transform_edges(cube_t c, uint8_t t) | 26 | transform_edges(cube_t c, uint8_t t) |
| 22 | { | 27 | { |
| @@ -334,3 +339,16 @@ transform(cube_t c, uint8_t t) | |||
| 334 | return zero; | 339 | return zero; |
| 335 | } | 340 | } |
| 336 | } | 341 | } |
| 342 | |||
| 343 | _static cube_t | ||
| 344 | applytrans(cube_t cube, const char *buf) | ||
| 345 | { | ||
| 346 | uint8_t t; | ||
| 347 | |||
| 348 | DBG_ASSERT(isconsistent(cube), zero, | ||
| 349 | "transformation error: inconsistent cube\n"); | ||
| 350 | |||
| 351 | t = readtrans(buf); | ||
| 352 | |||
| 353 | return transform(cube, t); | ||
| 354 | } | ||
diff --git a/src/solvers/h48/solve.h b/src/solvers/h48/solve.h index bbe59e5..3878498 100644 --- a/src/solvers/h48/solve.h +++ b/src/solvers/h48/solve.h | |||
| @@ -26,6 +26,8 @@ typedef struct { | |||
| 26 | char *s; | 26 | char *s; |
| 27 | } dfsarg_solveh48stats_t; | 27 | } dfsarg_solveh48stats_t; |
| 28 | 28 | ||
| 29 | _static uint32_t allowednextmove_h48(uint8_t *, uint8_t, uint32_t); | ||
| 30 | |||
| 29 | _static void solve_h48_appendsolution(dfsarg_solveh48_t *); | 31 | _static void solve_h48_appendsolution(dfsarg_solveh48_t *); |
| 30 | _static_inline bool solve_h48_stop(dfsarg_solveh48_t *); | 32 | _static_inline bool solve_h48_stop(dfsarg_solveh48_t *); |
| 31 | _static int64_t solve_h48_dfs(dfsarg_solveh48_t *); | 33 | _static int64_t solve_h48_dfs(dfsarg_solveh48_t *); |
| @@ -34,10 +36,39 @@ _static int64_t solve_h48(cube_t, int8_t, int8_t, int8_t, uint8_t, uint8_t, cons | |||
| 34 | _static int64_t solve_h48stats_dfs(dfsarg_solveh48stats_t *); | 36 | _static int64_t solve_h48stats_dfs(dfsarg_solveh48stats_t *); |
| 35 | _static int64_t solve_h48stats(cube_t, int8_t, const void *, char [static 12]); | 37 | _static int64_t solve_h48stats(cube_t, int8_t, const void *, char [static 12]); |
| 36 | 38 | ||
| 39 | _static uint32_t | ||
| 40 | allowednextmove_h48(uint8_t *moves, uint8_t n, uint32_t h48branch) | ||
| 41 | { | ||
| 42 | uint32_t result = _mm_allmoves; | ||
| 43 | if (h48branch & _mm_normalbranch) | ||
| 44 | result &= _mm_nohalfturns; | ||
| 45 | if (n < 1) | ||
| 46 | return result; | ||
| 47 | |||
| 48 | uint8_t base1 = movebase(moves[n-1]); | ||
| 49 | uint8_t axis1 = moveaxis(moves[n-1]); | ||
| 50 | |||
| 51 | result = disable_moves(result, base1 * 3); | ||
| 52 | if (base1 % 2) | ||
| 53 | result = disable_moves(result, (base1 - 1) * 3); | ||
| 54 | |||
| 55 | if (n == 1) | ||
| 56 | return result; | ||
| 57 | |||
| 58 | uint8_t base2 = movebase(moves[n-2]); | ||
| 59 | uint8_t axis2 = moveaxis(moves[n-2]); | ||
| 60 | |||
| 61 | if(axis1 == axis2) | ||
| 62 | result = disable_moves(result, base2 * 3); | ||
| 63 | |||
| 64 | return result; | ||
| 65 | } | ||
| 66 | |||
| 37 | _static void | 67 | _static void |
| 38 | solve_h48_appendsolution(dfsarg_solveh48_t *arg) | 68 | solve_h48_appendsolution(dfsarg_solveh48_t *arg) |
| 39 | { | 69 | { |
| 40 | int strl; | 70 | int strl; |
| 71 | uint8_t invertedpremoves[MAXLEN]; | ||
| 41 | char *solution = *arg->nextsol; | 72 | char *solution = *arg->nextsol; |
| 42 | 73 | ||
| 43 | strl = writemoves(arg->moves, arg->nmoves, *arg->nextsol); | 74 | strl = writemoves(arg->moves, arg->nmoves, *arg->nextsol); |
| @@ -47,9 +78,8 @@ solve_h48_appendsolution(dfsarg_solveh48_t *arg) | |||
| 47 | **arg->nextsol = ' '; | 78 | **arg->nextsol = ' '; |
| 48 | (*arg->nextsol)++; | 79 | (*arg->nextsol)++; |
| 49 | 80 | ||
| 50 | uint8_t* invertedpremoves = invertpremoves(arg->premoves, arg->npremoves); | 81 | invertmoves(arg->premoves, arg->npremoves, invertedpremoves); |
| 51 | strl = writemoves(invertedpremoves, arg->npremoves, *arg->nextsol); | 82 | strl = writemoves(invertedpremoves, arg->npremoves, *arg->nextsol); |
| 52 | free(invertedpremoves); | ||
| 53 | *arg->nextsol += strl; | 83 | *arg->nextsol += strl; |
| 54 | } | 84 | } |
| 55 | LOG("Solution found: %s\n", solution); | 85 | LOG("Solution found: %s\n", solution); |
| @@ -65,7 +95,7 @@ solve_h48_stop(dfsarg_solveh48_t *arg) | |||
| 65 | uint32_t data, data_inv; | 95 | uint32_t data, data_inv; |
| 66 | int8_t bound; | 96 | int8_t bound; |
| 67 | 97 | ||
| 68 | arg->nissbranch = NORMAL; | 98 | arg->nissbranch = _mm_normal; |
| 69 | bound = get_h48_cdata(arg->cube, arg->cocsepdata, &data); | 99 | bound = get_h48_cdata(arg->cube, arg->cocsepdata, &data); |
| 70 | if (bound + arg->nmoves + arg->npremoves > arg->depth) | 100 | if (bound + arg->nmoves + arg->npremoves > arg->depth) |
| 71 | return true; | 101 | return true; |
| @@ -79,13 +109,13 @@ solve_h48_stop(dfsarg_solveh48_t *arg) | |||
| 79 | if (bound + arg->nmoves + arg->npremoves > arg->depth) | 109 | if (bound + arg->nmoves + arg->npremoves > arg->depth) |
| 80 | return true; | 110 | return true; |
| 81 | if (bound + arg->nmoves + arg->npremoves == arg->depth) | 111 | if (bound + arg->nmoves + arg->npremoves == arg->depth) |
| 82 | arg->nissbranch = INVERSEBRANCH; | 112 | arg->nissbranch = _mm_inversebranch; |
| 83 | 113 | ||
| 84 | bound = get_h48_bound(arg->inverse, data_inv, arg->h, arg->k, arg->h48data); | 114 | bound = get_h48_bound(arg->inverse, data_inv, arg->h, arg->k, arg->h48data); |
| 85 | if (bound + arg->nmoves + arg->npremoves > arg->depth) | 115 | if (bound + arg->nmoves + arg->npremoves > arg->depth) |
| 86 | return true; | 116 | return true; |
| 87 | if (bound + arg->nmoves + arg->npremoves == arg->depth) | 117 | if (bound + arg->nmoves + arg->npremoves == arg->depth) |
| 88 | arg->nissbranch = NORMALBRANCH; | 118 | arg->nissbranch = _mm_normalbranch; |
| 89 | 119 | ||
| 90 | return false; | 120 | return false; |
| 91 | } | 121 | } |
| @@ -114,8 +144,8 @@ solve_h48_dfs(dfsarg_solveh48_t *arg) | |||
| 114 | nextarg = *arg; | 144 | nextarg = *arg; |
| 115 | ret = 0; | 145 | ret = 0; |
| 116 | uint32_t allowed; | 146 | uint32_t allowed; |
| 117 | if(arg->nissbranch & INVERSE) { | 147 | if(arg->nissbranch & _mm_inverse) { |
| 118 | allowed = allowednextmoveH48(arg->premoves, arg->npremoves, arg->nissbranch); | 148 | allowed = allowednextmove_h48(arg->premoves, arg->npremoves, arg->nissbranch); |
| 119 | for (m = 0; m < 18; m++) { | 149 | for (m = 0; m < 18; m++) { |
| 120 | if(allowed & (1 << m)) { | 150 | if(allowed & (1 << m)) { |
| 121 | nextarg.npremoves = arg->npremoves + 1; | 151 | nextarg.npremoves = arg->npremoves + 1; |
| @@ -126,7 +156,7 @@ solve_h48_dfs(dfsarg_solveh48_t *arg) | |||
| 126 | } | 156 | } |
| 127 | } | 157 | } |
| 128 | } else { | 158 | } else { |
| 129 | allowed = allowednextmoveH48(arg->moves, arg->nmoves, arg->nissbranch); | 159 | allowed = allowednextmove_h48(arg->moves, arg->nmoves, arg->nissbranch); |
| 130 | for (m = 0; m < 18; m++) { | 160 | for (m = 0; m < 18; m++) { |
| 131 | if (allowed & (1 << m)) { | 161 | if (allowed & (1 << m)) { |
| 132 | nextarg.nmoves = arg->nmoves + 1; | 162 | nextarg.nmoves = arg->nmoves + 1; |
diff --git a/src/utils/constants.h b/src/utils/constants.h index 52e2810..34b4f00 100644 --- a/src/utils/constants.h +++ b/src/utils/constants.h | |||
| @@ -97,6 +97,13 @@ _static int64_t binomial[12][12] = { | |||
| 97 | #define _trans_BDm UINT8_C(46) | 97 | #define _trans_BDm UINT8_C(46) |
| 98 | #define _trans_BLm UINT8_C(47) | 98 | #define _trans_BLm UINT8_C(47) |
| 99 | 99 | ||
| 100 | #define _mm_normal UINT32_C(0x00) | ||
| 101 | #define _mm_inverse UINT32_C(0x01) | ||
| 102 | #define _mm_inversebranch UINT32_C(0x03) | ||
| 103 | #define _mm_normalbranch UINT32_C(0x02) | ||
| 104 | #define _mm_allmoves UINT32_C(0x3FFFF) | ||
| 105 | #define _mm_nohalfturns UINT32_C(0x2DB6D) | ||
| 106 | |||
| 100 | #define _c_ufr UINT8_C(0) | 107 | #define _c_ufr UINT8_C(0) |
| 101 | #define _c_ubl UINT8_C(1) | 108 | #define _c_ubl UINT8_C(1) |
| 102 | #define _c_dfl UINT8_C(2) | 109 | #define _c_dfl UINT8_C(2) |
