diff options
Diffstat (limited to 'src/arch/neon.h')
| -rw-r--r-- | src/arch/neon.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/arch/neon.h b/src/arch/neon.h index d5f5f8b..fc0e612 100644 --- a/src/arch/neon.h +++ b/src/arch/neon.h | |||
| @@ -219,6 +219,25 @@ coord_co(cube_t c) | |||
| 219 | return ret; | 219 | return ret; |
| 220 | } | 220 | } |
| 221 | 221 | ||
| 222 | STATIC_INLINE cube_t | ||
| 223 | invcoord_co(int64_t coord) | ||
| 224 | { | ||
| 225 | int64_t co, c, i, p; | ||
| 226 | uint8_t mem[8]; | ||
| 227 | cube_t cube; | ||
| 228 | |||
| 229 | for (i = 0, p = 0, c = coord; i < 8; i++, c /= 3) { | ||
| 230 | co = i == 7 ? ((3 - (p % 3)) % 3) : (c % 3); | ||
| 231 | p += co; | ||
| 232 | mem[i] = i + (co << COSHIFT); | ||
| 233 | } | ||
| 234 | |||
| 235 | cube.corner = vld1_u8(mem); | ||
| 236 | cube.edge = SOLVED_CUBE.edge; | ||
| 237 | |||
| 238 | return cube; | ||
| 239 | } | ||
| 240 | |||
| 222 | STATIC_INLINE int64_t | 241 | STATIC_INLINE int64_t |
| 223 | coord_csep(cube_t c) | 242 | coord_csep(cube_t c) |
| 224 | { | 243 | { |
