Skip to content

Commit a63a853

Browse files
WIP
1 parent b75c165 commit a63a853

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

include/xsimd/arch/xsimd_neon.hpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3211,6 +3211,19 @@ namespace xsimd
32113211
{
32123212
return vreinterpretq_f32_u32(swizzle(batch<uint32_t, A>(vreinterpretq_u32_f32(self)), mask, A {}));
32133213
}
3214+
3215+
/*********
3216+
* widen *
3217+
*********/
3218+
template <class A, class T, detail::enable_sized_signed_t<T, 1> = 0>
3219+
XSIMD_INLINE std::array<batch<widen_t<T>, A>, 2> widen(batch<T, A> const& x, requires_arch<neon>) noexcept {
3220+
return {batch<widen_t<T>, A>(vaddl_s8(vget_low_s8(x), vdup_n_s8(0))), batch<widen_t<T>, A>(vaddl_s8(vget_high_s8(x), vdup_n_s8(0)))};
3221+
}
3222+
template <class A, class T, detail::enable_sized_unsigned_t<T, 1> = 0>
3223+
XSIMD_INLINE std::array<batch<widen_t<T>, A>, 2> widen(batch<T, A> const& x, requires_arch<neon>) noexcept {
3224+
return {batch<widen_t<T>, A>(vaddl_u8(vget_low_u8(x), vdup_n_u8(0))), batch<widen_t<T>, A>(vaddl_u8(vget_high_u8(x), vdup_n_u8(0)))};
3225+
}
3226+
32143227
}
32153228

32163229
}

0 commit comments

Comments
 (0)