Skip to content

Commit 520be34

Browse files
WIP
1 parent 0e776ef commit 520be34

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

include/xsimd/arch/xsimd_neon.hpp

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2953,6 +2953,33 @@ namespace xsimd
29532953
}
29542954
return vdupq_n_u32(vgetq_lane_u32(self, V0));
29552955
}
2956+
XSIMD_IF_CONSTEXPR(V0 < 2 && V1 < 2 && V2 < 2 && V3 < 2)
2957+
{
2958+
uint8x8_t low = vreinterpret_u8_u64(vget_low_u64(vreinterpretq_u64_u32(self)));
2959+
uint8x8_t mask_lo = {
2960+
V0 * 4 + 0,
2961+
V0 * 4 + 1,
2962+
V0 * 4 + 2,
2963+
V0 * 4 + 3,
2964+
V1 * 4 + 0,
2965+
V1 * 4 + 1,
2966+
V1 * 4 + 2,
2967+
V1 * 4 + 3,
2968+
};
2969+
uint8x8_t mask_hi = {
2970+
V2 * 4 + 0,
2971+
V2 * 4 + 1,
2972+
V2 * 4 + 2,
2973+
V2 * 4 + 3,
2974+
V3 * 4 + 0,
2975+
V3 * 4 + 1,
2976+
V3 * 4 + 2,
2977+
V3 * 4 + 3,
2978+
};
2979+
uint8x8_t lo = vtbl1_u8(low, mask_lo);
2980+
uint8x0_t hi = vtbl1_u8(low, mask_hi);
2981+
return vreinterpretq_u32_u8(vcombine_u8(lo, hi));
2982+
}
29562983
std::array<uint32_t, 4> data;
29572984
self.store_aligned(data.data());
29582985
return set(batch<uint32_t, A>(), A(), data[V0], data[V1], data[V2], data[V3]);

0 commit comments

Comments
 (0)