From 56048d13b73ec6e6a9c59d62e82f41e69a3994bd Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Tue, 25 Mar 2025 18:35:47 +0100 Subject: More safety with pointers using VLA function parameters --- src/arch/avx2.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/arch/avx2.h') 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) } STATIC void -pieces(cube_t *cube, uint8_t c[static 8], uint8_t e[static 12]) +pieces(cube_t cube[static 1], uint8_t c[static 8], uint8_t e[static 12]) { uint8_t aux[32]; @@ -252,19 +252,19 @@ coord_esep(cube_t c) } STATIC_INLINE void -copy_corners(cube_t *dest, cube_t src) +copy_corners(cube_t dest[static 1], cube_t src) { *dest = _mm256_blend_epi32(*dest, src, 0x0F); } STATIC_INLINE void -copy_edges(cube_t *dest, cube_t src) +copy_edges(cube_t dest[static 1], cube_t src) { *dest = _mm256_blend_epi32(*dest, src, 0xF0); } STATIC_INLINE void -set_eo(cube_t *cube, int64_t eo) +set_eo(cube_t cube[static 1], int64_t eo) { int64_t eo12, eotop, eobot; __m256i veo; -- cgit v1.3