Skip to content

Commit 1764cb2

Browse files
WIP
1 parent 6d1d82b commit 1764cb2

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
@@ -2980,6 +2980,33 @@ namespace xsimd
29802980
uint8x8_t hi = vtbl1_u8(low, mask_hi);
29812981
return vreinterpretq_u32_u8(vcombine_u8(lo, hi));
29822982
}
2983+
XSIMD_IF_CONSTEXPR(V0 >= 2 && V1 >= 2 && V2 >= 2 && V3 >= 2)
2984+
{
2985+
uint8x8_t high = vreinterpret_u8_u64(vget_high_u64(vreinterpretq_u64_u32(self)));
2986+
uint8x8_t mask_lo = {
2987+
V0 * 4 + 0,
2988+
V0 * 4 + 1,
2989+
V0 * 4 + 2,
2990+
V0 * 4 + 3,
2991+
V1 * 4 + 0,
2992+
V1 * 4 + 1,
2993+
V1 * 4 + 2,
2994+
V1 * 4 + 3,
2995+
};
2996+
uint8x8_t mask_hi = {
2997+
V2 * 4 + 0,
2998+
V2 * 4 + 1,
2999+
V2 * 4 + 2,
3000+
V2 * 4 + 3,
3001+
V3 * 4 + 0,
3002+
V3 * 4 + 1,
3003+
V3 * 4 + 2,
3004+
V3 * 4 + 3,
3005+
};
3006+
uint8x8_t lo = vtbl1_u8(high, mask_lo);
3007+
uint8x8_t hi = vtbl1_u8(high, mask_hi);
3008+
return vreinterpretq_u32_u8(vcombine_u8(lo, hi));
3009+
}
29833010
std::array<uint32_t, 4> data;
29843011
self.store_aligned(data.data());
29853012
return set(batch<uint32_t, A>(), A(), data[V0], data[V1], data[V2], data[V3]);

0 commit comments

Comments
 (0)