7#include "../architecture.hpp"
13#if defined(TT_X86_64_V2)
32#if defined(TT_X86_64_V2)
34template<std::
integral T,
size_t N>
35requires(
sizeof(T) * N == 16) [[nodiscard]]
inline __m128i to_m128i(
std::array<T, N> const &rhs)
noexcept
37 return _mm_loadu_si128(
reinterpret_cast<__m128i
const *
>(rhs.data()));
40[[nodiscard]]
inline __m128 to_m128(rf32x4
const &rhs)
noexcept
42 return _mm_loadu_ps(rhs.data());
45[[nodiscard]]
inline __m128d to_m128d(rf64x2
const &rhs)
noexcept
47 return _mm_loadu_pd(rhs.data());
51 [[nodiscard]] inline x to_##x(__m128i rhs) noexcept \
54 _mm_storeu_si128(reinterpret_cast<__m128i *>(r.data()), rhs); \
68[[nodiscard]]
inline rf32x4 to_rf32x4(__m128 rhs)
noexcept
71 _mm_storeu_ps(r.data(), rhs);
75[[nodiscard]]
inline rf64x2 to_rf64x2(__m128d rhs)
noexcept
78 _mm_storeu_pd(r.data(), rhs);