Skip to content

Commit

Permalink
Added support for store_unaligned
Browse files Browse the repository at this point in the history
  • Loading branch information
anutosh491 committed Oct 4, 2023
1 parent 0be3b98 commit c272589
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions include/xsimd/arch/xsimd_wasm.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,28 @@ namespace xsimd
return wasm_v128_store(mem, self);
}

// store_unaligned
template <class A>
inline void store_unaligned(float* mem, batch<float, A> const& self, requires_arch<wasm>) noexcept
{
return wasm_v128_store(mem, self);
}
template <class A, class T, class = typename std::enable_if<std::is_integral<T>::value, void>::type>
inline void store_unaligned(T* mem, batch<T, A> const& self, requires_arch<wasm>) noexcept
{
return wasm_v128_store((v128_t*)mem, self);
}
template <class A, class T, class = typename std::enable_if<std::is_integral<T>::value, void>::type>
inline void store_unaligned(T* mem, batch_bool<T, A> const& self, requires_arch<wasm>) noexcept
{
return wasm_v128_store((v128_t*)mem, self);
}
template <class A>
inline void store_unaligned(double* mem, batch<double, A> const& self, requires_arch<wasm>) noexcept
{
return wasm_v128_store(mem, self);
}

// sub
template <class A>
inline batch<float, A> sub(batch<float, A> const& self, batch<float, A> const& other, requires_arch<wasm>) noexcept
Expand Down

0 comments on commit c272589

Please sign in to comment.