3#include "native/isa_import.h"
4#include "native/config.h"
18#if NATIVE_HOST_X86 || defined(NATIVE_DOXYGEN)
19namespace native::detail::x86_memory {
22 inline void constant_offset_requires_complete_elements() noexcept { __builtin_trap(); }
23 inline void constant_offset_out_of_range() noexcept { __builtin_trap(); }
25 template<
int Scale,
class T,
class I>
26 constexpr std::ptrdiff_t element_offset(I index)
noexcept {
27 std::int64_t value = index;
28 if constexpr (Scale <
sizeof(T)) {
29 constexpr auto divisor =
static_cast<std::int64_t
>(
sizeof(T) / Scale);
30 if (value % divisor) constant_offset_requires_complete_elements();
33 constexpr auto multiplier =
static_cast<std::int64_t
>(Scale /
sizeof(T));
34 if (value > std::numeric_limits<std::ptrdiff_t>::max() / multiplier ||
35 value < std::numeric_limits<std::ptrdiff_t>::min() / multiplier) {
36 constant_offset_out_of_range();
40 if (value > std::numeric_limits<std::ptrdiff_t>::max() ||
41 value < std::numeric_limits<std::ptrdiff_t>::min()) constant_offset_out_of_range();
42 return static_cast<std::ptrdiff_t
>(value);
46 constexpr auto array(V value)
noexcept {
47 std::array<typename V::value_type, V::lanes> result{};
49 value.store(result.data());
51 auto physical = std::bit_cast<std::array<
typename V::value_type,
52 sizeof(V) /
sizeof(
typename V::value_type)>>(value);
53 for (std::size_t i = 0; i < V::lanes; ++i) result[i] = physical[i];
59 constexpr bool active(M
mask, std::size_t lane)
noexcept {
60 if constexpr (std::same_as<M, std::uint64_t>)
return (
mask >> lane) & 1;
61 else return array(
mask)[lane] < 0;
64 template<
int Scale,
class V,
class I,
class M>
65 constexpr V gather(
typename V::value_type
const * base, I indices, V source, M
mask)
noexcept {
66 auto result = array(source);
67 auto offsets = array(indices);
68 constexpr auto count = V::lanes < I::lanes ? V::lanes : I::lanes;
69 for (std::size_t lane = 0; lane < count; ++lane) {
70 if (!active(
mask, lane))
continue;
72 result[lane] = base[element_offset<Scale, typename V::value_type>(offsets[lane])];
76 auto address =
reinterpret_cast<std::uintptr_t
>(base) +
77 std::uintptr_t(std::intptr_t(offsets[lane])) * Scale;
78 std::memcpy(&result[lane],
reinterpret_cast<void const *
>(address),
sizeof(result[lane]));
81 for (std::size_t lane = count; lane < V::lanes; ++lane) result[lane] = {};
85 std::array<
typename V::value_type,
sizeof(V) /
sizeof(
typename V::value_type)> physical{};
86 for (std::size_t i = 0; i < V::lanes; ++i) physical[i] = result[i];
87 return std::bit_cast<V>(physical);
91 template<
int Scale,
class V,
class I>
92 constexpr void scatter(
typename V::value_type * base, I indices, V value, std::uint64_t
mask)
noexcept {
93 auto values = array(value);
94 auto offsets = array(indices);
95 constexpr auto count = V::lanes < I::lanes ? V::lanes : I::lanes;
96 for (std::size_t lane = 0; lane < count; ++lane) {
97 if (!active(
mask, lane))
continue;
99 auto offset = element_offset<Scale, typename V::value_type>(offsets[lane]);
100 base[offset] = values[lane];
102 auto address =
reinterpret_cast<std::uintptr_t
>(base) +
103 std::uintptr_t(std::intptr_t(offsets[lane])) * Scale;
104 std::memcpy(
reinterpret_cast<void *
>(address), &values[lane],
sizeof(values[lane]));
126 template<
int Scale, std::
size_t N, isa<x86> Arch>
127 requires(Arch.has(x86_feature::avx2) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && N == 4)
128 [[nodiscard]] hint_inline hint_target(
"avx2")
134 _mm_i32gather_ps(base, indices.to_native(), Scale));
139 template<
int Scale, isa<x86> Arch>
140 requires(Arch.has(x86_feature::avx2) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8))
141 [[nodiscard]] hint_inline hint_target(
"avx2")
145 return detail::x86_memory::gather<Scale>(base, indices, source,
mask);
148 _mm_mask_i32gather_ps(source.to_native(), base, indices.to_native(), __builtin_bit_cast(
typename decltype(source)::native_type,
mask.to_native()), Scale));
153 template<
int Scale, isa<x86> Arch>
154 requires(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8))
155 [[nodiscard]] hint_inline hint_target(
"avx512f,avx512vl")
159 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
162 _mm_mmask_i32gather_ps(source.to_native(),
mask.to_bitset(), indices.to_native(), base, Scale));
167 template<
int Scale, isa<x86> Arch>
168 requires(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8))
169 hint_inline hint_target(
"avx512f,avx512vl")
173 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
175 _mm_mask_i32scatter_ps(base,
mask.to_bitset(), indices.to_native(), value.to_native(), Scale);
180 template<
int Scale, std::
size_t N, isa<x86> Arch>
181 requires(Arch.has(x86_feature::avx2) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && N == 8)
182 [[nodiscard]] hint_inline hint_target(
"avx2")
188 _mm256_i32gather_ps(base, indices.to_native(), Scale));
193 template<
int Scale, isa<x86> Arch>
194 requires(Arch.has(x86_feature::avx2) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8))
195 [[nodiscard]] hint_inline hint_target(
"avx2")
199 return detail::x86_memory::gather<Scale>(base, indices, source,
mask);
202 _mm256_mask_i32gather_ps(source.to_native(), base, indices.to_native(), __builtin_bit_cast(
typename decltype(source)::native_type,
mask.to_native()), Scale));
207 template<
int Scale, isa<x86> Arch>
208 requires(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8))
209 [[nodiscard]] hint_inline hint_target(
"avx512f,avx512vl")
213 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
216 _mm256_mmask_i32gather_ps(source.to_native(),
mask.to_bitset(), indices.to_native(), base, Scale));
221 template<
int Scale, isa<x86> Arch>
222 requires(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8))
223 hint_inline hint_target(
"avx512f,avx512vl")
227 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
229 _mm256_mask_i32scatter_ps(base,
mask.to_bitset(), indices.to_native(), value.to_native(), Scale);
234 template<
int Scale, isa<x86> Arch>
235 requires(Arch.has(x86_feature::avx512f) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8))
236 [[nodiscard]] hint_inline hint_target(
"avx512f")
240 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
243 _mm512_mask_i32gather_ps(source.to_native(),
mask.to_bitset(), indices.to_native(), base, Scale));
248 template<
int Scale, isa<x86> Arch>
249 requires(Arch.has(x86_feature::avx512f) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8))
250 hint_inline hint_target(
"avx512f")
254 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
256 _mm512_mask_i32scatter_ps(base,
mask.to_bitset(), indices.to_native(), value.to_native(), Scale);
261 template<
int Scale, std::
size_t N, isa<x86> Arch,
class T>
262 requires(Arch.has(x86_feature::avx2) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && N == 4 && (std::same_as<T, std::int32_t> || std::same_as<T, std::uint32_t>))
263 [[nodiscard]] hint_inline hint_target(
"avx2")
269 _mm_i32gather_epi32(
reinterpret_cast<int const *
>(base), indices.to_native(), Scale));
274 template<
int Scale, isa<x86> Arch,
class T>
275 requires(Arch.has(x86_feature::avx2) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int32_t> || std::same_as<T, std::uint32_t>))
276 [[nodiscard]] hint_inline hint_target(
"avx2")
280 return detail::x86_memory::gather<Scale>(base, indices, source,
mask);
283 _mm_mask_i32gather_epi32(source.to_native(),
reinterpret_cast<int const *
>(base), indices.to_native(),
mask.to_native(), Scale));
288 template<
int Scale, isa<x86> Arch,
class T>
289 requires(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int32_t> || std::same_as<T, std::uint32_t>))
290 [[nodiscard]] hint_inline hint_target(
"avx512f,avx512vl")
294 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
297 _mm_mmask_i32gather_epi32(source.to_native(),
mask.to_bitset(), indices.to_native(), base, Scale));
302 template<
int Scale, isa<x86> Arch,
class T>
303 requires(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int32_t> || std::same_as<T, std::uint32_t>))
304 hint_inline hint_target(
"avx512f,avx512vl")
308 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
310 _mm_mask_i32scatter_epi32(base,
mask.to_bitset(), indices.to_native(), value.to_native(), Scale);
315 template<
int Scale, std::
size_t N, isa<x86> Arch,
class T>
316 requires(Arch.has(x86_feature::avx2) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && N == 8 && (std::same_as<T, std::int32_t> || std::same_as<T, std::uint32_t>))
317 [[nodiscard]] hint_inline hint_target(
"avx2")
323 _mm256_i32gather_epi32(
reinterpret_cast<int const *
>(base), indices.to_native(), Scale));
328 template<
int Scale, isa<x86> Arch,
class T>
329 requires(Arch.has(x86_feature::avx2) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int32_t> || std::same_as<T, std::uint32_t>))
330 [[nodiscard]] hint_inline hint_target(
"avx2")
334 return detail::x86_memory::gather<Scale>(base, indices, source,
mask);
337 _mm256_mask_i32gather_epi32(source.to_native(),
reinterpret_cast<int const *
>(base), indices.to_native(),
mask.to_native(), Scale));
342 template<
int Scale, isa<x86> Arch,
class T>
343 requires(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int32_t> || std::same_as<T, std::uint32_t>))
344 [[nodiscard]] hint_inline hint_target(
"avx512f,avx512vl")
348 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
351 _mm256_mmask_i32gather_epi32(source.to_native(),
mask.to_bitset(), indices.to_native(), base, Scale));
356 template<
int Scale, isa<x86> Arch,
class T>
357 requires(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int32_t> || std::same_as<T, std::uint32_t>))
358 hint_inline hint_target(
"avx512f,avx512vl")
362 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
364 _mm256_mask_i32scatter_epi32(base,
mask.to_bitset(), indices.to_native(), value.to_native(), Scale);
369 template<
int Scale, isa<x86> Arch,
class T>
370 requires(Arch.has(x86_feature::avx512f) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int32_t> || std::same_as<T, std::uint32_t>))
371 [[nodiscard]] hint_inline hint_target(
"avx512f")
375 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
378 _mm512_mask_i32gather_epi32(source.to_native(),
mask.to_bitset(), indices.to_native(), base, Scale));
383 template<
int Scale, isa<x86> Arch,
class T>
384 requires(Arch.has(x86_feature::avx512f) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int32_t> || std::same_as<T, std::uint32_t>))
385 hint_inline hint_target(
"avx512f")
389 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
391 _mm512_mask_i32scatter_epi32(base,
mask.to_bitset(), indices.to_native(), value.to_native(), Scale);
396 template<
int Scale, std::
size_t N, isa<x86> Arch>
397 requires(Arch.has(x86_feature::avx2) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && N == 2)
398 [[nodiscard]] hint_inline hint_target(
"avx2")
404 _mm_i32gather_pd(base, indices.to_native(), Scale));
409 template<
int Scale, isa<x86> Arch>
410 requires(Arch.has(x86_feature::avx2) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8))
411 [[nodiscard]] hint_inline hint_target(
"avx2")
415 return detail::x86_memory::gather<Scale>(base, indices, source,
mask);
418 _mm_mask_i32gather_pd(source.to_native(), base, indices.to_native(), __builtin_bit_cast(
typename decltype(source)::native_type,
mask.to_native()), Scale));
423 template<
int Scale, isa<x86> Arch>
424 requires(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8))
425 [[nodiscard]] hint_inline hint_target(
"avx512f,avx512vl")
429 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
432 _mm_mmask_i32gather_pd(source.to_native(),
mask.to_bitset(), indices.to_native(), base, Scale));
437 template<
int Scale, isa<x86> Arch>
438 requires(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8))
439 hint_inline hint_target(
"avx512f,avx512vl")
443 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
445 _mm_mask_i32scatter_pd(base,
mask.to_bitset(), indices.to_native(), value.to_native(), Scale);
450 template<
int Scale, std::
size_t N, isa<x86> Arch>
451 requires(Arch.has(x86_feature::avx2) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && N == 4)
452 [[nodiscard]] hint_inline hint_target(
"avx2")
458 _mm256_i32gather_pd(base, indices.to_native(), Scale));
463 template<
int Scale, isa<x86> Arch>
464 requires(Arch.has(x86_feature::avx2) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8))
465 [[nodiscard]] hint_inline hint_target(
"avx2")
469 return detail::x86_memory::gather<Scale>(base, indices, source,
mask);
472 _mm256_mask_i32gather_pd(source.to_native(), base, indices.to_native(), __builtin_bit_cast(
typename decltype(source)::native_type,
mask.to_native()), Scale));
477 template<
int Scale, isa<x86> Arch>
478 requires(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8))
479 [[nodiscard]] hint_inline hint_target(
"avx512f,avx512vl")
483 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
486 _mm256_mmask_i32gather_pd(source.to_native(),
mask.to_bitset(), indices.to_native(), base, Scale));
491 template<
int Scale, isa<x86> Arch>
492 requires(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8))
493 hint_inline hint_target(
"avx512f,avx512vl")
497 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
499 _mm256_mask_i32scatter_pd(base,
mask.to_bitset(), indices.to_native(), value.to_native(), Scale);
504 template<
int Scale, isa<x86> Arch>
505 requires(Arch.has(x86_feature::avx512f) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8))
506 [[nodiscard]] hint_inline hint_target(
"avx512f")
510 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
513 _mm512_mask_i32gather_pd(source.to_native(),
mask.to_bitset(), indices.to_native(), base, Scale));
518 template<
int Scale, isa<x86> Arch>
519 requires(Arch.has(x86_feature::avx512f) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8))
520 hint_inline hint_target(
"avx512f")
524 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
526 _mm512_mask_i32scatter_pd(base,
mask.to_bitset(), indices.to_native(), value.to_native(), Scale);
531 template<
int Scale, std::
size_t N, isa<x86> Arch,
class T>
532 requires(Arch.has(x86_feature::avx2) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && N == 2 && (std::same_as<T, std::int64_t> || std::same_as<T, std::uint64_t>))
533 [[nodiscard]] hint_inline hint_target(
"avx2")
539 _mm_i32gather_epi64(
reinterpret_cast<long long const *
>(base), indices.to_native(), Scale));
544 template<
int Scale, isa<x86> Arch,
class T>
545 requires(Arch.has(x86_feature::avx2) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int64_t> || std::same_as<T, std::uint64_t>))
546 [[nodiscard]] hint_inline hint_target(
"avx2")
550 return detail::x86_memory::gather<Scale>(base, indices, source,
mask);
553 _mm_mask_i32gather_epi64(source.to_native(),
reinterpret_cast<long long const *
>(base), indices.to_native(),
mask.to_native(), Scale));
558 template<
int Scale, isa<x86> Arch,
class T>
559 requires(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int64_t> || std::same_as<T, std::uint64_t>))
560 [[nodiscard]] hint_inline hint_target(
"avx512f,avx512vl")
564 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
567 _mm_mmask_i32gather_epi64(source.to_native(),
mask.to_bitset(), indices.to_native(), base, Scale));
572 template<
int Scale, isa<x86> Arch,
class T>
573 requires(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int64_t> || std::same_as<T, std::uint64_t>))
574 hint_inline hint_target(
"avx512f,avx512vl")
578 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
580 _mm_mask_i32scatter_epi64(base,
mask.to_bitset(), indices.to_native(), value.to_native(), Scale);
585 template<
int Scale, std::
size_t N, isa<x86> Arch,
class T>
586 requires(Arch.has(x86_feature::avx2) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && N == 4 && (std::same_as<T, std::int64_t> || std::same_as<T, std::uint64_t>))
587 [[nodiscard]] hint_inline hint_target(
"avx2")
593 _mm256_i32gather_epi64(
reinterpret_cast<long long const *
>(base), indices.to_native(), Scale));
598 template<
int Scale, isa<x86> Arch,
class T>
599 requires(Arch.has(x86_feature::avx2) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int64_t> || std::same_as<T, std::uint64_t>))
600 [[nodiscard]] hint_inline hint_target(
"avx2")
604 return detail::x86_memory::gather<Scale>(base, indices, source,
mask);
607 _mm256_mask_i32gather_epi64(source.to_native(),
reinterpret_cast<long long const *
>(base), indices.to_native(),
mask.to_native(), Scale));
612 template<
int Scale, isa<x86> Arch,
class T>
613 requires(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int64_t> || std::same_as<T, std::uint64_t>))
614 [[nodiscard]] hint_inline hint_target(
"avx512f,avx512vl")
618 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
621 _mm256_mmask_i32gather_epi64(source.to_native(),
mask.to_bitset(), indices.to_native(), base, Scale));
626 template<
int Scale, isa<x86> Arch,
class T>
627 requires(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int64_t> || std::same_as<T, std::uint64_t>))
628 hint_inline hint_target(
"avx512f,avx512vl")
632 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
634 _mm256_mask_i32scatter_epi64(base,
mask.to_bitset(), indices.to_native(), value.to_native(), Scale);
639 template<
int Scale, isa<x86> Arch,
class T>
640 requires(Arch.has(x86_feature::avx512f) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int64_t> || std::same_as<T, std::uint64_t>))
641 [[nodiscard]] hint_inline hint_target(
"avx512f")
645 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
648 _mm512_mask_i32gather_epi64(source.to_native(),
mask.to_bitset(), indices.to_native(), base, Scale));
653 template<
int Scale, isa<x86> Arch,
class T>
654 requires(Arch.has(x86_feature::avx512f) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int64_t> || std::same_as<T, std::uint64_t>))
655 hint_inline hint_target(
"avx512f")
659 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
661 _mm512_mask_i32scatter_epi64(base,
mask.to_bitset(), indices.to_native(), value.to_native(), Scale);
666 template<
int Scale, std::
size_t N, isa<x86> Arch>
667 requires(Arch.has(x86_feature::avx2) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && N == 4)
668 [[nodiscard]] hint_inline hint_target(
"avx2")
674 _mm_i64gather_ps(base, indices.to_native(), Scale));
679 template<
int Scale, isa<x86> Arch>
680 requires(Arch.has(x86_feature::avx2) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8))
681 [[nodiscard]] hint_inline hint_target(
"avx2")
685 return detail::x86_memory::gather<Scale>(base, indices, source,
mask);
688 _mm_mask_i64gather_ps(source.to_native(), base, indices.to_native(), __builtin_bit_cast(
typename decltype(source)::native_type,
mask.to_native()), Scale));
693 template<
int Scale, isa<x86> Arch>
694 requires(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8))
695 [[nodiscard]] hint_inline hint_target(
"avx512f,avx512vl")
699 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
702 _mm_mmask_i64gather_ps(source.to_native(),
mask.to_bitset(), indices.to_native(), base, Scale));
707 template<
int Scale, isa<x86> Arch>
708 requires(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8))
709 hint_inline hint_target(
"avx512f,avx512vl")
713 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
715 _mm_mask_i64scatter_ps(base,
mask.to_bitset(), indices.to_native(), value.to_native(), Scale);
720 template<
int Scale, std::
size_t N, isa<x86> Arch>
721 requires(Arch.has(x86_feature::avx2) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && N == 4)
722 [[nodiscard]] hint_inline hint_target(
"avx2")
728 _mm256_i64gather_ps(base, indices.to_native(), Scale));
733 template<
int Scale, isa<x86> Arch>
734 requires(Arch.has(x86_feature::avx2) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8))
735 [[nodiscard]] hint_inline hint_target(
"avx2")
739 return detail::x86_memory::gather<Scale>(base, indices, source,
mask);
742 _mm256_mask_i64gather_ps(source.to_native(), base, indices.to_native(), __builtin_bit_cast(
typename decltype(source)::native_type,
mask.to_native()), Scale));
747 template<
int Scale, isa<x86> Arch>
748 requires(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8))
749 [[nodiscard]] hint_inline hint_target(
"avx512f,avx512vl")
753 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
756 _mm256_mmask_i64gather_ps(source.to_native(),
mask.to_bitset(), indices.to_native(), base, Scale));
761 template<
int Scale, isa<x86> Arch>
762 requires(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8))
763 hint_inline hint_target(
"avx512f,avx512vl")
767 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
769 _mm256_mask_i64scatter_ps(base,
mask.to_bitset(), indices.to_native(), value.to_native(), Scale);
774 template<
int Scale, isa<x86> Arch>
775 requires(Arch.has(x86_feature::avx512f) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8))
776 [[nodiscard]] hint_inline hint_target(
"avx512f")
780 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
783 _mm512_mask_i64gather_ps(source.to_native(),
mask.to_bitset(), indices.to_native(), base, Scale));
788 template<
int Scale, isa<x86> Arch>
789 requires(Arch.has(x86_feature::avx512f) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8))
790 hint_inline hint_target(
"avx512f")
794 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
796 _mm512_mask_i64scatter_ps(base,
mask.to_bitset(), indices.to_native(), value.to_native(), Scale);
801 template<
int Scale, std::
size_t N, isa<x86> Arch,
class T>
802 requires(Arch.has(x86_feature::avx2) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && N == 4 && (std::same_as<T, std::int32_t> || std::same_as<T, std::uint32_t>))
803 [[nodiscard]] hint_inline hint_target(
"avx2")
809 _mm_i64gather_epi32(
reinterpret_cast<int const *
>(base), indices.to_native(), Scale));
814 template<
int Scale, isa<x86> Arch,
class T>
815 requires(Arch.has(x86_feature::avx2) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int32_t> || std::same_as<T, std::uint32_t>))
816 [[nodiscard]] hint_inline hint_target(
"avx2")
820 return detail::x86_memory::gather<Scale>(base, indices, source,
mask);
823 _mm_mask_i64gather_epi32(source.to_native(),
reinterpret_cast<int const *
>(base), indices.to_native(),
mask.to_native(), Scale));
828 template<
int Scale, isa<x86> Arch,
class T>
829 requires(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int32_t> || std::same_as<T, std::uint32_t>))
830 [[nodiscard]] hint_inline hint_target(
"avx512f,avx512vl")
834 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
837 _mm_mmask_i64gather_epi32(source.to_native(),
mask.to_bitset(), indices.to_native(), base, Scale));
842 template<
int Scale, isa<x86> Arch,
class T>
843 requires(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int32_t> || std::same_as<T, std::uint32_t>))
844 hint_inline hint_target(
"avx512f,avx512vl")
848 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
850 _mm_mask_i64scatter_epi32(base,
mask.to_bitset(), indices.to_native(), value.to_native(), Scale);
855 template<
int Scale, std::
size_t N, isa<x86> Arch,
class T>
856 requires(Arch.has(x86_feature::avx2) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && N == 4 && (std::same_as<T, std::int32_t> || std::same_as<T, std::uint32_t>))
857 [[nodiscard]] hint_inline hint_target(
"avx2")
863 _mm256_i64gather_epi32(
reinterpret_cast<int const *
>(base), indices.to_native(), Scale));
868 template<
int Scale, isa<x86> Arch,
class T>
869 requires(Arch.has(x86_feature::avx2) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int32_t> || std::same_as<T, std::uint32_t>))
870 [[nodiscard]] hint_inline hint_target(
"avx2")
874 return detail::x86_memory::gather<Scale>(base, indices, source,
mask);
877 _mm256_mask_i64gather_epi32(source.to_native(),
reinterpret_cast<int const *
>(base), indices.to_native(),
mask.to_native(), Scale));
882 template<
int Scale, isa<x86> Arch,
class T>
883 requires(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int32_t> || std::same_as<T, std::uint32_t>))
884 [[nodiscard]] hint_inline hint_target(
"avx512f,avx512vl")
888 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
891 _mm256_mmask_i64gather_epi32(source.to_native(),
mask.to_bitset(), indices.to_native(), base, Scale));
896 template<
int Scale, isa<x86> Arch,
class T>
897 requires(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int32_t> || std::same_as<T, std::uint32_t>))
898 hint_inline hint_target(
"avx512f,avx512vl")
902 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
904 _mm256_mask_i64scatter_epi32(base,
mask.to_bitset(), indices.to_native(), value.to_native(), Scale);
909 template<
int Scale, isa<x86> Arch,
class T>
910 requires(Arch.has(x86_feature::avx512f) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int32_t> || std::same_as<T, std::uint32_t>))
911 [[nodiscard]] hint_inline hint_target(
"avx512f")
915 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
918 _mm512_mask_i64gather_epi32(source.to_native(),
mask.to_bitset(), indices.to_native(), base, Scale));
923 template<
int Scale, isa<x86> Arch,
class T>
924 requires(Arch.has(x86_feature::avx512f) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int32_t> || std::same_as<T, std::uint32_t>))
925 hint_inline hint_target(
"avx512f")
929 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
931 _mm512_mask_i64scatter_epi32(base,
mask.to_bitset(), indices.to_native(), value.to_native(), Scale);
936 template<
int Scale, std::
size_t N, isa<x86> Arch>
937 requires(Arch.has(x86_feature::avx2) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && N == 2)
938 [[nodiscard]] hint_inline hint_target(
"avx2")
944 _mm_i64gather_pd(base, indices.to_native(), Scale));
949 template<
int Scale, isa<x86> Arch>
950 requires(Arch.has(x86_feature::avx2) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8))
951 [[nodiscard]] hint_inline hint_target(
"avx2")
955 return detail::x86_memory::gather<Scale>(base, indices, source,
mask);
958 _mm_mask_i64gather_pd(source.to_native(), base, indices.to_native(), __builtin_bit_cast(
typename decltype(source)::native_type,
mask.to_native()), Scale));
963 template<
int Scale, isa<x86> Arch>
964 requires(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8))
965 [[nodiscard]] hint_inline hint_target(
"avx512f,avx512vl")
969 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
972 _mm_mmask_i64gather_pd(source.to_native(),
mask.to_bitset(), indices.to_native(), base, Scale));
977 template<
int Scale, isa<x86> Arch>
978 requires(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8))
979 hint_inline hint_target(
"avx512f,avx512vl")
983 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
985 _mm_mask_i64scatter_pd(base,
mask.to_bitset(), indices.to_native(), value.to_native(), Scale);
990 template<
int Scale, std::
size_t N, isa<x86> Arch>
991 requires(Arch.has(x86_feature::avx2) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && N == 4)
992 [[nodiscard]] hint_inline hint_target(
"avx2")
998 _mm256_i64gather_pd(base, indices.to_native(), Scale));
1003 template<
int Scale, isa<x86> Arch>
1004 requires(Arch.has(x86_feature::avx2) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8))
1005 [[nodiscard]] hint_inline hint_target(
"avx2")
1009 return detail::x86_memory::gather<Scale>(base, indices, source,
mask);
1012 _mm256_mask_i64gather_pd(source.to_native(), base, indices.to_native(), __builtin_bit_cast(
typename decltype(source)::native_type,
mask.to_native()), Scale));
1017 template<
int Scale, isa<x86> Arch>
1018 requires(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8))
1019 [[nodiscard]] hint_inline hint_target(
"avx512f,avx512vl")
1023 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1026 _mm256_mmask_i64gather_pd(source.to_native(),
mask.to_bitset(), indices.to_native(), base, Scale));
1031 template<
int Scale, isa<x86> Arch>
1032 requires(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8))
1033 hint_inline hint_target(
"avx512f,avx512vl")
1037 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1039 _mm256_mask_i64scatter_pd(base,
mask.to_bitset(), indices.to_native(), value.to_native(), Scale);
1044 template<
int Scale, isa<x86> Arch>
1045 requires(Arch.has(x86_feature::avx512f) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8))
1046 [[nodiscard]] hint_inline hint_target(
"avx512f")
1050 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1053 _mm512_mask_i64gather_pd(source.to_native(),
mask.to_bitset(), indices.to_native(), base, Scale));
1058 template<
int Scale, isa<x86> Arch>
1059 requires(Arch.has(x86_feature::avx512f) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8))
1060 hint_inline hint_target(
"avx512f")
1064 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1066 _mm512_mask_i64scatter_pd(base,
mask.to_bitset(), indices.to_native(), value.to_native(), Scale);
1071 template<
int Scale, std::
size_t N, isa<x86> Arch,
class T>
1072 requires(Arch.has(x86_feature::avx2) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && N == 2 && (std::same_as<T, std::int64_t> || std::same_as<T, std::uint64_t>))
1073 [[nodiscard]] hint_inline hint_target(
"avx2")
1076 return detail::x86_memory::gather<Scale>(base, indices,
simd<T, 2, Arch>{},
~std::uint64_t{0});
1079 _mm_i64gather_epi64(
reinterpret_cast<long long const *
>(base), indices.to_native(), Scale));
1084 template<
int Scale, isa<x86> Arch,
class T>
1085 requires(Arch.has(x86_feature::avx2) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int64_t> || std::same_as<T, std::uint64_t>))
1086 [[nodiscard]] hint_inline hint_target(
"avx2")
1090 return detail::x86_memory::gather<Scale>(base, indices, source,
mask);
1093 _mm_mask_i64gather_epi64(source.to_native(),
reinterpret_cast<long long const *
>(base), indices.to_native(),
mask.to_native(), Scale));
1098 template<
int Scale, isa<x86> Arch,
class T>
1099 requires(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int64_t> || std::same_as<T, std::uint64_t>))
1100 [[nodiscard]] hint_inline hint_target(
"avx512f,avx512vl")
1104 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1107 _mm_mmask_i64gather_epi64(source.to_native(),
mask.to_bitset(), indices.to_native(), base, Scale));
1112 template<
int Scale, isa<x86> Arch,
class T>
1113 requires(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int64_t> || std::same_as<T, std::uint64_t>))
1114 hint_inline hint_target(
"avx512f,avx512vl")
1118 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1120 _mm_mask_i64scatter_epi64(base,
mask.to_bitset(), indices.to_native(), value.to_native(), Scale);
1125 template<
int Scale, std::
size_t N, isa<x86> Arch,
class T>
1126 requires(Arch.has(x86_feature::avx2) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && N == 4 && (std::same_as<T, std::int64_t> || std::same_as<T, std::uint64_t>))
1127 [[nodiscard]] hint_inline hint_target(
"avx2")
1130 return detail::x86_memory::gather<Scale>(base, indices,
simd<T, 4, Arch>{},
~std::uint64_t{0});
1133 _mm256_i64gather_epi64(
reinterpret_cast<long long const *
>(base), indices.to_native(), Scale));
1138 template<
int Scale, isa<x86> Arch,
class T>
1139 requires(Arch.has(x86_feature::avx2) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int64_t> || std::same_as<T, std::uint64_t>))
1140 [[nodiscard]] hint_inline hint_target(
"avx2")
1144 return detail::x86_memory::gather<Scale>(base, indices, source,
mask);
1147 _mm256_mask_i64gather_epi64(source.to_native(),
reinterpret_cast<long long const *
>(base), indices.to_native(),
mask.to_native(), Scale));
1152 template<
int Scale, isa<x86> Arch,
class T>
1153 requires(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int64_t> || std::same_as<T, std::uint64_t>))
1154 [[nodiscard]] hint_inline hint_target(
"avx512f,avx512vl")
1158 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1161 _mm256_mmask_i64gather_epi64(source.to_native(),
mask.to_bitset(), indices.to_native(), base, Scale));
1166 template<
int Scale, isa<x86> Arch,
class T>
1167 requires(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int64_t> || std::same_as<T, std::uint64_t>))
1168 hint_inline hint_target(
"avx512f,avx512vl")
1172 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1174 _mm256_mask_i64scatter_epi64(base,
mask.to_bitset(), indices.to_native(), value.to_native(), Scale);
1179 template<
int Scale, isa<x86> Arch,
class T>
1180 requires(Arch.has(x86_feature::avx512f) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int64_t> || std::same_as<T, std::uint64_t>))
1181 [[nodiscard]] hint_inline hint_target(
"avx512f")
1185 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1188 _mm512_mask_i64gather_epi64(source.to_native(),
mask.to_bitset(), indices.to_native(), base, Scale));
1193 template<
int Scale, isa<x86> Arch,
class T>
1194 requires(Arch.has(x86_feature::avx512f) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int64_t> || std::same_as<T, std::uint64_t>))
1195 hint_inline hint_target(
"avx512f")
1199 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1201 _mm512_mask_i64scatter_epi64(base,
mask.to_bitset(), indices.to_native(), value.to_native(), Scale);
1206 template<
int Scale, std::
size_t N, isa<x86> Arch>
1207 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx2)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && N == 4 &&
requires { sizeof(simd<float, 4, Arch>); sizeof(simd<std::int32_t, 4, Arch>); })
1213 template<
int Scale, std::
size_t N, isa<x86> Arch>
1214 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx2)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && N == 4 &&
requires { sizeof(simd<float, 4, Arch>); sizeof(simd<std::int32_t, 4, Arch>); })
1219 template<
int Scale, isa<x86> Arch>
1220 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx2)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) &&
requires { sizeof(simd<float, 4, Arch>); sizeof(simd<std::int32_t, 4, Arch>); })
1223 return detail::x86_memory::gather<Scale>(base, indices, source,
mask);
1227 template<
int Scale, isa<x86> Arch>
1228 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx2)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) &&
requires { sizeof(simd<float, 4, Arch>); sizeof(simd<std::int32_t, 4, Arch>); })
1231 return detail::x86_memory::gather<Scale>(base, indices, source,
mask);
1234 template<
int Scale, isa<x86> Arch>
1235 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) &&
requires { sizeof(simd<float, 4, Arch>); sizeof(simd<std::int32_t, 4, Arch>); })
1238 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1242 template<
int Scale, isa<x86> Arch>
1243 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) &&
requires { sizeof(simd<float, 4, Arch>); sizeof(simd<std::int32_t, 4, Arch>); })
1246 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1249 template<
int Scale, isa<x86> Arch>
1250 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) &&
requires { sizeof(simd<float, 4, Arch>); sizeof(simd<std::int32_t, 4, Arch>); })
1253 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1257 template<
int Scale, isa<x86> Arch>
1258 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) &&
requires { sizeof(simd<float, 4, Arch>); sizeof(simd<std::int32_t, 4, Arch>); })
1261 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1264 template<
int Scale, std::
size_t N, isa<x86> Arch>
1265 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx2)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && N == 8 &&
requires { sizeof(simd<float, 8, Arch>); sizeof(simd<std::int32_t, 8, Arch>); })
1271 template<
int Scale, std::
size_t N, isa<x86> Arch>
1272 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx2)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && N == 8 &&
requires { sizeof(simd<float, 8, Arch>); sizeof(simd<std::int32_t, 8, Arch>); })
1277 template<
int Scale, isa<x86> Arch>
1278 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx2)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) &&
requires { sizeof(simd<float, 8, Arch>); sizeof(simd<std::int32_t, 8, Arch>); })
1281 return detail::x86_memory::gather<Scale>(base, indices, source,
mask);
1285 template<
int Scale, isa<x86> Arch>
1286 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx2)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) &&
requires { sizeof(simd<float, 8, Arch>); sizeof(simd<std::int32_t, 8, Arch>); })
1289 return detail::x86_memory::gather<Scale>(base, indices, source,
mask);
1292 template<
int Scale, isa<x86> Arch>
1293 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) &&
requires { sizeof(simd<float, 8, Arch>); sizeof(simd<std::int32_t, 8, Arch>); })
1296 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1300 template<
int Scale, isa<x86> Arch>
1301 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) &&
requires { sizeof(simd<float, 8, Arch>); sizeof(simd<std::int32_t, 8, Arch>); })
1304 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1307 template<
int Scale, isa<x86> Arch>
1308 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) &&
requires { sizeof(simd<float, 8, Arch>); sizeof(simd<std::int32_t, 8, Arch>); })
1311 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1315 template<
int Scale, isa<x86> Arch>
1316 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) &&
requires { sizeof(simd<float, 8, Arch>); sizeof(simd<std::int32_t, 8, Arch>); })
1319 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1322 template<
int Scale, isa<x86> Arch>
1323 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) &&
requires { sizeof(simd<float, 16, Arch>); sizeof(simd<std::int32_t, 16, Arch>); })
1326 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1330 template<
int Scale, isa<x86> Arch>
1331 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) &&
requires { sizeof(simd<float, 16, Arch>); sizeof(simd<std::int32_t, 16, Arch>); })
1334 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1337 template<
int Scale, isa<x86> Arch>
1338 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) &&
requires { sizeof(simd<float, 16, Arch>); sizeof(simd<std::int32_t, 16, Arch>); })
1341 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1345 template<
int Scale, isa<x86> Arch>
1346 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) &&
requires { sizeof(simd<float, 16, Arch>); sizeof(simd<std::int32_t, 16, Arch>); })
1349 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1352 template<
int Scale, std::
size_t N, isa<x86> Arch,
class T>
1353 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx2)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && N == 4 && (std::same_as<T, std::int32_t> || std::same_as<T, std::uint32_t>) &&
requires { sizeof(simd<T, 4, Arch>); sizeof(simd<std::int32_t, 4, Arch>); })
1355 return detail::x86_memory::gather<Scale>(base, indices,
simd<T, 4, Arch>{},
~std::uint64_t{0});
1359 template<
int Scale, std::
size_t N, isa<x86> Arch,
class T>
1360 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx2)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && N == 4 && (std::same_as<T, std::int32_t> || std::same_as<T, std::uint32_t>) &&
requires { sizeof(simd<T, 4, Arch>); sizeof(simd<std::int32_t, 4, Arch>); })
1362 return detail::x86_memory::gather<Scale>(base, indices,
simd<T, 4, Arch>{},
~std::uint64_t{0});
1365 template<
int Scale, isa<x86> Arch,
class T>
1366 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx2)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int32_t> || std::same_as<T, std::uint32_t>) &&
requires { sizeof(simd<T, 4, Arch>); sizeof(simd<std::int32_t, 4, Arch>); })
1369 return detail::x86_memory::gather<Scale>(base, indices, source,
mask);
1373 template<
int Scale, isa<x86> Arch,
class T>
1374 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx2)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int32_t> || std::same_as<T, std::uint32_t>) &&
requires { sizeof(simd<T, 4, Arch>); sizeof(simd<std::int32_t, 4, Arch>); })
1377 return detail::x86_memory::gather<Scale>(base, indices, source,
mask);
1380 template<
int Scale, isa<x86> Arch,
class T>
1381 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int32_t> || std::same_as<T, std::uint32_t>) &&
requires { sizeof(simd<T, 4, Arch>); sizeof(simd<std::int32_t, 4, Arch>); })
1384 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1388 template<
int Scale, isa<x86> Arch,
class T>
1389 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int32_t> || std::same_as<T, std::uint32_t>) &&
requires { sizeof(simd<T, 4, Arch>); sizeof(simd<std::int32_t, 4, Arch>); })
1392 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1395 template<
int Scale, isa<x86> Arch,
class T>
1396 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int32_t> || std::same_as<T, std::uint32_t>) &&
requires { sizeof(simd<T, 4, Arch>); sizeof(simd<std::int32_t, 4, Arch>); })
1399 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1403 template<
int Scale, isa<x86> Arch,
class T>
1404 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int32_t> || std::same_as<T, std::uint32_t>) &&
requires { sizeof(simd<T, 4, Arch>); sizeof(simd<std::int32_t, 4, Arch>); })
1407 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1410 template<
int Scale, std::
size_t N, isa<x86> Arch,
class T>
1411 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx2)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && N == 8 && (std::same_as<T, std::int32_t> || std::same_as<T, std::uint32_t>) &&
requires { sizeof(simd<T, 8, Arch>); sizeof(simd<std::int32_t, 8, Arch>); })
1413 return detail::x86_memory::gather<Scale>(base, indices,
simd<T, 8, Arch>{},
~std::uint64_t{0});
1417 template<
int Scale, std::
size_t N, isa<x86> Arch,
class T>
1418 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx2)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && N == 8 && (std::same_as<T, std::int32_t> || std::same_as<T, std::uint32_t>) &&
requires { sizeof(simd<T, 8, Arch>); sizeof(simd<std::int32_t, 8, Arch>); })
1420 return detail::x86_memory::gather<Scale>(base, indices,
simd<T, 8, Arch>{},
~std::uint64_t{0});
1423 template<
int Scale, isa<x86> Arch,
class T>
1424 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx2)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int32_t> || std::same_as<T, std::uint32_t>) &&
requires { sizeof(simd<T, 8, Arch>); sizeof(simd<std::int32_t, 8, Arch>); })
1427 return detail::x86_memory::gather<Scale>(base, indices, source,
mask);
1431 template<
int Scale, isa<x86> Arch,
class T>
1432 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx2)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int32_t> || std::same_as<T, std::uint32_t>) &&
requires { sizeof(simd<T, 8, Arch>); sizeof(simd<std::int32_t, 8, Arch>); })
1435 return detail::x86_memory::gather<Scale>(base, indices, source,
mask);
1438 template<
int Scale, isa<x86> Arch,
class T>
1439 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int32_t> || std::same_as<T, std::uint32_t>) &&
requires { sizeof(simd<T, 8, Arch>); sizeof(simd<std::int32_t, 8, Arch>); })
1442 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1446 template<
int Scale, isa<x86> Arch,
class T>
1447 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int32_t> || std::same_as<T, std::uint32_t>) &&
requires { sizeof(simd<T, 8, Arch>); sizeof(simd<std::int32_t, 8, Arch>); })
1450 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1453 template<
int Scale, isa<x86> Arch,
class T>
1454 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int32_t> || std::same_as<T, std::uint32_t>) &&
requires { sizeof(simd<T, 8, Arch>); sizeof(simd<std::int32_t, 8, Arch>); })
1457 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1461 template<
int Scale, isa<x86> Arch,
class T>
1462 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int32_t> || std::same_as<T, std::uint32_t>) &&
requires { sizeof(simd<T, 8, Arch>); sizeof(simd<std::int32_t, 8, Arch>); })
1465 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1468 template<
int Scale, isa<x86> Arch,
class T>
1469 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int32_t> || std::same_as<T, std::uint32_t>) &&
requires { sizeof(simd<T, 16, Arch>); sizeof(simd<std::int32_t, 16, Arch>); })
1472 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1476 template<
int Scale, isa<x86> Arch,
class T>
1477 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int32_t> || std::same_as<T, std::uint32_t>) &&
requires { sizeof(simd<T, 16, Arch>); sizeof(simd<std::int32_t, 16, Arch>); })
1480 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1483 template<
int Scale, isa<x86> Arch,
class T>
1484 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int32_t> || std::same_as<T, std::uint32_t>) &&
requires { sizeof(simd<T, 16, Arch>); sizeof(simd<std::int32_t, 16, Arch>); })
1487 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1491 template<
int Scale, isa<x86> Arch,
class T>
1492 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int32_t> || std::same_as<T, std::uint32_t>) &&
requires { sizeof(simd<T, 16, Arch>); sizeof(simd<std::int32_t, 16, Arch>); })
1495 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1498 template<
int Scale, std::
size_t N, isa<x86> Arch>
1499 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx2)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && N == 2 &&
requires { sizeof(simd<double, 2, Arch>); sizeof(simd<std::int32_t, 4, Arch>); })
1505 template<
int Scale, std::
size_t N, isa<x86> Arch>
1506 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx2)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && N == 2 &&
requires { sizeof(simd<double, 2, Arch>); sizeof(simd<std::int32_t, 4, Arch>); })
1511 template<
int Scale, isa<x86> Arch>
1512 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx2)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) &&
requires { sizeof(simd<double, 2, Arch>); sizeof(simd<std::int32_t, 4, Arch>); sizeof(simd<std::int64_t, 2, Arch>); })
1515 return detail::x86_memory::gather<Scale>(base, indices, source,
mask);
1519 template<
int Scale, isa<x86> Arch>
1520 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx2)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) &&
requires { sizeof(simd<double, 2, Arch>); sizeof(simd<std::int32_t, 4, Arch>); sizeof(simd<std::int64_t, 2, Arch>); })
1523 return detail::x86_memory::gather<Scale>(base, indices, source,
mask);
1526 template<
int Scale, isa<x86> Arch>
1527 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) &&
requires { sizeof(simd<double, 2, Arch>); sizeof(simd<std::int32_t, 4, Arch>); })
1530 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1534 template<
int Scale, isa<x86> Arch>
1535 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) &&
requires { sizeof(simd<double, 2, Arch>); sizeof(simd<std::int32_t, 4, Arch>); })
1538 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1541 template<
int Scale, isa<x86> Arch>
1542 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) &&
requires { sizeof(simd<double, 2, Arch>); sizeof(simd<std::int32_t, 4, Arch>); })
1545 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1549 template<
int Scale, isa<x86> Arch>
1550 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) &&
requires { sizeof(simd<double, 2, Arch>); sizeof(simd<std::int32_t, 4, Arch>); })
1553 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1556 template<
int Scale, std::
size_t N, isa<x86> Arch>
1557 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx2)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && N == 4 &&
requires { sizeof(simd<double, 4, Arch>); sizeof(simd<std::int32_t, 4, Arch>); })
1563 template<
int Scale, std::
size_t N, isa<x86> Arch>
1564 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx2)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && N == 4 &&
requires { sizeof(simd<double, 4, Arch>); sizeof(simd<std::int32_t, 4, Arch>); })
1569 template<
int Scale, isa<x86> Arch>
1570 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx2)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) &&
requires { sizeof(simd<double, 4, Arch>); sizeof(simd<std::int32_t, 4, Arch>); sizeof(simd<std::int64_t, 4, Arch>); })
1573 return detail::x86_memory::gather<Scale>(base, indices, source,
mask);
1577 template<
int Scale, isa<x86> Arch>
1578 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx2)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) &&
requires { sizeof(simd<double, 4, Arch>); sizeof(simd<std::int32_t, 4, Arch>); sizeof(simd<std::int64_t, 4, Arch>); })
1581 return detail::x86_memory::gather<Scale>(base, indices, source,
mask);
1584 template<
int Scale, isa<x86> Arch>
1585 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) &&
requires { sizeof(simd<double, 4, Arch>); sizeof(simd<std::int32_t, 4, Arch>); })
1588 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1592 template<
int Scale, isa<x86> Arch>
1593 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) &&
requires { sizeof(simd<double, 4, Arch>); sizeof(simd<std::int32_t, 4, Arch>); })
1596 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1599 template<
int Scale, isa<x86> Arch>
1600 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) &&
requires { sizeof(simd<double, 4, Arch>); sizeof(simd<std::int32_t, 4, Arch>); })
1603 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1607 template<
int Scale, isa<x86> Arch>
1608 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) &&
requires { sizeof(simd<double, 4, Arch>); sizeof(simd<std::int32_t, 4, Arch>); })
1611 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1614 template<
int Scale, isa<x86> Arch>
1615 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) &&
requires { sizeof(simd<double, 8, Arch>); sizeof(simd<std::int32_t, 8, Arch>); })
1618 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1622 template<
int Scale, isa<x86> Arch>
1623 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) &&
requires { sizeof(simd<double, 8, Arch>); sizeof(simd<std::int32_t, 8, Arch>); })
1626 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1629 template<
int Scale, isa<x86> Arch>
1630 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) &&
requires { sizeof(simd<double, 8, Arch>); sizeof(simd<std::int32_t, 8, Arch>); })
1633 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1637 template<
int Scale, isa<x86> Arch>
1638 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) &&
requires { sizeof(simd<double, 8, Arch>); sizeof(simd<std::int32_t, 8, Arch>); })
1641 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1644 template<
int Scale, std::
size_t N, isa<x86> Arch,
class T>
1645 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx2)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && N == 2 && (std::same_as<T, std::int64_t> || std::same_as<T, std::uint64_t>) &&
requires { sizeof(simd<T, 2, Arch>); sizeof(simd<std::int32_t, 4, Arch>); })
1647 return detail::x86_memory::gather<Scale>(base, indices,
simd<T, 2, Arch>{},
~std::uint64_t{0});
1651 template<
int Scale, std::
size_t N, isa<x86> Arch,
class T>
1652 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx2)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && N == 2 && (std::same_as<T, std::int64_t> || std::same_as<T, std::uint64_t>) &&
requires { sizeof(simd<T, 2, Arch>); sizeof(simd<std::int32_t, 4, Arch>); })
1654 return detail::x86_memory::gather<Scale>(base, indices,
simd<T, 2, Arch>{},
~std::uint64_t{0});
1657 template<
int Scale, isa<x86> Arch,
class T>
1658 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx2)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int64_t> || std::same_as<T, std::uint64_t>) &&
requires { sizeof(simd<T, 2, Arch>); sizeof(simd<std::int32_t, 4, Arch>); sizeof(simd<std::int64_t, 2, Arch>); })
1661 return detail::x86_memory::gather<Scale>(base, indices, source,
mask);
1665 template<
int Scale, isa<x86> Arch,
class T>
1666 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx2)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int64_t> || std::same_as<T, std::uint64_t>) &&
requires { sizeof(simd<T, 2, Arch>); sizeof(simd<std::int32_t, 4, Arch>); sizeof(simd<std::int64_t, 2, Arch>); })
1669 return detail::x86_memory::gather<Scale>(base, indices, source,
mask);
1672 template<
int Scale, isa<x86> Arch,
class T>
1673 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int64_t> || std::same_as<T, std::uint64_t>) &&
requires { sizeof(simd<T, 2, Arch>); sizeof(simd<std::int32_t, 4, Arch>); })
1676 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1680 template<
int Scale, isa<x86> Arch,
class T>
1681 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int64_t> || std::same_as<T, std::uint64_t>) &&
requires { sizeof(simd<T, 2, Arch>); sizeof(simd<std::int32_t, 4, Arch>); })
1684 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1687 template<
int Scale, isa<x86> Arch,
class T>
1688 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int64_t> || std::same_as<T, std::uint64_t>) &&
requires { sizeof(simd<T, 2, Arch>); sizeof(simd<std::int32_t, 4, Arch>); })
1691 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1695 template<
int Scale, isa<x86> Arch,
class T>
1696 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int64_t> || std::same_as<T, std::uint64_t>) &&
requires { sizeof(simd<T, 2, Arch>); sizeof(simd<std::int32_t, 4, Arch>); })
1699 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1702 template<
int Scale, std::
size_t N, isa<x86> Arch,
class T>
1703 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx2)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && N == 4 && (std::same_as<T, std::int64_t> || std::same_as<T, std::uint64_t>) &&
requires { sizeof(simd<T, 4, Arch>); sizeof(simd<std::int32_t, 4, Arch>); })
1705 return detail::x86_memory::gather<Scale>(base, indices,
simd<T, 4, Arch>{},
~std::uint64_t{0});
1709 template<
int Scale, std::
size_t N, isa<x86> Arch,
class T>
1710 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx2)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && N == 4 && (std::same_as<T, std::int64_t> || std::same_as<T, std::uint64_t>) &&
requires { sizeof(simd<T, 4, Arch>); sizeof(simd<std::int32_t, 4, Arch>); })
1712 return detail::x86_memory::gather<Scale>(base, indices,
simd<T, 4, Arch>{},
~std::uint64_t{0});
1715 template<
int Scale, isa<x86> Arch,
class T>
1716 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx2)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int64_t> || std::same_as<T, std::uint64_t>) &&
requires { sizeof(simd<T, 4, Arch>); sizeof(simd<std::int32_t, 4, Arch>); sizeof(simd<std::int64_t, 4, Arch>); })
1719 return detail::x86_memory::gather<Scale>(base, indices, source,
mask);
1723 template<
int Scale, isa<x86> Arch,
class T>
1724 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx2)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int64_t> || std::same_as<T, std::uint64_t>) &&
requires { sizeof(simd<T, 4, Arch>); sizeof(simd<std::int32_t, 4, Arch>); sizeof(simd<std::int64_t, 4, Arch>); })
1727 return detail::x86_memory::gather<Scale>(base, indices, source,
mask);
1730 template<
int Scale, isa<x86> Arch,
class T>
1731 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int64_t> || std::same_as<T, std::uint64_t>) &&
requires { sizeof(simd<T, 4, Arch>); sizeof(simd<std::int32_t, 4, Arch>); })
1734 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1738 template<
int Scale, isa<x86> Arch,
class T>
1739 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int64_t> || std::same_as<T, std::uint64_t>) &&
requires { sizeof(simd<T, 4, Arch>); sizeof(simd<std::int32_t, 4, Arch>); })
1742 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1745 template<
int Scale, isa<x86> Arch,
class T>
1746 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int64_t> || std::same_as<T, std::uint64_t>) &&
requires { sizeof(simd<T, 4, Arch>); sizeof(simd<std::int32_t, 4, Arch>); })
1749 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1753 template<
int Scale, isa<x86> Arch,
class T>
1754 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int64_t> || std::same_as<T, std::uint64_t>) &&
requires { sizeof(simd<T, 4, Arch>); sizeof(simd<std::int32_t, 4, Arch>); })
1757 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1760 template<
int Scale, isa<x86> Arch,
class T>
1761 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int64_t> || std::same_as<T, std::uint64_t>) &&
requires { sizeof(simd<T, 8, Arch>); sizeof(simd<std::int32_t, 8, Arch>); })
1764 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1768 template<
int Scale, isa<x86> Arch,
class T>
1769 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int64_t> || std::same_as<T, std::uint64_t>) &&
requires { sizeof(simd<T, 8, Arch>); sizeof(simd<std::int32_t, 8, Arch>); })
1772 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1775 template<
int Scale, isa<x86> Arch,
class T>
1776 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int64_t> || std::same_as<T, std::uint64_t>) &&
requires { sizeof(simd<T, 8, Arch>); sizeof(simd<std::int32_t, 8, Arch>); })
1779 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1783 template<
int Scale, isa<x86> Arch,
class T>
1784 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int64_t> || std::same_as<T, std::uint64_t>) &&
requires { sizeof(simd<T, 8, Arch>); sizeof(simd<std::int32_t, 8, Arch>); })
1787 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1790 template<
int Scale, std::
size_t N, isa<x86> Arch>
1791 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx2)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && N == 4 &&
requires { sizeof(simd<float, 4, Arch>); sizeof(simd<std::int64_t, 2, Arch>); })
1797 template<
int Scale, std::
size_t N, isa<x86> Arch>
1798 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx2)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && N == 4 &&
requires { sizeof(simd<float, 4, Arch>); sizeof(simd<std::int64_t, 2, Arch>); })
1803 template<
int Scale, isa<x86> Arch>
1804 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx2)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) &&
requires { sizeof(simd<float, 4, Arch>); sizeof(simd<std::int32_t, 4, Arch>); sizeof(simd<std::int64_t, 2, Arch>); })
1807 return detail::x86_memory::gather<Scale>(base, indices, source,
mask);
1811 template<
int Scale, isa<x86> Arch>
1812 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx2)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) &&
requires { sizeof(simd<float, 4, Arch>); sizeof(simd<std::int32_t, 4, Arch>); sizeof(simd<std::int64_t, 2, Arch>); })
1815 return detail::x86_memory::gather<Scale>(base, indices, source,
mask);
1818 template<
int Scale, isa<x86> Arch>
1819 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) &&
requires { sizeof(simd<float, 4, Arch>); sizeof(simd<std::int64_t, 2, Arch>); })
1822 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1826 template<
int Scale, isa<x86> Arch>
1827 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) &&
requires { sizeof(simd<float, 4, Arch>); sizeof(simd<std::int64_t, 2, Arch>); })
1830 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1833 template<
int Scale, isa<x86> Arch>
1834 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) &&
requires { sizeof(simd<float, 4, Arch>); sizeof(simd<std::int64_t, 2, Arch>); })
1837 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1841 template<
int Scale, isa<x86> Arch>
1842 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) &&
requires { sizeof(simd<float, 4, Arch>); sizeof(simd<std::int64_t, 2, Arch>); })
1845 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1848 template<
int Scale, std::
size_t N, isa<x86> Arch>
1849 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx2)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && N == 4 &&
requires { sizeof(simd<float, 4, Arch>); sizeof(simd<std::int64_t, 4, Arch>); })
1855 template<
int Scale, std::
size_t N, isa<x86> Arch>
1856 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx2)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && N == 4 &&
requires { sizeof(simd<float, 4, Arch>); sizeof(simd<std::int64_t, 4, Arch>); })
1861 template<
int Scale, isa<x86> Arch>
1862 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx2)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) &&
requires { sizeof(simd<float, 4, Arch>); sizeof(simd<std::int32_t, 4, Arch>); sizeof(simd<std::int64_t, 4, Arch>); })
1865 return detail::x86_memory::gather<Scale>(base, indices, source,
mask);
1869 template<
int Scale, isa<x86> Arch>
1870 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx2)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) &&
requires { sizeof(simd<float, 4, Arch>); sizeof(simd<std::int32_t, 4, Arch>); sizeof(simd<std::int64_t, 4, Arch>); })
1873 return detail::x86_memory::gather<Scale>(base, indices, source,
mask);
1876 template<
int Scale, isa<x86> Arch>
1877 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) &&
requires { sizeof(simd<float, 4, Arch>); sizeof(simd<std::int64_t, 4, Arch>); })
1880 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1884 template<
int Scale, isa<x86> Arch>
1885 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) &&
requires { sizeof(simd<float, 4, Arch>); sizeof(simd<std::int64_t, 4, Arch>); })
1888 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1891 template<
int Scale, isa<x86> Arch>
1892 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) &&
requires { sizeof(simd<float, 4, Arch>); sizeof(simd<std::int64_t, 4, Arch>); })
1895 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1899 template<
int Scale, isa<x86> Arch>
1900 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) &&
requires { sizeof(simd<float, 4, Arch>); sizeof(simd<std::int64_t, 4, Arch>); })
1903 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1906 template<
int Scale, isa<x86> Arch>
1907 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) &&
requires { sizeof(simd<float, 8, Arch>); sizeof(simd<std::int64_t, 8, Arch>); })
1910 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1914 template<
int Scale, isa<x86> Arch>
1915 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) &&
requires { sizeof(simd<float, 8, Arch>); sizeof(simd<std::int64_t, 8, Arch>); })
1918 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1921 template<
int Scale, isa<x86> Arch>
1922 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) &&
requires { sizeof(simd<float, 8, Arch>); sizeof(simd<std::int64_t, 8, Arch>); })
1925 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1929 template<
int Scale, isa<x86> Arch>
1930 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) &&
requires { sizeof(simd<float, 8, Arch>); sizeof(simd<std::int64_t, 8, Arch>); })
1933 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1936 template<
int Scale, std::
size_t N, isa<x86> Arch,
class T>
1937 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx2)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && N == 4 && (std::same_as<T, std::int32_t> || std::same_as<T, std::uint32_t>) &&
requires { sizeof(simd<T, 4, Arch>); sizeof(simd<std::int64_t, 2, Arch>); })
1939 return detail::x86_memory::gather<Scale>(base, indices,
simd<T, 4, Arch>{},
~std::uint64_t{0});
1943 template<
int Scale, std::
size_t N, isa<x86> Arch,
class T>
1944 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx2)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && N == 4 && (std::same_as<T, std::int32_t> || std::same_as<T, std::uint32_t>) &&
requires { sizeof(simd<T, 4, Arch>); sizeof(simd<std::int64_t, 2, Arch>); })
1946 return detail::x86_memory::gather<Scale>(base, indices,
simd<T, 4, Arch>{},
~std::uint64_t{0});
1949 template<
int Scale, isa<x86> Arch,
class T>
1950 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx2)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int32_t> || std::same_as<T, std::uint32_t>) &&
requires { sizeof(simd<T, 4, Arch>); sizeof(simd<std::int32_t, 4, Arch>); sizeof(simd<std::int64_t, 2, Arch>); })
1953 return detail::x86_memory::gather<Scale>(base, indices, source,
mask);
1957 template<
int Scale, isa<x86> Arch,
class T>
1958 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx2)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int32_t> || std::same_as<T, std::uint32_t>) &&
requires { sizeof(simd<T, 4, Arch>); sizeof(simd<std::int32_t, 4, Arch>); sizeof(simd<std::int64_t, 2, Arch>); })
1961 return detail::x86_memory::gather<Scale>(base, indices, source,
mask);
1964 template<
int Scale, isa<x86> Arch,
class T>
1965 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int32_t> || std::same_as<T, std::uint32_t>) &&
requires { sizeof(simd<T, 4, Arch>); sizeof(simd<std::int64_t, 2, Arch>); })
1968 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1972 template<
int Scale, isa<x86> Arch,
class T>
1973 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int32_t> || std::same_as<T, std::uint32_t>) &&
requires { sizeof(simd<T, 4, Arch>); sizeof(simd<std::int64_t, 2, Arch>); })
1976 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1979 template<
int Scale, isa<x86> Arch,
class T>
1980 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int32_t> || std::same_as<T, std::uint32_t>) &&
requires { sizeof(simd<T, 4, Arch>); sizeof(simd<std::int64_t, 2, Arch>); })
1983 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1987 template<
int Scale, isa<x86> Arch,
class T>
1988 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int32_t> || std::same_as<T, std::uint32_t>) &&
requires { sizeof(simd<T, 4, Arch>); sizeof(simd<std::int64_t, 2, Arch>); })
1991 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
1994 template<
int Scale, std::
size_t N, isa<x86> Arch,
class T>
1995 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx2)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && N == 4 && (std::same_as<T, std::int32_t> || std::same_as<T, std::uint32_t>) &&
requires { sizeof(simd<T, 4, Arch>); sizeof(simd<std::int64_t, 4, Arch>); })
1997 return detail::x86_memory::gather<Scale>(base, indices,
simd<T, 4, Arch>{},
~std::uint64_t{0});
2001 template<
int Scale, std::
size_t N, isa<x86> Arch,
class T>
2002 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx2)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && N == 4 && (std::same_as<T, std::int32_t> || std::same_as<T, std::uint32_t>) &&
requires { sizeof(simd<T, 4, Arch>); sizeof(simd<std::int64_t, 4, Arch>); })
2004 return detail::x86_memory::gather<Scale>(base, indices,
simd<T, 4, Arch>{},
~std::uint64_t{0});
2007 template<
int Scale, isa<x86> Arch,
class T>
2008 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx2)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int32_t> || std::same_as<T, std::uint32_t>) &&
requires { sizeof(simd<T, 4, Arch>); sizeof(simd<std::int32_t, 4, Arch>); sizeof(simd<std::int64_t, 4, Arch>); })
2011 return detail::x86_memory::gather<Scale>(base, indices, source,
mask);
2015 template<
int Scale, isa<x86> Arch,
class T>
2016 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx2)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int32_t> || std::same_as<T, std::uint32_t>) &&
requires { sizeof(simd<T, 4, Arch>); sizeof(simd<std::int32_t, 4, Arch>); sizeof(simd<std::int64_t, 4, Arch>); })
2019 return detail::x86_memory::gather<Scale>(base, indices, source,
mask);
2022 template<
int Scale, isa<x86> Arch,
class T>
2023 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int32_t> || std::same_as<T, std::uint32_t>) &&
requires { sizeof(simd<T, 4, Arch>); sizeof(simd<std::int64_t, 4, Arch>); })
2026 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
2030 template<
int Scale, isa<x86> Arch,
class T>
2031 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int32_t> || std::same_as<T, std::uint32_t>) &&
requires { sizeof(simd<T, 4, Arch>); sizeof(simd<std::int64_t, 4, Arch>); })
2034 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
2037 template<
int Scale, isa<x86> Arch,
class T>
2038 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int32_t> || std::same_as<T, std::uint32_t>) &&
requires { sizeof(simd<T, 4, Arch>); sizeof(simd<std::int64_t, 4, Arch>); })
2041 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
2045 template<
int Scale, isa<x86> Arch,
class T>
2046 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int32_t> || std::same_as<T, std::uint32_t>) &&
requires { sizeof(simd<T, 4, Arch>); sizeof(simd<std::int64_t, 4, Arch>); })
2049 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
2052 template<
int Scale, isa<x86> Arch,
class T>
2053 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int32_t> || std::same_as<T, std::uint32_t>) &&
requires { sizeof(simd<T, 8, Arch>); sizeof(simd<std::int64_t, 8, Arch>); })
2056 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
2060 template<
int Scale, isa<x86> Arch,
class T>
2061 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int32_t> || std::same_as<T, std::uint32_t>) &&
requires { sizeof(simd<T, 8, Arch>); sizeof(simd<std::int64_t, 8, Arch>); })
2064 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
2067 template<
int Scale, isa<x86> Arch,
class T>
2068 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int32_t> || std::same_as<T, std::uint32_t>) &&
requires { sizeof(simd<T, 8, Arch>); sizeof(simd<std::int64_t, 8, Arch>); })
2071 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
2075 template<
int Scale, isa<x86> Arch,
class T>
2076 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int32_t> || std::same_as<T, std::uint32_t>) &&
requires { sizeof(simd<T, 8, Arch>); sizeof(simd<std::int64_t, 8, Arch>); })
2079 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
2082 template<
int Scale, std::
size_t N, isa<x86> Arch>
2083 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx2)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && N == 2 &&
requires { sizeof(simd<double, 2, Arch>); sizeof(simd<std::int64_t, 2, Arch>); })
2089 template<
int Scale, std::
size_t N, isa<x86> Arch>
2090 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx2)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && N == 2 &&
requires { sizeof(simd<double, 2, Arch>); sizeof(simd<std::int64_t, 2, Arch>); })
2095 template<
int Scale, isa<x86> Arch>
2096 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx2)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) &&
requires { sizeof(simd<double, 2, Arch>); sizeof(simd<std::int64_t, 2, Arch>); })
2099 return detail::x86_memory::gather<Scale>(base, indices, source,
mask);
2103 template<
int Scale, isa<x86> Arch>
2104 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx2)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) &&
requires { sizeof(simd<double, 2, Arch>); sizeof(simd<std::int64_t, 2, Arch>); })
2107 return detail::x86_memory::gather<Scale>(base, indices, source,
mask);
2110 template<
int Scale, isa<x86> Arch>
2111 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) &&
requires { sizeof(simd<double, 2, Arch>); sizeof(simd<std::int64_t, 2, Arch>); })
2114 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
2118 template<
int Scale, isa<x86> Arch>
2119 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) &&
requires { sizeof(simd<double, 2, Arch>); sizeof(simd<std::int64_t, 2, Arch>); })
2122 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
2125 template<
int Scale, isa<x86> Arch>
2126 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) &&
requires { sizeof(simd<double, 2, Arch>); sizeof(simd<std::int64_t, 2, Arch>); })
2129 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
2133 template<
int Scale, isa<x86> Arch>
2134 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) &&
requires { sizeof(simd<double, 2, Arch>); sizeof(simd<std::int64_t, 2, Arch>); })
2137 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
2140 template<
int Scale, std::
size_t N, isa<x86> Arch>
2141 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx2)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && N == 4 &&
requires { sizeof(simd<double, 4, Arch>); sizeof(simd<std::int64_t, 4, Arch>); })
2147 template<
int Scale, std::
size_t N, isa<x86> Arch>
2148 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx2)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && N == 4 &&
requires { sizeof(simd<double, 4, Arch>); sizeof(simd<std::int64_t, 4, Arch>); })
2153 template<
int Scale, isa<x86> Arch>
2154 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx2)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) &&
requires { sizeof(simd<double, 4, Arch>); sizeof(simd<std::int64_t, 4, Arch>); })
2157 return detail::x86_memory::gather<Scale>(base, indices, source,
mask);
2161 template<
int Scale, isa<x86> Arch>
2162 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx2)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) &&
requires { sizeof(simd<double, 4, Arch>); sizeof(simd<std::int64_t, 4, Arch>); })
2165 return detail::x86_memory::gather<Scale>(base, indices, source,
mask);
2168 template<
int Scale, isa<x86> Arch>
2169 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) &&
requires { sizeof(simd<double, 4, Arch>); sizeof(simd<std::int64_t, 4, Arch>); })
2172 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
2176 template<
int Scale, isa<x86> Arch>
2177 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) &&
requires { sizeof(simd<double, 4, Arch>); sizeof(simd<std::int64_t, 4, Arch>); })
2180 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
2183 template<
int Scale, isa<x86> Arch>
2184 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) &&
requires { sizeof(simd<double, 4, Arch>); sizeof(simd<std::int64_t, 4, Arch>); })
2187 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
2191 template<
int Scale, isa<x86> Arch>
2192 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) &&
requires { sizeof(simd<double, 4, Arch>); sizeof(simd<std::int64_t, 4, Arch>); })
2195 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
2198 template<
int Scale, isa<x86> Arch>
2199 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) &&
requires { sizeof(simd<double, 8, Arch>); sizeof(simd<std::int64_t, 8, Arch>); })
2202 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
2206 template<
int Scale, isa<x86> Arch>
2207 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) &&
requires { sizeof(simd<double, 8, Arch>); sizeof(simd<std::int64_t, 8, Arch>); })
2210 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
2213 template<
int Scale, isa<x86> Arch>
2214 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) &&
requires { sizeof(simd<double, 8, Arch>); sizeof(simd<std::int64_t, 8, Arch>); })
2217 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
2221 template<
int Scale, isa<x86> Arch>
2222 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) &&
requires { sizeof(simd<double, 8, Arch>); sizeof(simd<std::int64_t, 8, Arch>); })
2225 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
2228 template<
int Scale, std::
size_t N, isa<x86> Arch,
class T>
2229 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx2)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && N == 2 && (std::same_as<T, std::int64_t> || std::same_as<T, std::uint64_t>) &&
requires { sizeof(simd<T, 2, Arch>); sizeof(simd<std::int64_t, 2, Arch>); })
2231 return detail::x86_memory::gather<Scale>(base, indices,
simd<T, 2, Arch>{},
~std::uint64_t{0});
2235 template<
int Scale, std::
size_t N, isa<x86> Arch,
class T>
2236 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx2)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && N == 2 && (std::same_as<T, std::int64_t> || std::same_as<T, std::uint64_t>) &&
requires { sizeof(simd<T, 2, Arch>); sizeof(simd<std::int64_t, 2, Arch>); })
2238 return detail::x86_memory::gather<Scale>(base, indices,
simd<T, 2, Arch>{},
~std::uint64_t{0});
2241 template<
int Scale, isa<x86> Arch,
class T>
2242 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx2)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int64_t> || std::same_as<T, std::uint64_t>) &&
requires { sizeof(simd<T, 2, Arch>); sizeof(simd<std::int64_t, 2, Arch>); })
2245 return detail::x86_memory::gather<Scale>(base, indices, source,
mask);
2249 template<
int Scale, isa<x86> Arch,
class T>
2250 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx2)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int64_t> || std::same_as<T, std::uint64_t>) &&
requires { sizeof(simd<T, 2, Arch>); sizeof(simd<std::int64_t, 2, Arch>); })
2253 return detail::x86_memory::gather<Scale>(base, indices, source,
mask);
2256 template<
int Scale, isa<x86> Arch,
class T>
2257 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int64_t> || std::same_as<T, std::uint64_t>) &&
requires { sizeof(simd<T, 2, Arch>); sizeof(simd<std::int64_t, 2, Arch>); })
2260 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
2264 template<
int Scale, isa<x86> Arch,
class T>
2265 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int64_t> || std::same_as<T, std::uint64_t>) &&
requires { sizeof(simd<T, 2, Arch>); sizeof(simd<std::int64_t, 2, Arch>); })
2268 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
2271 template<
int Scale, isa<x86> Arch,
class T>
2272 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int64_t> || std::same_as<T, std::uint64_t>) &&
requires { sizeof(simd<T, 2, Arch>); sizeof(simd<std::int64_t, 2, Arch>); })
2275 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
2279 template<
int Scale, isa<x86> Arch,
class T>
2280 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int64_t> || std::same_as<T, std::uint64_t>) &&
requires { sizeof(simd<T, 2, Arch>); sizeof(simd<std::int64_t, 2, Arch>); })
2283 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
2286 template<
int Scale, std::
size_t N, isa<x86> Arch,
class T>
2287 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx2)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && N == 4 && (std::same_as<T, std::int64_t> || std::same_as<T, std::uint64_t>) &&
requires { sizeof(simd<T, 4, Arch>); sizeof(simd<std::int64_t, 4, Arch>); })
2289 return detail::x86_memory::gather<Scale>(base, indices,
simd<T, 4, Arch>{},
~std::uint64_t{0});
2293 template<
int Scale, std::
size_t N, isa<x86> Arch,
class T>
2294 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx2)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && N == 4 && (std::same_as<T, std::int64_t> || std::same_as<T, std::uint64_t>) &&
requires { sizeof(simd<T, 4, Arch>); sizeof(simd<std::int64_t, 4, Arch>); })
2296 return detail::x86_memory::gather<Scale>(base, indices,
simd<T, 4, Arch>{},
~std::uint64_t{0});
2299 template<
int Scale, isa<x86> Arch,
class T>
2300 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx2)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int64_t> || std::same_as<T, std::uint64_t>) &&
requires { sizeof(simd<T, 4, Arch>); sizeof(simd<std::int64_t, 4, Arch>); })
2303 return detail::x86_memory::gather<Scale>(base, indices, source,
mask);
2307 template<
int Scale, isa<x86> Arch,
class T>
2308 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx2)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int64_t> || std::same_as<T, std::uint64_t>) &&
requires { sizeof(simd<T, 4, Arch>); sizeof(simd<std::int64_t, 4, Arch>); })
2311 return detail::x86_memory::gather<Scale>(base, indices, source,
mask);
2314 template<
int Scale, isa<x86> Arch,
class T>
2315 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int64_t> || std::same_as<T, std::uint64_t>) &&
requires { sizeof(simd<T, 4, Arch>); sizeof(simd<std::int64_t, 4, Arch>); })
2318 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
2322 template<
int Scale, isa<x86> Arch,
class T>
2323 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int64_t> || std::same_as<T, std::uint64_t>) &&
requires { sizeof(simd<T, 4, Arch>); sizeof(simd<std::int64_t, 4, Arch>); })
2326 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
2329 template<
int Scale, isa<x86> Arch,
class T>
2330 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int64_t> || std::same_as<T, std::uint64_t>) &&
requires { sizeof(simd<T, 4, Arch>); sizeof(simd<std::int64_t, 4, Arch>); })
2333 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
2337 template<
int Scale, isa<x86> Arch,
class T>
2338 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f) && Arch.has(x86_feature::avx512vl)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int64_t> || std::same_as<T, std::uint64_t>) &&
requires { sizeof(simd<T, 4, Arch>); sizeof(simd<std::int64_t, 4, Arch>); })
2341 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
2344 template<
int Scale, isa<x86> Arch,
class T>
2345 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int64_t> || std::same_as<T, std::uint64_t>) &&
requires { sizeof(simd<T, 8, Arch>); sizeof(simd<std::int64_t, 8, Arch>); })
2348 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
2352 template<
int Scale, isa<x86> Arch,
class T>
2353 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int64_t> || std::same_as<T, std::uint64_t>) &&
requires { sizeof(simd<T, 8, Arch>); sizeof(simd<std::int64_t, 8, Arch>); })
2356 return detail::x86_memory::gather<Scale>(base, indices, source,
static_cast<std::uint64_t
>(
mask.to_bitset()));
2359 template<
int Scale, isa<x86> Arch,
class T>
2360 requires(!Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int64_t> || std::same_as<T, std::uint64_t>) &&
requires { sizeof(simd<T, 8, Arch>); sizeof(simd<std::int64_t, 8, Arch>); })
2363 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
2367 template<
int Scale, isa<x86> Arch,
class T>
2368 requires(Arch.has(polyfill) && !(Arch.has(x86_feature::avx512f)) && (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8) && (std::same_as<T, std::int64_t> || std::same_as<T, std::uint64_t>) &&
requires { sizeof(simd<T, 8, Arch>); sizeof(simd<std::int64_t, 8, Arch>); })
2371 detail::x86_memory::scatter<Scale>(base, indices, value,
static_cast<std::uint64_t
>(
mask.to_bitset()));
2382#if NATIVE_HOST_X86 || defined(NATIVE_DOXYGEN)
typename mask_traits< std::remove_cvref_t< T > >::type mask
constexpr simd< double, 2, Arch > vgatherqpd(double const *base, simd< std::int64_t, 2, Arch > indices) noexcept
Gather all addressable lanes; N specifies the result lane count.
constexpr simd< float, 4, Arch > mask_vgatherdps(simd< float, 4, Arch > source, simd< std::int32_t, 4, Arch > mask, float const *base, simd< std::int32_t, 4, Arch > indices) noexcept
Gather lanes whose full vector mask has its sign bit set; retain source otherwise.
constexpr simd< T, 2, Arch > vpgatherdq(T const *base, simd< std::int32_t, 4, Arch > indices) noexcept
Gather all addressable lanes; N specifies the result lane count.
constexpr void mask_vpscatterdq(T *base, predicate< 2, Arch > mask, simd< std::int32_t, 4, Arch > indices, simd< T, 2, Arch > value) noexcept
Store predicate-selected lanes; inactive addresses are not accessed.
constexpr simd< float, 4, Arch > vgatherqps(float const *base, simd< std::int64_t, 2, Arch > indices) noexcept
Gather all addressable lanes; N specifies the result lane count.
constexpr simd< float, 4, Arch > mask_vgatherqps(simd< float, 4, Arch > source, simd< std::int32_t, 4, Arch > mask, float const *base, simd< std::int64_t, 2, Arch > indices) noexcept
Gather lanes whose full vector mask has its sign bit set; retain source otherwise.
constexpr simd< T, 4, Arch > mask_vpgatherqd(simd< T, 4, Arch > source, simd< std::int32_t, 4, Arch > mask, T const *base, simd< std::int64_t, 2, Arch > indices) noexcept
Gather lanes whose full vector mask has its sign bit set; retain source otherwise.
constexpr void mask_vpscatterqq(T *base, predicate< 2, Arch > mask, simd< std::int64_t, 2, Arch > indices, simd< T, 2, Arch > value) noexcept
Store predicate-selected lanes; inactive addresses are not accessed.
constexpr simd< double, 2, Arch > vgatherdpd(double const *base, simd< std::int32_t, 4, Arch > indices) noexcept
Gather all addressable lanes; N specifies the result lane count.
constexpr void mask_vscatterdps(float *base, predicate< 4, Arch > mask, simd< std::int32_t, 4, Arch > indices, simd< float, 4, Arch > value) noexcept
Store predicate-selected lanes; inactive addresses are not accessed.
constexpr simd< float, 4, Arch > vgatherdps(float const *base, simd< std::int32_t, 4, Arch > indices) noexcept
Gather all addressable lanes; N specifies the result lane count.
constexpr simd< T, 4, Arch > vpgatherdd(T const *base, simd< std::int32_t, 4, Arch > indices) noexcept
Gather all addressable lanes; N specifies the result lane count.
constexpr simd< T, 2, Arch > mask_vpgatherqq(simd< T, 2, Arch > source, simd< std::int64_t, 2, Arch > mask, T const *base, simd< std::int64_t, 2, Arch > indices) noexcept
Gather lanes whose full vector mask has its sign bit set; retain source otherwise.
constexpr simd< double, 2, Arch > mask_vgatherdpd(simd< double, 2, Arch > source, simd< std::int64_t, 2, Arch > mask, double const *base, simd< std::int32_t, 4, Arch > indices) noexcept
Gather lanes whose full vector mask has its sign bit set; retain source otherwise.
constexpr simd< T, 4, Arch > mask_vpgatherdd(simd< T, 4, Arch > source, simd< std::int32_t, 4, Arch > mask, T const *base, simd< std::int32_t, 4, Arch > indices) noexcept
Gather lanes whose full vector mask has its sign bit set; retain source otherwise.
constexpr simd< T, 2, Arch > mask_vpgatherdq(simd< T, 2, Arch > source, simd< std::int64_t, 2, Arch > mask, T const *base, simd< std::int32_t, 4, Arch > indices) noexcept
Gather lanes whose full vector mask has its sign bit set; retain source otherwise.
constexpr simd< T, 2, Arch > vpgatherqq(T const *base, simd< std::int64_t, 2, Arch > indices) noexcept
Gather all addressable lanes; N specifies the result lane count.
constexpr simd< T, 4, Arch > vpgatherqd(T const *base, simd< std::int64_t, 2, Arch > indices) noexcept
Gather all addressable lanes; N specifies the result lane count.
constexpr void mask_vpscatterqd(T *base, predicate< 4, Arch > mask, simd< std::int64_t, 2, Arch > indices, simd< T, 4, Arch > value) noexcept
Store predicate-selected lanes; inactive addresses are not accessed.
constexpr void mask_vscatterdpd(double *base, predicate< 2, Arch > mask, simd< std::int32_t, 4, Arch > indices, simd< double, 2, Arch > value) noexcept
Store predicate-selected lanes; inactive addresses are not accessed.
constexpr void mask_vpscatterdd(T *base, predicate< 4, Arch > mask, simd< std::int32_t, 4, Arch > indices, simd< T, 4, Arch > value) noexcept
Store predicate-selected lanes; inactive addresses are not accessed.
constexpr simd< double, 2, Arch > mask_vgatherqpd(simd< double, 2, Arch > source, simd< std::int64_t, 2, Arch > mask, double const *base, simd< std::int64_t, 2, Arch > indices) noexcept
Gather lanes whose full vector mask has its sign bit set; retain source otherwise.
constexpr void mask_vscatterqpd(double *base, predicate< 2, Arch > mask, simd< std::int64_t, 2, Arch > indices, simd< double, 2, Arch > value) noexcept
Store predicate-selected lanes; inactive addresses are not accessed.
constexpr void mask_vscatterqps(float *base, predicate< 4, Arch > mask, simd< std::int64_t, 2, Arch > indices, simd< float, 4, Arch > value) noexcept
Store predicate-selected lanes; inactive addresses are not accessed.
Architecture-tagged vectors, register packs and supporting value types. Native arithmetic follows its...
Standard-library adaptations documented here for SIMD value types.
Omitted architecture arguments use the native.simd provider's baseline.