31#ifndef SIMD_VEC_MASK_H_
32#define SIMD_VEC_MASK_H_
35#include "intel/mask_impl_intel32.H"
36#include "intel/mask_impl_intel64.H"
37#include "mask_impl_emu.H"
38#include "sandbox/mask_impl_sandbox.H"
60template <
typename T,
size_t SIMD_WIDTH>
65 return internal::mask::mask_set1(src, k, a);
71template <
typename T,
size_t SIMD_WIDTH>
75 return internal::mask::maskz_set1(k, a);
81template <
typename Tout,
typename Tin,
size_t SIMD_WIDTH>
86 return internal::mask::mask_cvts(src, k, a);
92template <
typename Tout,
typename Tin,
size_t SIMD_WIDTH>
96 return internal::mask::maskz_cvts(k, a);
120template <
typename Tout,
typename Tin,
size_t SIMD_WIDTH>
124 return internal::mask::reinterpret_mask<Tout, Tin, SIMD_WIDTH>(a);
134template <
typename T,
size_t SIMD_WIDTH>
138 return internal::mask::kadd(a, b);
148template <
typename T,
size_t SIMD_WIDTH>
152 return internal::mask::kand(a, b);
164template <
typename T,
size_t SIMD_WIDTH>
168 return internal::mask::kandn(a, b);
178template <
typename T,
size_t SIMD_WIDTH>
182 return internal::mask::kor(a, b);
192template <
typename T,
size_t SIMD_WIDTH>
196 return internal::mask::kxor(a, b);
206template <
typename T,
size_t SIMD_WIDTH>
210 return internal::mask::kxnor(a, b);
219template <
typename T,
size_t SIMD_WIDTH>
222 return internal::mask::knot(a);
233template <
size_t COUNT,
typename T,
size_t SIMD_WIDTH>
236 return internal::mask::kshiftri<COUNT>(a);
247template <
size_t COUNT,
typename T,
size_t SIMD_WIDTH>
250 return internal::mask::kshiftli<COUNT>(a);
261template <
typename T,
size_t SIMD_WIDTH>
263 const uint64_t count)
265 return internal::mask::kshiftri(a, count);
276template <
typename T,
size_t SIMD_WIDTH>
278 const uint64_t count)
280 return internal::mask::kshiftli(a, count);
288template <
typename T,
size_t SIMD_WIDTH_DEFAULT_NATIVE>
291 return internal::mask::mask_all_ones(internal::OutputType<T>(),
292 internal::Integer<SIMD_WIDTH>());
306template <
typename T,
size_t SIMD_WIDTH_DEFAULT_NATIVE>
309 return internal::mask::mask_set_true_low(x, internal::OutputType<T>(),
310 internal::Integer<SIMD_WIDTH>());
321template <
typename T,
size_t SIMD_WIDTH_DEFAULT_NATIVE>
324 return internal::mask::mask_set_true_high(x, internal::OutputType<T>(),
325 internal::Integer<SIMD_WIDTH>());
336template <
typename T,
size_t SIMD_WIDTH_DEFAULT_NATIVE>
339 return internal::mask::mask_set_false_low(x, internal::OutputType<T>(),
340 internal::Integer<SIMD_WIDTH>());
351template <
typename T,
size_t SIMD_WIDTH_DEFAULT_NATIVE>
354 return internal::mask::mask_set_false_high(x, internal::OutputType<T>(),
355 internal::Integer<SIMD_WIDTH>());
366template <
typename T,
size_t SIMD_WIDTH>
369 return internal::mask::ktest_all_zeros(a);
378template <
typename T,
size_t SIMD_WIDTH>
381 return internal::mask::ktest_all_ones(a);
398template <
typename T,
size_t SIMD_WIDTH>
403 return internal::mask::mask_load(src, k, p);
413template <
typename T,
size_t SIMD_WIDTH>
417 return internal::mask::maskz_load(k, p);
427template <
typename T,
size_t SIMD_WIDTH>
432 return internal::mask::mask_loadu(src, k, p);
442template <
typename T,
size_t SIMD_WIDTH>
446 return internal::mask::maskz_loadu(k, p);
454template <
typename T,
size_t SIMD_WIDTH>
458 internal::mask::mask_store(p, k, a);
466template <
typename T,
size_t SIMD_WIDTH>
470 internal::mask::mask_storeu(p, k, a);
484template <
typename T,
size_t SIMD_WIDTH>
490 return internal::mask::mask_add(src, k, a, b);
497template <
typename T,
size_t SIMD_WIDTH>
502 return internal::mask::maskz_add(k, a, b);
509template <
typename T,
size_t SIMD_WIDTH>
515 return internal::mask::mask_adds(src, k, a, b);
522template <
typename T,
size_t SIMD_WIDTH>
527 return internal::mask::maskz_adds(k, a, b);
534template <
typename T,
size_t SIMD_WIDTH>
540 return internal::mask::mask_sub(src, k, a, b);
547template <
typename T,
size_t SIMD_WIDTH>
552 return internal::mask::maskz_sub(k, a, b);
559template <
typename T,
size_t SIMD_WIDTH>
565 return internal::mask::mask_subs(src, k, a, b);
572template <
typename T,
size_t SIMD_WIDTH>
577 return internal::mask::maskz_subs(k, a, b);
584template <
typename T,
size_t SIMD_WIDTH>
590 return internal::mask::mask_mul(src, k, a, b);
597template <
typename T,
size_t SIMD_WIDTH>
602 return internal::mask::maskz_mul(k, a, b);
609template <
typename T,
size_t SIMD_WIDTH>
615 return internal::mask::mask_div(src, k, a, b);
622template <
typename T,
size_t SIMD_WIDTH>
627 return internal::mask::maskz_div(k, a, b);
634template <
typename T,
size_t SIMD_WIDTH>
640 return internal::mask::mask_avg(src, k, a, b);
647template <
typename T,
size_t SIMD_WIDTH>
652 return internal::mask::maskz_avg(k, a, b);
659template <
typename T,
size_t SIMD_WIDTH>
664 return internal::mask::mask_div2r0(src, k, a);
671template <
typename T,
size_t SIMD_WIDTH>
675 return internal::mask::maskz_div2r0(k, a);
682template <
typename T,
size_t SIMD_WIDTH>
687 return internal::mask::mask_div2rd(src, k, a);
694template <
typename T,
size_t SIMD_WIDTH>
698 return internal::mask::maskz_div2rd(k, a);
712template <
typename T,
size_t SIMD_WIDTH>
718 return internal::mask::mask_hadd(src, k, a, b);
725template <
typename T,
size_t SIMD_WIDTH>
730 return internal::mask::maskz_hadd(k, a, b);
737template <
typename T,
size_t SIMD_WIDTH>
743 return internal::mask::mask_hadds(src, k, a, b);
750template <
typename T,
size_t SIMD_WIDTH>
755 return internal::mask::maskz_hadds(k, a, b);
762template <
typename T,
size_t SIMD_WIDTH>
768 return internal::mask::mask_hsub(src, k, a, b);
775template <
typename T,
size_t SIMD_WIDTH>
780 return internal::mask::maskz_hsub(k, a, b);
787template <
typename T,
size_t SIMD_WIDTH>
793 return internal::mask::mask_hsubs(src, k, a, b);
800template <
typename T,
size_t SIMD_WIDTH>
805 return internal::mask::maskz_hsubs(k, a, b);
819template <
typename T,
size_t SIMD_WIDTH>
824 return internal::mask::mask_rcp(src, k, a);
831template <
typename T,
size_t SIMD_WIDTH>
835 return internal::mask::maskz_rcp(k, a);
842template <
typename T,
size_t SIMD_WIDTH>
847 return internal::mask::mask_rsqrt(src, k, a);
854template <
typename T,
size_t SIMD_WIDTH>
858 return internal::mask::maskz_rsqrt(k, a);
865template <
typename T,
size_t SIMD_WIDTH>
870 return internal::mask::mask_sqrt(src, k, a);
877template <
typename T,
size_t SIMD_WIDTH>
881 return internal::mask::maskz_sqrt(k, a);
895template <
typename T,
size_t SIMD_WIDTH>
901 return internal::mask::mask_min(src, k, a, b);
908template <
typename T,
size_t SIMD_WIDTH>
913 return internal::mask::maskz_min(k, a, b);
920template <
typename T,
size_t SIMD_WIDTH>
926 return internal::mask::mask_max(src, k, a, b);
933template <
typename T,
size_t SIMD_WIDTH>
938 return internal::mask::maskz_max(k, a, b);
945template <
typename T,
size_t SIMD_WIDTH>
950 return internal::mask::mask_neg(src, k, a);
957template <
typename T,
size_t SIMD_WIDTH>
961 return internal::mask::maskz_neg(k, a);
968template <
typename T,
size_t SIMD_WIDTH>
973 return internal::mask::mask_abs(src, k, a);
980template <
typename T,
size_t SIMD_WIDTH>
984 return internal::mask::maskz_abs(k, a);
991template <
typename T,
size_t SIMD_WIDTH>
996 return internal::mask::mask_ceil(src, k, a);
1003template <
typename T,
size_t SIMD_WIDTH>
1007 return internal::mask::maskz_ceil(k, a);
1014template <
typename T,
size_t SIMD_WIDTH>
1019 return internal::mask::mask_floor(src, k, a);
1026template <
typename T,
size_t SIMD_WIDTH>
1030 return internal::mask::maskz_floor(k, a);
1037template <
typename T,
size_t SIMD_WIDTH>
1042 return internal::mask::mask_round(src, k, a);
1049template <
typename T,
size_t SIMD_WIDTH>
1053 return internal::mask::maskz_round(k, a);
1060template <
typename T,
size_t SIMD_WIDTH>
1065 return internal::mask::mask_truncate(src, k, a);
1072template <
typename T,
size_t SIMD_WIDTH>
1076 return internal::mask::maskz_truncate(k, a);
1090template <
typename T,
size_t SIMD_WIDTH>
1096 return internal::mask::mask_and(src, k, a, b);
1103template <
typename T,
size_t SIMD_WIDTH>
1108 return internal::mask::maskz_and(k, a, b);
1115template <
typename T,
size_t SIMD_WIDTH>
1121 return internal::mask::mask_or(src, k, a, b);
1128template <
typename T,
size_t SIMD_WIDTH>
1133 return internal::mask::maskz_or(k, a, b);
1140template <
typename T,
size_t SIMD_WIDTH>
1146 return internal::mask::mask_andnot(src, k, a, b);
1153template <
typename T,
size_t SIMD_WIDTH>
1158 return internal::mask::maskz_andnot(k, a, b);
1165template <
typename T,
size_t SIMD_WIDTH>
1171 return internal::mask::mask_xor(src, k, a, b);
1178template <
typename T,
size_t SIMD_WIDTH>
1183 return internal::mask::maskz_xor(k, a, b);
1190template <
typename T,
size_t SIMD_WIDTH>
1195 return internal::mask::mask_not(src, k, a);
1202template <
typename T,
size_t SIMD_WIDTH>
1206 return internal::mask::maskz_not(k, a);
1220template <
size_t COUNT,
typename T,
size_t SIMD_WIDTH>
1225 return internal::mask::mask_srai<COUNT>(src, k, a);
1232template <
size_t COUNT,
typename T,
size_t SIMD_WIDTH>
1236 return internal::mask::maskz_srai<COUNT>(k, a);
1243template <
size_t COUNT,
typename T,
size_t SIMD_WIDTH>
1248 return internal::mask::mask_srli<COUNT>(src, k, a);
1255template <
size_t COUNT,
typename T,
size_t SIMD_WIDTH>
1259 return internal::mask::maskz_srli<COUNT>(k, a);
1266template <
size_t COUNT,
typename T,
size_t SIMD_WIDTH>
1271 return internal::mask::mask_slli<COUNT>(src, k, a);
1278template <
size_t COUNT,
typename T,
size_t SIMD_WIDTH>
1282 return internal::mask::maskz_slli<COUNT>(k, a);
1309template <
typename T,
size_t SIMD_WIDTH>
1314 return internal::mask::mask_cmplt(k, a, b);
1332template <
typename T,
size_t SIMD_WIDTH>
1337 return internal::mask::mask_cmple(k, a, b);
1353template <
typename T,
size_t SIMD_WIDTH>
1358 return internal::mask::mask_cmpeq(k, a, b);
1376template <
typename T,
size_t SIMD_WIDTH>
1381 return internal::mask::mask_cmpgt(k, a, b);
1399template <
typename T,
size_t SIMD_WIDTH>
1404 return internal::mask::mask_cmpge(k, a, b);
1422template <
typename T,
size_t SIMD_WIDTH>
1427 return internal::mask::mask_cmpneq(k, a, b);
1441template <
typename T,
size_t SIMD_WIDTH>
1445 return internal::mask::mask_cmplt(a, b);
1459template <
typename T,
size_t SIMD_WIDTH>
1463 return internal::mask::mask_cmple(a, b);
1477template <
typename T,
size_t SIMD_WIDTH>
1481 return internal::mask::mask_cmpeq(a, b);
1495template <
typename T,
size_t SIMD_WIDTH>
1499 return internal::mask::mask_cmpgt(a, b);
1513template <
typename T,
size_t SIMD_WIDTH>
1517 return internal::mask::mask_cmpge(a, b);
1531template <
typename T,
size_t SIMD_WIDTH>
1535 return internal::mask::mask_cmpneq(a, b);
1548template <
typename T,
size_t SIMD_WIDTH>
1552 return internal::mask::mask_test_all_zeros(k, a);
1565template <
typename T,
size_t SIMD_WIDTH>
1569 return internal::mask::mask_test_all_ones(k, a);
1581template <
typename Tcond,
typename T,
size_t SIMD_WIDTH>
1586 static_assert(
sizeof(Tcond) ==
sizeof(T),
1587 "condition and value types must have the same size");
1600template <
typename Tcond,
typename T,
size_t SIMD_WIDTH>
1604 static_assert(
sizeof(Tcond) ==
sizeof(T),
1605 "condition and value types must have the same size");
1618template <
typename T,
size_t SIMD_WIDTH>
1622 return internal::mask::kcmpeq(a, b);
SIMD mask class consisting of as many bits as the corresponding Vec has elements.
Definition vec.H:119
SIMD vector class, holds multiple elements of the same type.
Definition vec.H:75
static Vec< T, SIMD_WIDTH > mask_div2rd(const Vec< T, SIMD_WIDTH > &src, const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a)
Masked version of div2rd(const Vec<T, SIMD_WIDTH> &).
Definition mask.H:683
static Vec< T, SIMD_WIDTH > maskz_add(const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a, const Vec< T, SIMD_WIDTH > &b)
Zero-masked version of add(const Vec<T, SIMD_WIDTH> &, const Vec<T, SIMD_WIDTH> &).
Definition mask.H:498
static Vec< T, SIMD_WIDTH > maskz_adds(const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a, const Vec< T, SIMD_WIDTH > &b)
Zero-masked version of adds(const Vec<T, SIMD_WIDTH> &, const Vec<T, SIMD_WIDTH> &).
Definition mask.H:523
static Vec< T, SIMD_WIDTH > mask_avg(const Vec< T, SIMD_WIDTH > &src, const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a, const Vec< T, SIMD_WIDTH > &b)
Masked version of avg(const Vec<T, SIMD_WIDTH> &a, const Vec<T, SIMD_WIDTH> &b).
Definition mask.H:635
static Vec< T, SIMD_WIDTH > mask_add(const Vec< T, SIMD_WIDTH > &src, const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a, const Vec< T, SIMD_WIDTH > &b)
Masked version of add(const Vec<T, SIMD_WIDTH> &, const Vec<T, SIMD_WIDTH> &).
Definition mask.H:485
static Vec< T, SIMD_WIDTH > maskz_avg(const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a, const Vec< T, SIMD_WIDTH > &b)
Zero-masked version of avg(const Vec<T, SIMD_WIDTH> &a, const Vec<T, SIMD_WIDTH> &b).
Definition mask.H:648
static Vec< T, SIMD_WIDTH > maskz_sub(const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a, const Vec< T, SIMD_WIDTH > &b)
Zero-masked version of sub(const Vec<T, SIMD_WIDTH> &, const Vec<T, SIMD_WIDTH> &).
Definition mask.H:548
static Vec< T, SIMD_WIDTH > mask_sub(const Vec< T, SIMD_WIDTH > &src, const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a, const Vec< T, SIMD_WIDTH > &b)
Masked version of sub(const Vec<T, SIMD_WIDTH> &, const Vec<T, SIMD_WIDTH> &).
Definition mask.H:535
static Vec< T, SIMD_WIDTH > maskz_mul(const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a, const Vec< T, SIMD_WIDTH > &b)
Zero-masked version of mul(const Vec<T, SIMD_WIDTH> &, const Vec<T, SIMD_WIDTH> &).
Definition mask.H:598
static Vec< T, SIMD_WIDTH > mask_adds(const Vec< T, SIMD_WIDTH > &src, const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a, const Vec< T, SIMD_WIDTH > &b)
Masked version of adds(const Vec<T, SIMD_WIDTH> &, const Vec<T, SIMD_WIDTH> &).
Definition mask.H:510
static Vec< T, SIMD_WIDTH > mask_div(const Vec< T, SIMD_WIDTH > &src, const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a, const Vec< T, SIMD_WIDTH > &b)
Masked version of div(const Vec<T, SIMD_WIDTH> &, const Vec<T, SIMD_WIDTH> &).
Definition mask.H:610
static Vec< T, SIMD_WIDTH > mask_subs(const Vec< T, SIMD_WIDTH > &src, const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a, const Vec< T, SIMD_WIDTH > &b)
Masked version of subs(const Vec<T, SIMD_WIDTH> &, const Vec<T, SIMD_WIDTH> &).
Definition mask.H:560
static Vec< T, SIMD_WIDTH > mask_div2r0(const Vec< T, SIMD_WIDTH > &src, const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a)
Masked version of div2r0(const Vec<T, SIMD_WIDTH> &).
Definition mask.H:660
static Vec< T, SIMD_WIDTH > maskz_div2rd(const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a)
Zero-masked version of div2rd(const Vec<T, SIMD_WIDTH> &).
Definition mask.H:695
static Vec< T, SIMD_WIDTH > maskz_div(const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a, const Vec< T, SIMD_WIDTH > &b)
Zero-masked version of div(const Vec<T, SIMD_WIDTH> &, const Vec<T, SIMD_WIDTH> &).
Definition mask.H:623
static Vec< T, SIMD_WIDTH > maskz_subs(const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a, const Vec< T, SIMD_WIDTH > &b)
Zero-masked version of subs(const Vec<T, SIMD_WIDTH> &, const Vec<T, SIMD_WIDTH> &).
Definition mask.H:573
static Vec< T, SIMD_WIDTH > mask_mul(const Vec< T, SIMD_WIDTH > &src, const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a, const Vec< T, SIMD_WIDTH > &b)
Masked version of mul(const Vec<T, SIMD_WIDTH> &, const Vec<T, SIMD_WIDTH> &).
Definition mask.H:585
static Vec< T, SIMD_WIDTH > maskz_div2r0(const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a)
Zero-masked version of div2r0(const Vec<T, SIMD_WIDTH> &).
Definition mask.H:672
static Mask< T, SIMD_WIDTH > mask_cmplt(const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a, const Vec< T, SIMD_WIDTH > &b)
Masked comparison between corresponding elements of two Vec's for less-than ( < ).
Definition mask.H:1310
static Mask< T, SIMD_WIDTH > mask_cmpge(const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a, const Vec< T, SIMD_WIDTH > &b)
Masked comparison between corresponding elements of two Vec's for greater-than-or-equal ( >= ).
Definition mask.H:1400
static Mask< T, SIMD_WIDTH > mask_cmpneq(const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a, const Vec< T, SIMD_WIDTH > &b)
Masked comparison between corresponding elements of two Vec's for inequality ( != ).
Definition mask.H:1423
static Vec< T, SIMD_WIDTH > mask_ifelsezero(const Mask< Tcond, SIMD_WIDTH > &cond, const Vec< T, SIMD_WIDTH > &trueVal)
Selects elements from a Vec and zero based on a condition Mask.
Definition mask.H:1601
static Mask< T, SIMD_WIDTH > mask_cmpeq(const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a, const Vec< T, SIMD_WIDTH > &b)
Masked comparison between corresponding elements of two Vec's for equality ( == ).
Definition mask.H:1354
static Mask< T, SIMD_WIDTH > mask_cmpgt(const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a, const Vec< T, SIMD_WIDTH > &b)
Masked comparison between corresponding elements of two Vec's for greater-than ( > ).
Definition mask.H:1377
static Mask< T, SIMD_WIDTH > mask_cmple(const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a, const Vec< T, SIMD_WIDTH > &b)
Masked comparison between corresponding elements of two Vec's for less-than-or-equal ( <= ).
Definition mask.H:1333
static bool mask_test_all_zeros(const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a)
Tests if all elements of an Vec are zero, while ignoring elements where the corresponding bit in an M...
Definition mask.H:1549
static bool kcmpeq(const Mask< T, SIMD_WIDTH > &a, const Mask< T, SIMD_WIDTH > &b)
Tests if all bits of two Mask's are equal.
Definition mask.H:1619
static Vec< T, SIMD_WIDTH > mask_ifelse(const Mask< Tcond, SIMD_WIDTH > &cond, const Vec< T, SIMD_WIDTH > &trueVal, const Vec< T, SIMD_WIDTH > &falseVal)
Selects elements from two Vec's based on a condition Mask.
Definition mask.H:1582
static bool mask_test_all_ones(const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a)
Tests if all bits of all elements of an Vec are one, while ignoring elements where the corresponding ...
Definition mask.H:1566
static Mask< T, SIMD_WIDTH > kand(const Mask< T, SIMD_WIDTH > &a, const Mask< T, SIMD_WIDTH > &b)
Computes the bitwise AND of two Mask's.
Definition mask.H:149
static Mask< T, SIMD_WIDTH > mask_set_false_low(const size_t x)
Sets the lower x bits of a Mask to false.
Definition mask.H:337
static Mask< T, SIMD_WIDTH > kshiftli(const Mask< T, SIMD_WIDTH > &a)
Shifts the bits of a Mask to the left by a constant number of bits.
Definition mask.H:248
static Mask< T, SIMD_WIDTH > kor(const Mask< T, SIMD_WIDTH > &a, const Mask< T, SIMD_WIDTH > &b)
Computes the bitwise OR of two Mask's.
Definition mask.H:179
static Mask< T, SIMD_WIDTH > mask_set_false_high(const size_t x)
Sets the upper x bits of a Mask to false.
Definition mask.H:352
static Mask< T, SIMD_WIDTH > mask_set_true_high(const size_t x)
Sets the upper x bits of a Mask to true.
Definition mask.H:322
static Mask< T, SIMD_WIDTH > kadd(const Mask< T, SIMD_WIDTH > &a, const Mask< T, SIMD_WIDTH > &b)
Adds two Mask's together as if they were integers.
Definition mask.H:135
static Mask< T, SIMD_WIDTH > kxor(const Mask< T, SIMD_WIDTH > &a, const Mask< T, SIMD_WIDTH > &b)
Computes the bitwise XOR of two Mask's.
Definition mask.H:193
static Mask< T, SIMD_WIDTH > knot(const Mask< T, SIMD_WIDTH > &a)
Computes the bitwise NOT of a Mask.
Definition mask.H:220
static Mask< T, SIMD_WIDTH > mask_all_ones()
Creates a Mask with all elements set to true.
Definition mask.H:289
static Mask< T, SIMD_WIDTH > kxnor(const Mask< T, SIMD_WIDTH > &a, const Mask< T, SIMD_WIDTH > &b)
Computes the bitwise XNOR of two Mask's.
Definition mask.H:207
static Mask< T, SIMD_WIDTH > mask_set_true_low(const size_t x)
Sets the lower x bits of a Mask to true.
Definition mask.H:307
static Mask< T, SIMD_WIDTH > kandn(const Mask< T, SIMD_WIDTH > &a, const Mask< T, SIMD_WIDTH > &b)
Computes bitwise ANDNOT of two Mask's.
Definition mask.H:165
static Mask< Tout, SIMD_WIDTH > reinterpret_mask(const Mask< Tin, SIMD_WIDTH > &a)
Reinterprets a Mask of one type as a Mask of another type.
Definition mask.H:121
static Mask< T, SIMD_WIDTH > kshiftri(const Mask< T, SIMD_WIDTH > &a)
Shifts the bits of a Mask to the right by a constant number of bits.
Definition mask.H:234
static bool ktest_all_ones(const Mask< T, SIMD_WIDTH > &a)
Tests if all bits of a Mask are set to true.
Definition mask.H:379
static bool ktest_all_zeros(const Mask< T, SIMD_WIDTH > &a)
Tests if all bits of a Mask are set to false.
Definition mask.H:367
static Vec< T, SIMD_WIDTH > maskz_hadd(const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a, const Vec< T, SIMD_WIDTH > &b)
Zero-masked version of hadd(const Vec<T, SIMD_WIDTH> &, const Vec<T, SIMD_WIDTH> &).
Definition mask.H:726
static Vec< T, SIMD_WIDTH > maskz_hadds(const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a, const Vec< T, SIMD_WIDTH > &b)
Zero-masked version of hadds(const Vec<T, SIMD_WIDTH> &, const Vec<T, SIMD_WIDTH> &).
Definition mask.H:751
static Vec< T, SIMD_WIDTH > maskz_hsub(const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a, const Vec< T, SIMD_WIDTH > &b)
Zero-masked version of hsub(const Vec<T, SIMD_WIDTH> &, const Vec<T, SIMD_WIDTH> &).
Definition mask.H:776
static Vec< T, SIMD_WIDTH > mask_hsub(const Vec< T, SIMD_WIDTH > &src, const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a, const Vec< T, SIMD_WIDTH > &b)
Masked version of hsub(const Vec<T, SIMD_WIDTH> &, const Vec<T, SIMD_WIDTH> &).
Definition mask.H:763
static Vec< T, SIMD_WIDTH > mask_hsubs(const Vec< T, SIMD_WIDTH > &src, const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a, const Vec< T, SIMD_WIDTH > &b)
Masked version of hsubs(const Vec<T, SIMD_WIDTH> &, const Vec<T, SIMD_WIDTH> &).
Definition mask.H:788
static Vec< T, SIMD_WIDTH > mask_hadds(const Vec< T, SIMD_WIDTH > &src, const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a, const Vec< T, SIMD_WIDTH > &b)
Masked version of hadds(const Vec<T, SIMD_WIDTH> &, const Vec<T, SIMD_WIDTH> &).
Definition mask.H:738
static Vec< T, SIMD_WIDTH > maskz_hsubs(const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a, const Vec< T, SIMD_WIDTH > &b)
Zero-masked version of hsubs(const Vec<T, SIMD_WIDTH> &, const Vec<T, SIMD_WIDTH> &).
Definition mask.H:801
static Vec< T, SIMD_WIDTH > mask_hadd(const Vec< T, SIMD_WIDTH > &src, const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a, const Vec< T, SIMD_WIDTH > &b)
Masked version of hadd(const Vec<T, SIMD_WIDTH> &, const Vec<T, SIMD_WIDTH> &).
Definition mask.H:713
static Vec< T, SIMD_WIDTH > maskz_not(const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a)
Zero-masked version of bit_not(const Vec<T, SIMD_WIDTH> &).
Definition mask.H:1203
static Vec< T, SIMD_WIDTH > mask_not(const Vec< T, SIMD_WIDTH > &src, const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a)
Masked version of bit_not(const Vec<T, SIMD_WIDTH> &).
Definition mask.H:1191
static Vec< T, SIMD_WIDTH > mask_and(const Vec< T, SIMD_WIDTH > &src, const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a, const Vec< T, SIMD_WIDTH > &b)
Masked version of bit_and(const Vec<T, SIMD_WIDTH> &, const Vec<T, SIMD_WIDTH> &).
Definition mask.H:1091
static Vec< T, SIMD_WIDTH > maskz_andnot(const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a, const Vec< T, SIMD_WIDTH > &b)
Zero-masked version of bit_andnot(const Vec<T, SIMD_WIDTH> &, const Vec<T, SIMD_WIDTH> &).
Definition mask.H:1154
static Vec< T, SIMD_WIDTH > maskz_or(const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a, const Vec< T, SIMD_WIDTH > &b)
Zero-masked version of bit_or(const Vec<T, SIMD_WIDTH> &, const Vec<T, SIMD_WIDTH> &).
Definition mask.H:1129
static Vec< T, SIMD_WIDTH > mask_xor(const Vec< T, SIMD_WIDTH > &src, const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a, const Vec< T, SIMD_WIDTH > &b)
Masked version of bit_xor(const Vec<T, SIMD_WIDTH> &, const Vec<T, SIMD_WIDTH> &).
Definition mask.H:1166
static Vec< T, SIMD_WIDTH > mask_andnot(const Vec< T, SIMD_WIDTH > &src, const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a, const Vec< T, SIMD_WIDTH > &b)
Masked version of bit_andnot(const Vec<T, SIMD_WIDTH> &, const Vec<T, SIMD_WIDTH> &).
Definition mask.H:1141
static Vec< T, SIMD_WIDTH > maskz_and(const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a, const Vec< T, SIMD_WIDTH > &b)
Zero-masked version of bit_and(const Vec<T, SIMD_WIDTH> &, const Vec<T, SIMD_WIDTH> &).
Definition mask.H:1104
static Vec< T, SIMD_WIDTH > mask_or(const Vec< T, SIMD_WIDTH > &src, const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a, const Vec< T, SIMD_WIDTH > &b)
Masked version of bit_or(const Vec<T, SIMD_WIDTH> &, const Vec<T, SIMD_WIDTH> &).
Definition mask.H:1116
static Vec< T, SIMD_WIDTH > maskz_xor(const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a, const Vec< T, SIMD_WIDTH > &b)
Zero-masked version of bit_xor(const Vec<T, SIMD_WIDTH> &, const Vec<T, SIMD_WIDTH> &).
Definition mask.H:1179
static Vec< T, SIMD_WIDTH > mask_sqrt(const Vec< T, SIMD_WIDTH > &src, const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a)
Masked version of sqrt(const Vec<T, SIMD_WIDTH> &).
Definition mask.H:866
static Vec< T, SIMD_WIDTH > maskz_rsqrt(const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a)
Zero-masked version of rsqrt(const Vec<T, SIMD_WIDTH> &).
Definition mask.H:855
static Vec< T, SIMD_WIDTH > maskz_rcp(const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a)
Zero-masked version of rcp(const Vec<T, SIMD_WIDTH> &).
Definition mask.H:832
static Vec< T, SIMD_WIDTH > mask_rsqrt(const Vec< T, SIMD_WIDTH > &src, const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a)
Masked version of rsqrt(const Vec<T, SIMD_WIDTH> &).
Definition mask.H:843
static Vec< T, SIMD_WIDTH > maskz_sqrt(const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a)
Zero-masked version of sqrt(const Vec<T, SIMD_WIDTH> &).
Definition mask.H:878
static Vec< T, SIMD_WIDTH > mask_rcp(const Vec< T, SIMD_WIDTH > &src, const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a)
Masked version of rcp(const Vec<T, SIMD_WIDTH> &).
Definition mask.H:820
static Vec< T, SIMD_WIDTH > mask_neg(const Vec< T, SIMD_WIDTH > &src, const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a)
Masked version of neg(const Vec<T, SIMD_WIDTH> &).
Definition mask.H:946
static Vec< T, SIMD_WIDTH > mask_ceil(const Vec< T, SIMD_WIDTH > &src, const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a)
Masked version of ceil(const Vec<T, SIMD_WIDTH> &).
Definition mask.H:992
static Vec< T, SIMD_WIDTH > mask_floor(const Vec< T, SIMD_WIDTH > &src, const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a)
Masked version of floor(const Vec<T, SIMD_WIDTH> &).
Definition mask.H:1015
static Vec< T, SIMD_WIDTH > mask_round(const Vec< T, SIMD_WIDTH > &src, const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a)
Masked version of round(const Vec<T, SIMD_WIDTH> &).
Definition mask.H:1038
static Vec< T, SIMD_WIDTH > maskz_truncate(const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a)
Zero-masked version of truncate(const Vec<T, SIMD_WIDTH> &).
Definition mask.H:1073
static Vec< T, SIMD_WIDTH > maskz_floor(const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a)
Zero-masked version of floor(const Vec<T, SIMD_WIDTH> &).
Definition mask.H:1027
static Vec< T, SIMD_WIDTH > maskz_ceil(const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a)
Zero-masked version of ceil(const Vec<T, SIMD_WIDTH> &).
Definition mask.H:1004
static Vec< T, SIMD_WIDTH > mask_max(const Vec< T, SIMD_WIDTH > &src, const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a, const Vec< T, SIMD_WIDTH > &b)
Masked version of max(const Vec<T, SIMD_WIDTH> &, const Vec<T, SIMD_WIDTH> &).
Definition mask.H:921
static Vec< T, SIMD_WIDTH > maskz_neg(const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a)
Zero-masked version of neg(const Vec<T, SIMD_WIDTH> &).
Definition mask.H:958
static Vec< T, SIMD_WIDTH > maskz_max(const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a, const Vec< T, SIMD_WIDTH > &b)
Zero-masked version of max(const Vec<T, SIMD_WIDTH> &, const Vec<T, SIMD_WIDTH> &).
Definition mask.H:934
static Vec< T, SIMD_WIDTH > maskz_min(const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a, const Vec< T, SIMD_WIDTH > &b)
Zero-masked version of min(const Vec<T, SIMD_WIDTH> &, const Vec<T, SIMD_WIDTH> &).
Definition mask.H:909
static Vec< T, SIMD_WIDTH > maskz_round(const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a)
Zero-masked version of round(const Vec<T, SIMD_WIDTH> &).
Definition mask.H:1050
static Vec< T, SIMD_WIDTH > mask_abs(const Vec< T, SIMD_WIDTH > &src, const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a)
Masked version of abs(const Vec<T, SIMD_WIDTH> &).
Definition mask.H:969
static Vec< T, SIMD_WIDTH > mask_truncate(const Vec< T, SIMD_WIDTH > &src, const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a)
Masked version of truncate(const Vec<T, SIMD_WIDTH> &).
Definition mask.H:1061
static Vec< T, SIMD_WIDTH > maskz_abs(const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a)
Zero-masked version of abs(const Vec<T, SIMD_WIDTH> &).
Definition mask.H:981
static Vec< T, SIMD_WIDTH > mask_min(const Vec< T, SIMD_WIDTH > &src, const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a, const Vec< T, SIMD_WIDTH > &b)
Masked version of min(const Vec<T, SIMD_WIDTH> &, const Vec<T, SIMD_WIDTH> &).
Definition mask.H:896
static Vec< T, SIMD_WIDTH > maskz_load(const Mask< T, SIMD_WIDTH > &k, const T *const p)
Zero-masked version of load(const T *const).
Definition mask.H:414
static Vec< T, SIMD_WIDTH > mask_loadu(const Vec< T, SIMD_WIDTH > &src, const Mask< T, SIMD_WIDTH > &k, const T *const p)
Masked version of loadu(const T *const).
Definition mask.H:428
static Vec< T, SIMD_WIDTH > mask_load(const Vec< T, SIMD_WIDTH > &src, const Mask< T, SIMD_WIDTH > &k, const T *const p)
Masked versions of load(const T *const).
Definition mask.H:399
static void mask_store(T *const p, const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a)
Masked version of store(T *const, const Vec<T, SIMD_WIDTH> &).
Definition mask.H:455
static Vec< T, SIMD_WIDTH > maskz_loadu(const Mask< T, SIMD_WIDTH > &k, const T *const p)
Zero-masked version of loadu(const T *const).
Definition mask.H:443
static void mask_storeu(T *const p, const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a)
Masked version of storeu(T *const, const Vec<T, SIMD_WIDTH> &).
Definition mask.H:467
static Vec< T, SIMD_WIDTH > maskz_srai(const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a)
Zero-masked version of srai(const Vec<T, SIMD_WIDTH> &).
Definition mask.H:1233
static Vec< T, SIMD_WIDTH > maskz_srli(const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a)
Zero-masked version of srli(const Vec<T, SIMD_WIDTH> &).
Definition mask.H:1256
static Vec< T, SIMD_WIDTH > maskz_slli(const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a)
Zero-masked version of slli(const Vec<T, SIMD_WIDTH> &).
Definition mask.H:1279
static Vec< T, SIMD_WIDTH > mask_srai(const Vec< T, SIMD_WIDTH > &src, const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a)
Masked version of srai(const Vec<T, SIMD_WIDTH> &).
Definition mask.H:1221
static Vec< T, SIMD_WIDTH > mask_slli(const Vec< T, SIMD_WIDTH > &src, const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a)
Masked version of slli(const Vec<T, SIMD_WIDTH> &).
Definition mask.H:1267
static Vec< T, SIMD_WIDTH > mask_srli(const Vec< T, SIMD_WIDTH > &src, const Mask< T, SIMD_WIDTH > &k, const Vec< T, SIMD_WIDTH > &a)
Masked version of srli(const Vec<T, SIMD_WIDTH> &).
Definition mask.H:1244
static Vec< T, SIMD_WIDTH > maskz_set1(const Mask< T, SIMD_WIDTH > &k, const T a)
Zero-masked version of set1(const T).
Definition mask.H:72
static Vec< Tout, SIMD_WIDTH > maskz_cvts(const Mask< Tin, SIMD_WIDTH > &k, const Vec< Tin, SIMD_WIDTH > &a)
Zero-masked version of cvts(const Vec<Tin, SIMD_WIDTH> &).
Definition mask.H:93
static Vec< Tout, SIMD_WIDTH > mask_cvts(const Vec< Tout, SIMD_WIDTH > &src, const Mask< Tin, SIMD_WIDTH > &k, const Vec< Tin, SIMD_WIDTH > &a)
Masked version of cvts(const Vec<Tin, SIMD_WIDTH> &).
Definition mask.H:82
static Vec< T, SIMD_WIDTH > mask_set1(const Vec< T, SIMD_WIDTH > &src, const Mask< T, SIMD_WIDTH > &k, const T a)
Masked version of set1(const T).
Definition mask.H:61
Namespace for T-SIMD.
Definition time_measurement.H:161