aboutsummaryrefslogtreecommitdiff
path: root/src/_moves_avx2.c
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2023-11-05 16:29:14 +0100
committerSebastiano Tronto <sebastiano@tronto.net>2023-11-05 16:37:39 +0100
commit1964938ca6abef6e5c81d9dccdf42c55abacb5e9 (patch)
tree9908417751ddf22e45ea68da0f209083249ac08e /src/_moves_avx2.c
parent9c1659d91a331735f88c127aa236a59153e23dfc (diff)
downloadnissy-core-1964938ca6abef6e5c81d9dccdf42c55abacb5e9.tar.gz
nissy-core-1964938ca6abef6e5c81d9dccdf42c55abacb5e9.zip
Refactoring
Diffstat (limited to 'src/_moves_avx2.c')
-rw-r--r--src/_moves_avx2.c197
1 files changed, 0 insertions, 197 deletions
diff --git a/src/_moves_avx2.c b/src/_moves_avx2.c
deleted file mode 100644
index 0c1f6a3..0000000
--- a/src/_moves_avx2.c
+++ /dev/null
@@ -1,197 +0,0 @@
1static inline cube_t
2inline_move_U(cube_t c)
3{
4 cube_t m = _mm256_set_epi8(
5 0, 0, 0, 0, 11, 10, 9, 8, 7, 6, 0, 1, 3, 2, 5, 4,
6 0, 0, 0, 0, 0, 0, 0, 0, 7, 6, 1, 0, 3, 2, 4, 5
7 );
8
9 return _mm256_shuffle_epi8(c, m);
10}
11
12static inline cube_t
13inline_move_U2(cube_t c)
14{
15 cube_t m = _mm256_set_epi8(
16 0, 0, 0, 0, 11, 10, 9, 8, 7, 6, 4, 5, 3, 2, 0, 1,
17 0, 0, 0, 0, 0, 0, 0, 0, 7, 6, 4, 5, 3, 2, 0, 1
18 );
19
20 return _mm256_shuffle_epi8(c, m);
21}
22
23static inline cube_t
24inline_move_U3(cube_t c)
25{
26 cube_t m = _mm256_set_epi8(
27 0, 0, 0, 0, 11, 10, 9, 8, 7, 6, 1, 0, 3, 2, 4, 5,
28 0, 0, 0, 0, 0, 0, 0, 0, 7, 6, 0, 1, 3, 2, 5, 4
29 );
30
31 return _mm256_shuffle_epi8(c, m);
32}
33
34static inline cube_t
35inline_move_D(cube_t c)
36{
37 cube_t m = _mm256_set_epi8(
38 0, 0, 0, 0, 11, 10, 9, 8, 3, 2, 5, 4, 6, 7, 1, 0,
39 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 5, 4, 6, 7, 1, 0
40 );
41
42 return _mm256_shuffle_epi8(c, m);
43}
44
45static inline cube_t
46inline_move_D2(cube_t c)
47{
48 cube_t m = _mm256_set_epi8(
49 0, 0, 0, 0, 11, 10, 9, 8, 6, 7, 5, 4, 2, 3, 1, 0,
50 0, 0, 0, 0, 0, 0, 0, 0, 6, 7, 5, 4, 2, 3, 1, 0
51 );
52
53 return _mm256_shuffle_epi8(c, m);
54}
55
56static inline cube_t
57inline_move_D3(cube_t c)
58{
59 cube_t m = _mm256_set_epi8(
60 0, 0, 0, 0, 11, 10, 9, 8, 2, 3, 5, 4, 7, 6, 1, 0,
61 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 5, 4, 7, 6, 1, 0
62 );
63
64 return _mm256_shuffle_epi8(c, m);
65}
66
67static inline cube_t
68inline_move_R(cube_t c)
69{
70 cube_t m = _mm256_set_epi8(
71 0, 0, 0, 0, 4, 10, 9, 7, 11, 6, 5, 8, 3, 2, 1, 0,
72 0, 0, 0, 0, 0, 0, 0, 0, 7, 35, 32, 4, 69, 2, 1, 70
73 );
74
75 return compose(c, m);
76}
77
78static inline cube_t
79inline_move_R2(cube_t c)
80{
81 cube_t m = _mm256_set_epi8(
82 0, 0, 0, 0, 8, 10, 9, 11, 4, 6, 5, 7, 3, 2, 1, 0,
83 0, 0, 0, 0, 0, 0, 0, 0, 7, 5, 6, 4, 0, 2, 1, 3
84 );
85
86 return _mm256_shuffle_epi8(c, m);
87}
88
89static inline cube_t
90inline_move_R3(cube_t c)
91{
92 cube_t m = _mm256_set_epi8(
93 0, 0, 0, 0, 7, 10, 9, 4, 8, 6, 5, 11, 3, 2, 1, 0,
94 0, 0, 0, 0, 0, 0, 0, 0, 7, 32, 35, 4, 70, 2, 1, 69
95 );
96
97 return compose(c, m);
98}
99
100static inline cube_t
101inline_move_L(cube_t c)
102{
103 cube_t m = _mm256_set_epi8(
104 0, 0, 0, 0, 11, 6, 5, 8, 7, 9, 10, 4, 3, 2, 1, 0,
105 0, 0, 0, 0, 0, 0, 0, 0, 34, 6, 5, 33, 3, 68, 71, 0
106 );
107
108 return compose(c, m);
109}
110
111static inline cube_t
112inline_move_L2(cube_t c)
113{
114 cube_t m = _mm256_set_epi8(
115 0, 0, 0, 0, 11, 9, 10, 8, 7, 5, 6, 4, 3, 2, 1, 0,
116 0, 0, 0, 0, 0, 0, 0, 0, 4, 6, 5, 7, 3, 1, 2, 0
117 );
118
119 return _mm256_shuffle_epi8(c, m);
120}
121
122static inline cube_t
123inline_move_L3(cube_t c)
124{
125 cube_t m = _mm256_set_epi8(
126 0, 0, 0, 0, 11, 5, 6, 8, 7, 10, 9, 4, 3, 2, 1, 0,
127 0, 0, 0, 0, 0, 0, 0, 0, 33, 6, 5, 34, 3, 71, 68, 0
128 );
129
130 return compose(c, m);
131}
132
133static inline cube_t
134inline_move_F(cube_t c)
135{
136 cube_t m = _mm256_set_epi8(
137 0, 0, 0, 0, 11, 10, 19, 16, 7, 6, 5, 4, 24, 2, 1, 25,
138 0, 0, 0, 0, 0, 0, 0, 0, 7, 64, 5, 66, 3, 38, 1, 36
139 );
140
141 return compose(c, m);
142}
143
144static inline cube_t
145inline_move_F2(cube_t c)
146{
147 cube_t m = _mm256_set_epi8(
148 0, 0, 0, 0, 11, 10, 8, 9, 7, 6, 5, 4, 0, 2, 1, 3,
149 0, 0, 0, 0, 0, 0, 0, 0, 7, 4, 5, 6, 3, 0, 1, 2
150 );
151
152 return _mm256_shuffle_epi8(c, m);
153}
154
155static inline cube_t
156inline_move_F3(cube_t c)
157{
158 cube_t m = _mm256_set_epi8(
159 0, 0, 0, 0, 11, 10, 16, 19, 7, 6, 5, 4, 25, 2, 1, 24,
160 0, 0, 0, 0, 0, 0, 0, 0, 7, 66, 5, 64, 3, 36, 1, 38
161 );
162
163 return compose(c, m);
164}
165
166static inline cube_t
167inline_move_B(cube_t c)
168{
169 cube_t m = _mm256_set_epi8(
170 0, 0, 0, 0, 18, 17, 9, 8, 7, 6, 5, 4, 3, 26, 27, 0,
171 0, 0, 0, 0, 0, 0, 0, 0, 65, 6, 67, 4, 39, 2, 37, 0
172 );
173
174 return compose(c, m);
175}
176
177static inline cube_t
178inline_move_B2(cube_t c)
179{
180 cube_t m = _mm256_set_epi8(
181 0, 0, 0, 0, 10, 11, 9, 8, 7, 6, 5, 4, 3, 1, 2, 0,
182 0, 0, 0, 0, 0, 0, 0, 0, 5, 6, 7, 4, 1, 2, 3, 0
183 );
184
185 return _mm256_shuffle_epi8(c, m);
186}
187
188static inline cube_t
189inline_move_B3(cube_t c)
190{
191 cube_t m = _mm256_set_epi8(
192 0, 0, 0, 0, 17, 18, 9, 8, 7, 6, 5, 4, 3, 27, 26, 0,
193 0, 0, 0, 0, 0, 0, 0, 0, 67, 6, 65, 4, 37, 2, 39, 0
194 );
195
196 return compose(c, m);
197}

Generated with cgit - Back to sebastiano.tronto.net