From 6eb6043f711e9bc54ff36d3adb0db1bfc25fa69f Mon Sep 17 00:00:00 2001 From: serge-sans-paille Date: Tue, 15 Oct 2024 22:46:24 +0200 Subject: [PATCH] WIP --- include/xsimd/types/xsimd_rvv_register.hpp | 32 ++++++---------------- 1 file changed, 9 insertions(+), 23 deletions(-) diff --git a/include/xsimd/types/xsimd_rvv_register.hpp b/include/xsimd/types/xsimd_rvv_register.hpp index 5c2702d32..ceeba9e69 100644 --- a/include/xsimd/types/xsimd_rvv_register.hpp +++ b/include/xsimd/types/xsimd_rvv_register.hpp @@ -102,7 +102,14 @@ namespace xsimd const auto words = XSIMD_RVV_JOINT5(__riscv_vreinterpret_, u, s, m, vmul)(x); \ return XSIMD_RVV_JOINT5(__riscv_vreinterpret_, u, 8, m, vmul)(words); \ } \ - }; + };\ + template <>\ + XSIMD_INLINE rvv_type_info::type\ + rvv_type_info::bitcast<__rvv_uint8m8_t>(\ + __rvv_uint8m8_t x) noexcept\ + {\ + return XSIMD_RVV_JOINT5(__riscv_vreinterpret_, t, s, m, vmul)(x);\ + } #define XSIMD_RVV_MAKE_TYPES(vmul) \ XSIMD_RVV_MAKE_TYPE(int8_t, i, 8, vmul) \ @@ -127,28 +134,7 @@ namespace xsimd #undef XSIMD_RVV_MAKE_TYPES #undef XSIMD_RVV_MAKE_TYPE - // Specialization needed for #1058 - template <> - XSIMD_INLINE rvv_type_info::type - rvv_type_info::bitcast<__rvv_uint8m8_t>( - __rvv_uint8m8_t x) noexcept - { - return __riscv_vreinterpret_i8m8(x); - } - template <> - XSIMD_INLINE rvv_type_info::type - rvv_type_info::bitcast<__rvv_uint8m1_t>( - __rvv_uint8m1_t x) noexcept - { - return __riscv_vreinterpret_i8m1(x); - } - template <> - XSIMD_INLINE rvv_type_info::type - rvv_type_info::bitcast<__rvv_uint8m1_t>( - __rvv_uint8m1_t x) noexcept - { - return __riscv_vreinterpret_u32m1(x); - } + // Specialization of as_bytes needed for #1058 template <> XSIMD_INLINE rvv_type_info::byte_type rvv_type_info::as_bytes<__rvv_int8m8_t>(__rvv_int8m8_t x) noexcept