aboutsummaryrefslogtreecommitdiff
path: root/src/arch/avx2.h
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2025-03-25 18:35:47 +0100
committerSebastiano Tronto <sebastiano@tronto.net>2025-03-25 18:35:47 +0100
commit56048d13b73ec6e6a9c59d62e82f41e69a3994bd (patch)
tree49fc5d50e739a399897425756c08a73ba5924ddb /src/arch/avx2.h
parent0f4931c8de298b0f97aba1757c9538f48adb30c6 (diff)
downloadnissy-core-56048d13b73ec6e6a9c59d62e82f41e69a3994bd.tar.gz
nissy-core-56048d13b73ec6e6a9c59d62e82f41e69a3994bd.zip
More safety with pointers using VLA function parameters
Diffstat (limited to 'src/arch/avx2.h')
-rw-r--r--src/arch/avx2.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/arch/avx2.h b/src/arch/avx2.h
index b6ff510..ebcf84f 100644
--- a/src/arch/avx2.h
+++ b/src/arch/avx2.h
@@ -23,7 +23,7 @@ popcount_u32(uint32_t x)
23} 23}
24 24
25STATIC void 25STATIC void
26pieces(cube_t *cube, uint8_t c[static 8], uint8_t e[static 12]) 26pieces(cube_t cube[static 1], uint8_t c[static 8], uint8_t e[static 12])
27{ 27{
28 uint8_t aux[32]; 28 uint8_t aux[32];
29 29
@@ -252,19 +252,19 @@ coord_esep(cube_t c)
252} 252}
253 253
254STATIC_INLINE void 254STATIC_INLINE void
255copy_corners(cube_t *dest, cube_t src) 255copy_corners(cube_t dest[static 1], cube_t src)
256{ 256{
257 *dest = _mm256_blend_epi32(*dest, src, 0x0F); 257 *dest = _mm256_blend_epi32(*dest, src, 0x0F);
258} 258}
259 259
260STATIC_INLINE void 260STATIC_INLINE void
261copy_edges(cube_t *dest, cube_t src) 261copy_edges(cube_t dest[static 1], cube_t src)
262{ 262{
263 *dest = _mm256_blend_epi32(*dest, src, 0xF0); 263 *dest = _mm256_blend_epi32(*dest, src, 0xF0);
264} 264}
265 265
266STATIC_INLINE void 266STATIC_INLINE void
267set_eo(cube_t *cube, int64_t eo) 267set_eo(cube_t cube[static 1], int64_t eo)
268{ 268{
269 int64_t eo12, eotop, eobot; 269 int64_t eo12, eotop, eobot;
270 __m256i veo; 270 __m256i veo;

Generated with cgit - Back to sebastiano.tronto.net