aboutsummaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/avx2.h10
-rw-r--r--src/arch/common.h14
-rw-r--r--src/arch/neon.h10
-rw-r--r--src/arch/portable.h10
4 files changed, 22 insertions, 22 deletions
diff --git a/src/arch/avx2.h b/src/arch/avx2.h
index b80b0fb..7d8deef 100644
--- a/src/arch/avx2.h
+++ b/src/arch/avx2.h
@@ -35,7 +35,7 @@ popcount_u32(uint32_t x)
35} 35}
36 36
37STATIC void 37STATIC void
38pieces(cube_t cube[static 1], uint8_t c[static 8], uint8_t e[static 12]) 38pieces(cube_t cube[NON_NULL], uint8_t c[SIZE(8)], uint8_t e[SIZE(12)])
39{ 39{
40 uint8_t aux[32]; 40 uint8_t aux[32];
41 41
@@ -161,7 +161,7 @@ coord_co(cube_t c)
161} 161}
162 162
163STATIC_INLINE void 163STATIC_INLINE void
164copy_co(cube_t cube[static 1], cube_t co) 164copy_co(cube_t cube[NON_NULL], cube_t co)
165{ 165{
166 cube_t coclean; 166 cube_t coclean;
167 167
@@ -268,19 +268,19 @@ invcoord_esep(uint64_t esep)
268} 268}
269 269
270STATIC_INLINE void 270STATIC_INLINE void
271copy_corners(cube_t dest[static 1], cube_t src) 271copy_corners(cube_t dest[NON_NULL], cube_t src)
272{ 272{
273 *dest = _mm256_blend_epi32(*dest, src, 0x0F); 273 *dest = _mm256_blend_epi32(*dest, src, 0x0F);
274} 274}
275 275
276STATIC_INLINE void 276STATIC_INLINE void
277copy_edges(cube_t dest[static 1], cube_t src) 277copy_edges(cube_t dest[NON_NULL], cube_t src)
278{ 278{
279 *dest = _mm256_blend_epi32(*dest, src, 0xF0); 279 *dest = _mm256_blend_epi32(*dest, src, 0xF0);
280} 280}
281 281
282STATIC_INLINE void 282STATIC_INLINE void
283set_eo(cube_t cube[static 1], uint64_t eo) 283set_eo(cube_t cube[NON_NULL], uint64_t eo)
284{ 284{
285 uint64_t eo12, eotop, eobot; 285 uint64_t eo12, eotop, eobot;
286 __m256i veo; 286 __m256i veo;
diff --git a/src/arch/common.h b/src/arch/common.h
index 4412562..2a83fbf 100644
--- a/src/arch/common.h
+++ b/src/arch/common.h
@@ -14,7 +14,7 @@
14 14
15STATIC_INLINE int popcount_u32(uint32_t); 15STATIC_INLINE int popcount_u32(uint32_t);
16 16
17STATIC void pieces(cube_t [static 1], uint8_t [static 8], uint8_t [static 12]); 17STATIC void pieces(cube_t [NON_NULL], uint8_t [SIZE(8)], uint8_t [SIZE(12)]);
18STATIC_INLINE bool equal(cube_t, cube_t); 18STATIC_INLINE bool equal(cube_t, cube_t);
19STATIC_INLINE cube_t invertco(cube_t); 19STATIC_INLINE cube_t invertco(cube_t);
20STATIC_INLINE cube_t compose_edges(cube_t, cube_t); 20STATIC_INLINE cube_t compose_edges(cube_t, cube_t);
@@ -34,12 +34,12 @@ STATIC_INLINE cube_t invcoord_epudsep(uint64_t);
34 34
35STATIC_INLINE bool is_eo_even(cube_t); 35STATIC_INLINE bool is_eo_even(cube_t);
36 36
37STATIC_INLINE void copy_corners(cube_t [static 1], cube_t); 37STATIC_INLINE void copy_corners(cube_t [NON_NULL], cube_t);
38STATIC_INLINE void copy_co(cube_t [static 1], cube_t); 38STATIC_INLINE void copy_co(cube_t [NON_NULL], cube_t);
39STATIC_INLINE void copy_edges(cube_t [static 1], cube_t); 39STATIC_INLINE void copy_edges(cube_t [NON_NULL], cube_t);
40STATIC_INLINE void set_eo(cube_t [static 1], uint64_t); 40STATIC_INLINE void set_eo(cube_t [NON_NULL], uint64_t);
41 41
42STATIC_INLINE void invcoord_esep_array(uint64_t, uint64_t, uint8_t[static 12]); 42STATIC_INLINE void invcoord_esep_array(uint64_t, uint64_t, uint8_t[SIZE(12)]);
43STATIC_INLINE cube_t invcoord_eoesep(uint64_t); 43STATIC_INLINE cube_t invcoord_eoesep(uint64_t);
44STATIC_INLINE uint64_t coord_epudsep_array(const uint8_t [8]); 44STATIC_INLINE uint64_t coord_epudsep_array(const uint8_t [8]);
45STATIC_INLINE void invcoord_epudsep_array(uint64_t, uint8_t [8]); 45STATIC_INLINE void invcoord_epudsep_array(uint64_t, uint8_t [8]);
@@ -52,7 +52,7 @@ STATIC_INLINE uint64_t coord_epe(cube_t);
52STATIC_INLINE cube_t invcoord_epe(uint64_t); 52STATIC_INLINE cube_t invcoord_epe(uint64_t);
53 53
54STATIC_INLINE void 54STATIC_INLINE void
55invcoord_esep_array(uint64_t set1, uint64_t set2, uint8_t mem[static 12]) 55invcoord_esep_array(uint64_t set1, uint64_t set2, uint8_t mem[SIZE(12)])
56{ 56{
57 uint64_t bit1, bit2, i, j, jj, k, l, s, v, w, is1; 57 uint64_t bit1, bit2, i, j, jj, k, l, s, v, w, is1;
58 uint8_t slice[3] = {0}; 58 uint8_t slice[3] = {0};
diff --git a/src/arch/neon.h b/src/arch/neon.h
index f997813..1157938 100644
--- a/src/arch/neon.h
+++ b/src/arch/neon.h
@@ -48,7 +48,7 @@ popcount_u32(uint32_t x)
48} 48}
49 49
50STATIC void 50STATIC void
51pieces(cube_t cube[static 1], uint8_t c[static 8], uint8_t e[static 12]) 51pieces(cube_t cube[NON_NULL], uint8_t c[SIZE(8)], uint8_t e[SIZE(12)])
52{ 52{
53 // First 8 bytes of the corner vector are copied from the c array 53 // First 8 bytes of the corner vector are copied from the c array
54 vst1_u8(c, cube->corner); 54 vst1_u8(c, cube->corner);
@@ -233,7 +233,7 @@ coord_co(cube_t c)
233} 233}
234 234
235STATIC_INLINE void 235STATIC_INLINE void
236copy_co(cube_t cube[static 1], cube_t co) 236copy_co(cube_t cube[NON_NULL], cube_t co)
237{ 237{
238 uint8x8_t coclean; 238 uint8x8_t coclean;
239 239
@@ -329,19 +329,19 @@ coord_esep(cube_t c)
329} 329}
330 330
331STATIC_INLINE void 331STATIC_INLINE void
332copy_corners(cube_t dst[static 1], cube_t src) 332copy_corners(cube_t dst[NON_NULL], cube_t src)
333{ 333{
334 dst->corner = src.corner; 334 dst->corner = src.corner;
335} 335}
336 336
337STATIC_INLINE void 337STATIC_INLINE void
338copy_edges(cube_t dst[static 1], cube_t src) 338copy_edges(cube_t dst[NON_NULL], cube_t src)
339{ 339{
340 dst->edge = src.edge; 340 dst->edge = src.edge;
341} 341}
342 342
343STATIC_INLINE void 343STATIC_INLINE void
344set_eo(cube_t cube[static 1], uint64_t eo) 344set_eo(cube_t cube[NON_NULL], uint64_t eo)
345{ 345{
346 // Temp array to store the NEON vector 346 // Temp array to store the NEON vector
347 uint8_t mem[16]; 347 uint8_t mem[16];
diff --git a/src/arch/portable.h b/src/arch/portable.h
index 4b66fb6..311d427 100644
--- a/src/arch/portable.h
+++ b/src/arch/portable.h
@@ -35,7 +35,7 @@ popcount_u32(uint32_t x)
35} 35}
36 36
37STATIC void 37STATIC void
38pieces(cube_t cube[static 1], uint8_t c[static 8], uint8_t e[static 12]) 38pieces(cube_t cube[NON_NULL], uint8_t c[SIZE(8)], uint8_t e[SIZE(12)])
39{ 39{
40 memcpy(c, cube->corner, 8); 40 memcpy(c, cube->corner, 8);
41 memcpy(e, cube->edge, 12); 41 memcpy(e, cube->edge, 12);
@@ -155,7 +155,7 @@ inverse(cube_t cube)
155} 155}
156 156
157STATIC_INLINE void 157STATIC_INLINE void
158copy_co(cube_t cube[static 1], cube_t co) 158copy_co(cube_t cube[NON_NULL], cube_t co)
159{ 159{
160 uint8_t c; 160 uint8_t c;
161 size_t i; 161 size_t i;
@@ -280,19 +280,19 @@ invcoord_esep(uint64_t esep)
280} 280}
281 281
282STATIC_INLINE void 282STATIC_INLINE void
283copy_corners(cube_t dest[static 1], cube_t src) 283copy_corners(cube_t dest[NON_NULL], cube_t src)
284{ 284{
285 memcpy(&dest->corner, src.corner, sizeof(src.corner)); 285 memcpy(&dest->corner, src.corner, sizeof(src.corner));
286} 286}
287 287
288STATIC_INLINE void 288STATIC_INLINE void
289copy_edges(cube_t dest[static 1], cube_t src) 289copy_edges(cube_t dest[NON_NULL], cube_t src)
290{ 290{
291 memcpy(&dest->edge, src.edge, sizeof(src.edge)); 291 memcpy(&dest->edge, src.edge, sizeof(src.edge));
292} 292}
293 293
294STATIC_INLINE void 294STATIC_INLINE void
295set_eo(cube_t cube[static 1], uint64_t eo) 295set_eo(cube_t cube[NON_NULL], uint64_t eo)
296{ 296{
297 uint8_t i, sum, flip; 297 uint8_t i, sum, flip;
298 298

Generated with cgit - Back to sebastiano.tronto.net