From 661b9bb0ba3fd4624edd12f85022ea790203863b Mon Sep 17 00:00:00 2001 From: Markus Wick Date: Fri, 4 Sep 2026 20:24:52 +0200 Subject: [PATCH] Fix neon64/swizzle on MSVC. vreinterpretq is a no-op here, not even converting the type. As we provide the batch into vreinterpretq, we keep its strong typing and on return, CL tells me that it cannot convert to the output type. --- include/xsimd/arch/xsimd_neon64.hpp | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/include/xsimd/arch/xsimd_neon64.hpp b/include/xsimd/arch/xsimd_neon64.hpp index 809ef8fa5..057b66a5d 100644 --- a/include/xsimd/arch/xsimd_neon64.hpp +++ b/include/xsimd/arch/xsimd_neon64.hpp @@ -1375,7 +1375,8 @@ namespace xsimd using index_type = batch; return vreinterpretq_u16_u8(swizzle(batch_type(vreinterpretq_u8_u16(self)), index_type(vreinterpretq_u8_u16(idx * 0x0202 + 0x0100)), - neon64 {})); + neon64 {}) + .data); } template @@ -1395,7 +1396,8 @@ namespace xsimd using index_type = batch; return vreinterpretq_u32_u8(swizzle(batch_type(vreinterpretq_u8_u32(self)), index_type(vreinterpretq_u8_u32(idx * 0x04040404 + 0x03020100)), - neon64 {})); + neon64 {}) + .data); } template @@ -1415,7 +1417,8 @@ namespace xsimd using index_type = batch; return vreinterpretq_u64_u8(swizzle(batch_type(vreinterpretq_u8_u64(self)), index_type(vreinterpretq_u8_u64(idx * 0x0808080808080808ull + 0x0706050403020100ull)), - neon64 {})); + neon64 {}) + .data); } template @@ -1517,7 +1520,7 @@ namespace xsimd requires_arch) noexcept { using batch_type = batch; - return vreinterpretq_u16_u8(swizzle(batch_type(vreinterpretq_u8_u16(self)), detail::burst_index(idx), A())); + return vreinterpretq_u16_u8(swizzle(batch_type(vreinterpretq_u8_u16(self)), detail::burst_index(idx), A()).data); } template @@ -1526,7 +1529,7 @@ namespace xsimd requires_arch) noexcept { using batch_type = batch; - return vreinterpretq_s16_s8(swizzle(batch_type(vreinterpretq_s8_s16(self)), detail::burst_index(idx), A())); + return vreinterpretq_s16_s8(swizzle(batch_type(vreinterpretq_s8_s16(self)), detail::burst_index(idx), A()).data); } template @@ -1535,7 +1538,7 @@ namespace xsimd requires_arch) noexcept { using batch_type = batch; - return vreinterpretq_u32_u8(swizzle(batch_type(vreinterpretq_u8_u32(self)), detail::burst_index(idx), A())); + return vreinterpretq_u32_u8(swizzle(batch_type(vreinterpretq_u8_u32(self)), detail::burst_index(idx), A()).data); } template @@ -1544,7 +1547,7 @@ namespace xsimd requires_arch) noexcept { using batch_type = batch; - return vreinterpretq_s32_s8(swizzle(batch_type(vreinterpretq_s8_s32(self)), detail::burst_index(idx), A())); + return vreinterpretq_s32_s8(swizzle(batch_type(vreinterpretq_s8_s32(self)), detail::burst_index(idx), A()).data); } template @@ -1553,7 +1556,7 @@ namespace xsimd requires_arch) noexcept { using batch_type = batch; - return vreinterpretq_u64_u8(swizzle(batch_type(vreinterpretq_u8_u64(self)), detail::burst_index(idx), A())); + return vreinterpretq_u64_u8(swizzle(batch_type(vreinterpretq_u8_u64(self)), detail::burst_index(idx), A()).data); } template @@ -1562,7 +1565,7 @@ namespace xsimd requires_arch) noexcept { using batch_type = batch; - return vreinterpretq_s64_s8(swizzle(batch_type(vreinterpretq_s8_s64(self)), detail::burst_index(idx), A())); + return vreinterpretq_s64_s8(swizzle(batch_type(vreinterpretq_s8_s64(self)), detail::burst_index(idx), A()).data); } template @@ -1571,7 +1574,7 @@ namespace xsimd requires_arch) noexcept { using batch_type = batch; - return vreinterpretq_f32_u8(swizzle(batch_type(vreinterpretq_u8_f32(self)), detail::burst_index(idx), A())); + return vreinterpretq_f32_u8(swizzle(batch_type(vreinterpretq_u8_f32(self)), detail::burst_index(idx), A()).data); } template @@ -1580,7 +1583,7 @@ namespace xsimd requires_arch) noexcept { using batch_type = batch; - return vreinterpretq_f64_u8(swizzle(batch_type(vreinterpretq_u8_f64(self)), detail::burst_index(idx), A())); + return vreinterpretq_f64_u8(swizzle(batch_type(vreinterpretq_u8_f64(self)), detail::burst_index(idx), A()).data); } template