aboutsummaryrefslogtreecommitdiff
path: root/src/arch/coordinates_unoptimized.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/coordinates_unoptimized.h')
-rw-r--r--src/arch/coordinates_unoptimized.h53
1 files changed, 0 insertions, 53 deletions
diff --git a/src/arch/coordinates_unoptimized.h b/src/arch/coordinates_unoptimized.h
deleted file mode 100644
index de76018..0000000
--- a/src/arch/coordinates_unoptimized.h
+++ /dev/null
@@ -1,53 +0,0 @@
1STATIC_INLINE int64_t coord_cp(cube_t);
2STATIC_INLINE cube_t invcoord_cp(int64_t);
3STATIC_INLINE int64_t coord_epud(cube_t);
4STATIC_INLINE cube_t invcoord_epud(int64_t);
5
6STATIC_INLINE int64_t
7coord_cp(cube_t cube)
8{
9 int i;
10 uint8_t c[8], e[12];
11
12 pieces(&cube, c, e);
13 for (i = 0; i < 8; i++)
14 c[i] &= PBITS;
15
16 return permtoindex(8, c);
17}
18
19STATIC_INLINE cube_t
20invcoord_cp(int64_t i)
21{
22 uint8_t c[8];
23
24 indextoperm(i, 8, c);
25
26 return STATIC_CUBE(c[0], c[1], c[2], c[3], c[4], c[5], c[6], c[7],
27 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11);
28}
29
30STATIC_INLINE int64_t
31coord_epud(cube_t cube)
32{
33 int i;
34 uint8_t c[8], e[12];
35
36 pieces(&cube, c, e);
37
38 for (i = 0; i < 8; i++)
39 e[i] &= PBITS;
40
41 return permtoindex(8, e);
42}
43
44STATIC_INLINE cube_t
45invcoord_epud(int64_t i)
46{
47 uint8_t e[8];
48
49 indextoperm(i, 8, e);
50
51 return STATIC_CUBE(0, 1, 2, 3, 4, 5, 6, 7,
52 e[0], e[1], e[2], e[3], e[4], e[5], e[6], e[7], 8, 9, 10, 11);
53}

Generated with cgit - Back to sebastiano.tronto.net