32 #ifndef MCKL_RANDOM_INTERNAL_INCREMENT_SSE2_64_4_HPP 33 #define MCKL_RANDOM_INTERNAL_INCREMENT_SSE2_64_4_HPP 46 static constexpr std::size_t K_ = 1;
49 static void eval(
const std::array<T, K_> &ctr, std::array<__m128i, 4> &s)
51 __m128i c = _mm_set1_epi64x(static_cast<MCKL_INT64>(std::get<0>(ctr)));
53 std::get<0>(s) = _mm_add_epi64(c, _mm_set_epi64x(2, 1));
54 std::get<1>(s) = _mm_add_epi64(c, _mm_set_epi64x(4, 3));
55 std::get<2>(s) = _mm_add_epi64(c, _mm_set_epi64x(6, 5));
56 std::get<3>(s) = _mm_add_epi64(c, _mm_set_epi64x(8, 7));
63 static constexpr std::size_t K_ = 2;
66 static void eval(
const std::array<T, K_> &ctr, std::array<__m128i, 4> &s)
68 __m128i c = _mm_set_epi64x(static_cast<MCKL_INT64>(std::get<1>(ctr)),
69 static_cast<MCKL_INT64>(std::get<0>(ctr)));
71 std::get<0>(s) = _mm_add_epi64(c, _mm_set_epi64x(0, 1));
72 std::get<1>(s) = _mm_add_epi64(c, _mm_set_epi64x(0, 2));
73 std::get<2>(s) = _mm_add_epi64(c, _mm_set_epi64x(0, 3));
74 std::get<3>(s) = _mm_add_epi64(c, _mm_set_epi64x(0, 4));
81 static constexpr std::size_t K_ = 4;
84 static void eval(
const std::array<T, K_> &ctr, std::array<__m128i, 4> &s)
86 __m128i c = _mm_set_epi64x(static_cast<MCKL_INT64>(std::get<1>(ctr)),
87 static_cast<MCKL_INT64>(std::get<0>(ctr)));
89 std::get<0>(s) = _mm_add_epi64(c, _mm_set_epi64x(0, 1));
91 _mm_set_epi64x(static_cast<MCKL_INT64>(std::get<3>(ctr)),
92 static_cast<MCKL_INT64>(std::get<2>(ctr)));
93 std::get<2>(s) = _mm_add_epi64(c, _mm_set_epi64x(0, 2));
94 std::get<3>(s) = std::get<1>(s);
101 static constexpr std::size_t K_ = 8;
104 static void eval(
const std::array<T, K_> &ctr, std::array<__m128i, 4> &s)
106 std::memcpy(s.data(), ctr.data(), 64);
107 std::get<0>(s) = _mm_add_epi64(std::get<0>(s), _mm_set_epi64x(0, 1));
117 #endif // MCKL_RANDOM_INTERNAL_INCREMENT_SSE2_64_4_HPP static void eval(const std::array< T, K_ > &ctr, std::array< __m128i, 4 > &s)
#define MCKL_PUSH_GCC_WARNING(warning)
static void eval(const std::array< T, K_ > &ctr, std::array< __m128i, 4 > &s)
static void eval(const std::array< T, K_ > &ctr, std::array< __m128i, 4 > &s)
static void eval(const std::array< T, K_ > &ctr, std::array< __m128i, 4 > &s)
#define MCKL_POP_GCC_WARNING