diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2025-03-25 18:35:47 +0100 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2025-03-25 18:35:47 +0100 |
| commit | 56048d13b73ec6e6a9c59d62e82f41e69a3994bd (patch) | |
| tree | 49fc5d50e739a399897425756c08a73ba5924ddb /src/arch/avx2.h | |
| parent | 0f4931c8de298b0f97aba1757c9538f48adb30c6 (diff) | |
| download | nissy-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.h | 8 |
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 | ||
| 25 | STATIC void | 25 | STATIC void |
| 26 | pieces(cube_t *cube, uint8_t c[static 8], uint8_t e[static 12]) | 26 | pieces(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 | ||
| 254 | STATIC_INLINE void | 254 | STATIC_INLINE void |
| 255 | copy_corners(cube_t *dest, cube_t src) | 255 | copy_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 | ||
| 260 | STATIC_INLINE void | 260 | STATIC_INLINE void |
| 261 | copy_edges(cube_t *dest, cube_t src) | 261 | copy_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 | ||
| 266 | STATIC_INLINE void | 266 | STATIC_INLINE void |
| 267 | set_eo(cube_t *cube, int64_t eo) | 267 | set_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; |
