Skip to content

Commit 5e1a34d

Browse files
Avoid warning in rotate_left test
1 parent 5d989bc commit 5e1a34d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

include/xsimd/arch/xsimd_neon.hpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2771,10 +2771,11 @@ namespace xsimd
27712771
XSIMD_INLINE batch<T, A> rotate_left(batch<T, A> const& a, requires_arch<neon>) noexcept
27722772
{
27732773
using register_type = typename batch<T, A>::register_type;
2774+
// Adding modulo to avoid warning.
27742775
const detail::neon_dispatcher::binary dispatcher = {
2775-
std::make_tuple(wrap::rotate_left_u8<N>, wrap::rotate_left_s8<N>, wrap::rotate_left_u16<N>, wrap::rotate_left_s16<N>,
2776-
wrap::rotate_left_u32<N>, wrap::rotate_left_s32<N>, wrap::rotate_left_u64<N>, wrap::rotate_left_s64<N>,
2777-
wrap::rotate_left_f32<N>)
2776+
std::make_tuple(wrap::rotate_left_u8<N>, wrap::rotate_left_s8<N>, wrap::rotate_left_u16<N % 8>, wrap::rotate_left_s16<N % 8>,
2777+
wrap::rotate_left_u32<N % 4>, wrap::rotate_left_s32<N % 4>, wrap::rotate_left_u64<N % 2>, wrap::rotate_left_s64<N % 2>,
2778+
wrap::rotate_left_f32<N % 4>)
27782779
};
27792780
return dispatcher.apply(register_type(a), register_type(a));
27802781
}

0 commit comments

Comments
 (0)