Skip to content

Commit 79252d9

Browse files
Extend #1172 approach to arm
1 parent 8bf44e4 commit 79252d9

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

include/xsimd/arch/xsimd_neon.hpp

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -724,6 +724,28 @@ namespace xsimd
724724
store_complex_aligned(dst, src, A {});
725725
}
726726

727+
/*********************
728+
* store<batch_bool> *
729+
*********************/
730+
template <class T, class A, detail::enable_sized_unsigned_t<T, 1> = 0>
731+
XSIMD_INLINE void store(batch_bool<T, A> b, bool* mem, requires_arch<neon>) noexcept
732+
{
733+
uint8x16_t val = vsubq_u8(vdupq_n_u8(0), b);
734+
vst1q_u8((unsigned char*)mem, val);
735+
}
736+
template <class T, class A, detail::enable_sized_signed_t<T, 1> = 0>
737+
XSIMD_INLINE void store(batch_bool<T, A> b, bool* mem, requires_arch<neon>) noexcept
738+
{
739+
int8x16_t val = vsubq_s8(vdupq_n_s8(0), b);
740+
vst1q_s8((signed char*)mem, val);
741+
}
742+
743+
// template <class A>
744+
// XSIMD_INLINE void store(batch_bool<float, A> b, bool* mem, requires_arch<sse2>) noexcept
745+
//{
746+
// store(batch_bool<uint32_t, A>(b.data), mem, A {});
747+
// }
748+
727749
/*******
728750
* neg *
729751
*******/

0 commit comments

Comments
 (0)