diff --git a/include/xsimd/arch/xsimd_wasm.hpp b/include/xsimd/arch/xsimd_wasm.hpp index 93533d1dd..8f3ba8b65 100644 --- a/include/xsimd/arch/xsimd_wasm.hpp +++ b/include/xsimd/arch/xsimd_wasm.hpp @@ -491,6 +491,15 @@ namespace xsimd v128_t f = wasm_f64x2_sub(xH, wasm_f64x2_splat(442726361368656609280.)); // 3*2^67 + 2^52 return wasm_f64x2_add(f, xL); } + + template + inline batch fast_cast(batch const& self, batch const&, requires_arch) noexcept + { + return batch(static_cast(wasm_f32x4_extract_lane(self, 0)), + static_cast(wasm_f32x4_extract_lane(self, 1)), + static_cast(wasm_f32x4_extract_lane(self, 2)), + static_cast(wasm_f32x4_extract_lane(self, 3))); + } } // floor