T-SIMD v31.1.0
A C++ template SIMD library
Loading...
Searching...
No Matches
mask.H
1// ===========================================================================
2//
3// mask classes and masked functions
4//
5// This source code file is part of the following software:
6//
7// - the low-level C++ template SIMD library
8// - the SIMD implementation of the MinWarping and the 2D-Warping methods
9// for local visual homing.
10//
11// The software is provided based on the accompanying license agreement in the
12// file LICENSE.md.
13// The software is provided "as is" without any warranty by the licensor and
14// without any liability of the licensor, and the software may not be
15// distributed by the licensee; see the license agreement for details.
16//
17// (C) Jonas Keller, Ralf Möller
18// Computer Engineering
19// Faculty of Technology
20// Bielefeld University
21// www.ti.uni-bielefeld.de
22//
23// ===========================================================================
24
25// 22. Jan 23 (Jonas Keller): introduced wrapper layer that wraps the internal
26// architecture-specific implementations
27
28// 02. Mar 23 (Jonas Keller): added doxygen documentation
29
30#pragma once
31#ifndef SIMD_VEC_MASK_H_
32#define SIMD_VEC_MASK_H_
33
34#include "defs.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"
39#include "types.H"
40#include "vec.H"
41
42#include <cstddef>
43#include <cstdint>
44
45namespace simd {
46
60template <typename T, size_t SIMD_WIDTH>
61static SIMD_INLINE Vec<T, SIMD_WIDTH> mask_set1(const Vec<T, SIMD_WIDTH> &src,
62 const Mask<T, SIMD_WIDTH> &k,
63 const T a)
64{
65 return internal::mask::mask_set1(src, k, a);
66}
67
71template <typename T, size_t SIMD_WIDTH>
73 const T a)
74{
75 return internal::mask::maskz_set1(k, a);
76}
77
81template <typename Tout, typename Tin, size_t SIMD_WIDTH>
84 const Vec<Tin, SIMD_WIDTH> &a)
85{
86 return internal::mask::mask_cvts(src, k, a);
87}
88
92template <typename Tout, typename Tin, size_t SIMD_WIDTH>
95{
96 return internal::mask::maskz_cvts(k, a);
97}
98
108// 06. Feb 23 (Jonas Keller): added reinterpret_mask
109
120template <typename Tout, typename Tin, size_t SIMD_WIDTH>
122 const Mask<Tin, SIMD_WIDTH> &a)
123{
124 return internal::mask::reinterpret_mask<Tout, Tin, SIMD_WIDTH>(a);
125}
126
134template <typename T, size_t SIMD_WIDTH>
135static SIMD_INLINE Mask<T, SIMD_WIDTH> kadd(const Mask<T, SIMD_WIDTH> &a,
136 const Mask<T, SIMD_WIDTH> &b)
137{
138 return internal::mask::kadd(a, b);
139}
140
148template <typename T, size_t SIMD_WIDTH>
149static SIMD_INLINE Mask<T, SIMD_WIDTH> kand(const Mask<T, SIMD_WIDTH> &a,
150 const Mask<T, SIMD_WIDTH> &b)
151{
152 return internal::mask::kand(a, b);
153}
154
164template <typename T, size_t SIMD_WIDTH>
166 const Mask<T, SIMD_WIDTH> &b)
167{
168 return internal::mask::kandn(a, b);
169}
170
178template <typename T, size_t SIMD_WIDTH>
179static SIMD_INLINE Mask<T, SIMD_WIDTH> kor(const Mask<T, SIMD_WIDTH> &a,
180 const Mask<T, SIMD_WIDTH> &b)
181{
182 return internal::mask::kor(a, b);
183}
184
192template <typename T, size_t SIMD_WIDTH>
193static SIMD_INLINE Mask<T, SIMD_WIDTH> kxor(const Mask<T, SIMD_WIDTH> &a,
194 const Mask<T, SIMD_WIDTH> &b)
195{
196 return internal::mask::kxor(a, b);
197}
198
206template <typename T, size_t SIMD_WIDTH>
208 const Mask<T, SIMD_WIDTH> &b)
209{
210 return internal::mask::kxnor(a, b);
211}
212
219template <typename T, size_t SIMD_WIDTH>
220static SIMD_INLINE Mask<T, SIMD_WIDTH> knot(const Mask<T, SIMD_WIDTH> &a)
221{
222 return internal::mask::knot(a);
223}
224
233template <size_t COUNT, typename T, size_t SIMD_WIDTH>
235{
236 return internal::mask::kshiftri<COUNT>(a);
237}
238
247template <size_t COUNT, typename T, size_t SIMD_WIDTH>
249{
250 return internal::mask::kshiftli<COUNT>(a);
251}
252
261template <typename T, size_t SIMD_WIDTH>
263 const uint64_t count)
264{
265 return internal::mask::kshiftri(a, count);
266}
267
276template <typename T, size_t SIMD_WIDTH>
278 const uint64_t count)
279{
280 return internal::mask::kshiftli(a, count);
281}
282
288template <typename T, size_t SIMD_WIDTH_DEFAULT_NATIVE>
290{
291 return internal::mask::mask_all_ones(internal::OutputType<T>(),
292 internal::Integer<SIMD_WIDTH>());
293}
294
295// 30. Jan 23 (Jonas Keller): removed setTrueLeft/Right and replaced them with
296// mask_set_true/false_low/high.
297
306template <typename T, size_t SIMD_WIDTH_DEFAULT_NATIVE>
307static SIMD_INLINE Mask<T, SIMD_WIDTH> mask_set_true_low(const size_t x)
308{
309 return internal::mask::mask_set_true_low(x, internal::OutputType<T>(),
310 internal::Integer<SIMD_WIDTH>());
311}
312
321template <typename T, size_t SIMD_WIDTH_DEFAULT_NATIVE>
322static SIMD_INLINE Mask<T, SIMD_WIDTH> mask_set_true_high(const size_t x)
323{
324 return internal::mask::mask_set_true_high(x, internal::OutputType<T>(),
325 internal::Integer<SIMD_WIDTH>());
326}
327
336template <typename T, size_t SIMD_WIDTH_DEFAULT_NATIVE>
337static SIMD_INLINE Mask<T, SIMD_WIDTH> mask_set_false_low(const size_t x)
338{
339 return internal::mask::mask_set_false_low(x, internal::OutputType<T>(),
340 internal::Integer<SIMD_WIDTH>());
341}
342
351template <typename T, size_t SIMD_WIDTH_DEFAULT_NATIVE>
352static SIMD_INLINE Mask<T, SIMD_WIDTH> mask_set_false_high(const size_t x)
353{
354 return internal::mask::mask_set_false_high(x, internal::OutputType<T>(),
355 internal::Integer<SIMD_WIDTH>());
356}
357
358// 07. Aug 23 (Jonas Keller): added ktest_all_zeros/ones.
359
366template <typename T, size_t SIMD_WIDTH>
367static SIMD_INLINE bool ktest_all_zeros(const Mask<T, SIMD_WIDTH> &a)
368{
369 return internal::mask::ktest_all_zeros(a);
370}
371
378template <typename T, size_t SIMD_WIDTH>
379static SIMD_INLINE bool ktest_all_ones(const Mask<T, SIMD_WIDTH> &a)
380{
381 return internal::mask::ktest_all_ones(a);
382}
383
398template <typename T, size_t SIMD_WIDTH>
399static SIMD_INLINE Vec<T, SIMD_WIDTH> mask_load(const Vec<T, SIMD_WIDTH> &src,
400 const Mask<T, SIMD_WIDTH> &k,
401 const T *const p)
402{
403 return internal::mask::mask_load(src, k, p);
404}
405
413template <typename T, size_t SIMD_WIDTH>
415 const T *const p)
416{
417 return internal::mask::maskz_load(k, p);
418}
419
427template <typename T, size_t SIMD_WIDTH>
429 const Mask<T, SIMD_WIDTH> &k,
430 const T *const p)
431{
432 return internal::mask::mask_loadu(src, k, p);
433}
434
442template <typename T, size_t SIMD_WIDTH>
444 const T *const p)
445{
446 return internal::mask::maskz_loadu(k, p);
447}
448
454template <typename T, size_t SIMD_WIDTH>
455static SIMD_INLINE void mask_store(T *const p, const Mask<T, SIMD_WIDTH> &k,
456 const Vec<T, SIMD_WIDTH> &a)
457{
458 internal::mask::mask_store(p, k, a);
459}
460
466template <typename T, size_t SIMD_WIDTH>
467static SIMD_INLINE void mask_storeu(T *const p, const Mask<T, SIMD_WIDTH> &k,
468 const Vec<T, SIMD_WIDTH> &a)
469{
470 internal::mask::mask_storeu(p, k, a);
471}
472
484template <typename T, size_t SIMD_WIDTH>
485static SIMD_INLINE Vec<T, SIMD_WIDTH> mask_add(const Vec<T, SIMD_WIDTH> &src,
486 const Mask<T, SIMD_WIDTH> &k,
487 const Vec<T, SIMD_WIDTH> &a,
488 const Vec<T, SIMD_WIDTH> &b)
489{
490 return internal::mask::mask_add(src, k, a, b);
491}
492
497template <typename T, size_t SIMD_WIDTH>
499 const Vec<T, SIMD_WIDTH> &a,
500 const Vec<T, SIMD_WIDTH> &b)
501{
502 return internal::mask::maskz_add(k, a, b);
503}
504
509template <typename T, size_t SIMD_WIDTH>
510static SIMD_INLINE Vec<T, SIMD_WIDTH> mask_adds(const Vec<T, SIMD_WIDTH> &src,
511 const Mask<T, SIMD_WIDTH> &k,
512 const Vec<T, SIMD_WIDTH> &a,
513 const Vec<T, SIMD_WIDTH> &b)
514{
515 return internal::mask::mask_adds(src, k, a, b);
516}
517
522template <typename T, size_t SIMD_WIDTH>
524 const Vec<T, SIMD_WIDTH> &a,
525 const Vec<T, SIMD_WIDTH> &b)
526{
527 return internal::mask::maskz_adds(k, a, b);
528}
529
534template <typename T, size_t SIMD_WIDTH>
535static SIMD_INLINE Vec<T, SIMD_WIDTH> mask_sub(const Vec<T, SIMD_WIDTH> &src,
536 const Mask<T, SIMD_WIDTH> &k,
537 const Vec<T, SIMD_WIDTH> &a,
538 const Vec<T, SIMD_WIDTH> &b)
539{
540 return internal::mask::mask_sub(src, k, a, b);
541}
542
547template <typename T, size_t SIMD_WIDTH>
549 const Vec<T, SIMD_WIDTH> &a,
550 const Vec<T, SIMD_WIDTH> &b)
551{
552 return internal::mask::maskz_sub(k, a, b);
553}
554
559template <typename T, size_t SIMD_WIDTH>
560static SIMD_INLINE Vec<T, SIMD_WIDTH> mask_subs(const Vec<T, SIMD_WIDTH> &src,
561 const Mask<T, SIMD_WIDTH> &k,
562 const Vec<T, SIMD_WIDTH> &a,
563 const Vec<T, SIMD_WIDTH> &b)
564{
565 return internal::mask::mask_subs(src, k, a, b);
566}
567
572template <typename T, size_t SIMD_WIDTH>
574 const Vec<T, SIMD_WIDTH> &a,
575 const Vec<T, SIMD_WIDTH> &b)
576{
577 return internal::mask::maskz_subs(k, a, b);
578}
579
584template <typename T, size_t SIMD_WIDTH>
585static SIMD_INLINE Vec<T, SIMD_WIDTH> mask_mul(const Vec<T, SIMD_WIDTH> &src,
586 const Mask<T, SIMD_WIDTH> &k,
587 const Vec<T, SIMD_WIDTH> &a,
588 const Vec<T, SIMD_WIDTH> &b)
589{
590 return internal::mask::mask_mul(src, k, a, b);
591}
592
597template <typename T, size_t SIMD_WIDTH>
599 const Vec<T, SIMD_WIDTH> &a,
600 const Vec<T, SIMD_WIDTH> &b)
601{
602 return internal::mask::maskz_mul(k, a, b);
603}
604
609template <typename T, size_t SIMD_WIDTH>
610static SIMD_INLINE Vec<T, SIMD_WIDTH> mask_div(const Vec<T, SIMD_WIDTH> &src,
611 const Mask<T, SIMD_WIDTH> &k,
612 const Vec<T, SIMD_WIDTH> &a,
613 const Vec<T, SIMD_WIDTH> &b)
614{
615 return internal::mask::mask_div(src, k, a, b);
616}
617
622template <typename T, size_t SIMD_WIDTH>
624 const Vec<T, SIMD_WIDTH> &a,
625 const Vec<T, SIMD_WIDTH> &b)
626{
627 return internal::mask::maskz_div(k, a, b);
628}
629
634template <typename T, size_t SIMD_WIDTH>
635static SIMD_INLINE Vec<T, SIMD_WIDTH> mask_avg(const Vec<T, SIMD_WIDTH> &src,
636 const Mask<T, SIMD_WIDTH> &k,
637 const Vec<T, SIMD_WIDTH> &a,
638 const Vec<T, SIMD_WIDTH> &b)
639{
640 return internal::mask::mask_avg(src, k, a, b);
641}
642
647template <typename T, size_t SIMD_WIDTH>
649 const Vec<T, SIMD_WIDTH> &a,
650 const Vec<T, SIMD_WIDTH> &b)
651{
652 return internal::mask::maskz_avg(k, a, b);
653}
654
659template <typename T, size_t SIMD_WIDTH>
661 const Mask<T, SIMD_WIDTH> &k,
662 const Vec<T, SIMD_WIDTH> &a)
663{
664 return internal::mask::mask_div2r0(src, k, a);
665}
666
671template <typename T, size_t SIMD_WIDTH>
673 const Vec<T, SIMD_WIDTH> &a)
674{
675 return internal::mask::maskz_div2r0(k, a);
676}
677
682template <typename T, size_t SIMD_WIDTH>
684 const Mask<T, SIMD_WIDTH> &k,
685 const Vec<T, SIMD_WIDTH> &a)
686{
687 return internal::mask::mask_div2rd(src, k, a);
688}
689
694template <typename T, size_t SIMD_WIDTH>
696 const Vec<T, SIMD_WIDTH> &a)
697{
698 return internal::mask::maskz_div2rd(k, a);
699}
700
712template <typename T, size_t SIMD_WIDTH>
713static SIMD_INLINE Vec<T, SIMD_WIDTH> mask_hadd(const Vec<T, SIMD_WIDTH> &src,
714 const Mask<T, SIMD_WIDTH> &k,
715 const Vec<T, SIMD_WIDTH> &a,
716 const Vec<T, SIMD_WIDTH> &b)
717{
718 return internal::mask::mask_hadd(src, k, a, b);
719}
720
725template <typename T, size_t SIMD_WIDTH>
727 const Vec<T, SIMD_WIDTH> &a,
728 const Vec<T, SIMD_WIDTH> &b)
729{
730 return internal::mask::maskz_hadd(k, a, b);
731}
732
737template <typename T, size_t SIMD_WIDTH>
739 const Mask<T, SIMD_WIDTH> &k,
740 const Vec<T, SIMD_WIDTH> &a,
741 const Vec<T, SIMD_WIDTH> &b)
742{
743 return internal::mask::mask_hadds(src, k, a, b);
744}
745
750template <typename T, size_t SIMD_WIDTH>
752 const Vec<T, SIMD_WIDTH> &a,
753 const Vec<T, SIMD_WIDTH> &b)
754{
755 return internal::mask::maskz_hadds(k, a, b);
756}
757
762template <typename T, size_t SIMD_WIDTH>
763static SIMD_INLINE Vec<T, SIMD_WIDTH> mask_hsub(const Vec<T, SIMD_WIDTH> &src,
764 const Mask<T, SIMD_WIDTH> &k,
765 const Vec<T, SIMD_WIDTH> &a,
766 const Vec<T, SIMD_WIDTH> &b)
767{
768 return internal::mask::mask_hsub(src, k, a, b);
769}
770
775template <typename T, size_t SIMD_WIDTH>
777 const Vec<T, SIMD_WIDTH> &a,
778 const Vec<T, SIMD_WIDTH> &b)
779{
780 return internal::mask::maskz_hsub(k, a, b);
781}
782
787template <typename T, size_t SIMD_WIDTH>
789 const Mask<T, SIMD_WIDTH> &k,
790 const Vec<T, SIMD_WIDTH> &a,
791 const Vec<T, SIMD_WIDTH> &b)
792{
793 return internal::mask::mask_hsubs(src, k, a, b);
794}
795
800template <typename T, size_t SIMD_WIDTH>
802 const Vec<T, SIMD_WIDTH> &a,
803 const Vec<T, SIMD_WIDTH> &b)
804{
805 return internal::mask::maskz_hsubs(k, a, b);
806}
807
819template <typename T, size_t SIMD_WIDTH>
820static SIMD_INLINE Vec<T, SIMD_WIDTH> mask_rcp(const Vec<T, SIMD_WIDTH> &src,
821 const Mask<T, SIMD_WIDTH> &k,
822 const Vec<T, SIMD_WIDTH> &a)
823{
824 return internal::mask::mask_rcp(src, k, a);
825}
826
831template <typename T, size_t SIMD_WIDTH>
833 const Vec<T, SIMD_WIDTH> &a)
834{
835 return internal::mask::maskz_rcp(k, a);
836}
837
842template <typename T, size_t SIMD_WIDTH>
844 const Mask<T, SIMD_WIDTH> &k,
845 const Vec<T, SIMD_WIDTH> &a)
846{
847 return internal::mask::mask_rsqrt(src, k, a);
848}
849
854template <typename T, size_t SIMD_WIDTH>
856 const Vec<T, SIMD_WIDTH> &a)
857{
858 return internal::mask::maskz_rsqrt(k, a);
859}
860
865template <typename T, size_t SIMD_WIDTH>
866static SIMD_INLINE Vec<T, SIMD_WIDTH> mask_sqrt(const Vec<T, SIMD_WIDTH> &src,
867 const Mask<T, SIMD_WIDTH> &k,
868 const Vec<T, SIMD_WIDTH> &a)
869{
870 return internal::mask::mask_sqrt(src, k, a);
871}
872
877template <typename T, size_t SIMD_WIDTH>
879 const Vec<T, SIMD_WIDTH> &a)
880{
881 return internal::mask::maskz_sqrt(k, a);
882}
883
895template <typename T, size_t SIMD_WIDTH>
896static SIMD_INLINE Vec<T, SIMD_WIDTH> mask_min(const Vec<T, SIMD_WIDTH> &src,
897 const Mask<T, SIMD_WIDTH> &k,
898 const Vec<T, SIMD_WIDTH> &a,
899 const Vec<T, SIMD_WIDTH> &b)
900{
901 return internal::mask::mask_min(src, k, a, b);
902}
903
908template <typename T, size_t SIMD_WIDTH>
910 const Vec<T, SIMD_WIDTH> &a,
911 const Vec<T, SIMD_WIDTH> &b)
912{
913 return internal::mask::maskz_min(k, a, b);
914}
915
920template <typename T, size_t SIMD_WIDTH>
921static SIMD_INLINE Vec<T, SIMD_WIDTH> mask_max(const Vec<T, SIMD_WIDTH> &src,
922 const Mask<T, SIMD_WIDTH> &k,
923 const Vec<T, SIMD_WIDTH> &a,
924 const Vec<T, SIMD_WIDTH> &b)
925{
926 return internal::mask::mask_max(src, k, a, b);
927}
928
933template <typename T, size_t SIMD_WIDTH>
935 const Vec<T, SIMD_WIDTH> &a,
936 const Vec<T, SIMD_WIDTH> &b)
937{
938 return internal::mask::maskz_max(k, a, b);
939}
940
945template <typename T, size_t SIMD_WIDTH>
946static SIMD_INLINE Vec<T, SIMD_WIDTH> mask_neg(const Vec<T, SIMD_WIDTH> &src,
947 const Mask<T, SIMD_WIDTH> &k,
948 const Vec<T, SIMD_WIDTH> &a)
949{
950 return internal::mask::mask_neg(src, k, a);
951}
952
957template <typename T, size_t SIMD_WIDTH>
959 const Vec<T, SIMD_WIDTH> &a)
960{
961 return internal::mask::maskz_neg(k, a);
962}
963
968template <typename T, size_t SIMD_WIDTH>
969static SIMD_INLINE Vec<T, SIMD_WIDTH> mask_abs(const Vec<T, SIMD_WIDTH> &src,
970 const Mask<T, SIMD_WIDTH> &k,
971 const Vec<T, SIMD_WIDTH> &a)
972{
973 return internal::mask::mask_abs(src, k, a);
974}
975
980template <typename T, size_t SIMD_WIDTH>
982 const Vec<T, SIMD_WIDTH> &a)
983{
984 return internal::mask::maskz_abs(k, a);
985}
986
991template <typename T, size_t SIMD_WIDTH>
992static SIMD_INLINE Vec<T, SIMD_WIDTH> mask_ceil(const Vec<T, SIMD_WIDTH> &src,
993 const Mask<T, SIMD_WIDTH> &k,
994 const Vec<T, SIMD_WIDTH> &a)
995{
996 return internal::mask::mask_ceil(src, k, a);
997}
998
1003template <typename T, size_t SIMD_WIDTH>
1005 const Vec<T, SIMD_WIDTH> &a)
1006{
1007 return internal::mask::maskz_ceil(k, a);
1008}
1009
1014template <typename T, size_t SIMD_WIDTH>
1016 const Mask<T, SIMD_WIDTH> &k,
1017 const Vec<T, SIMD_WIDTH> &a)
1018{
1019 return internal::mask::mask_floor(src, k, a);
1020}
1021
1026template <typename T, size_t SIMD_WIDTH>
1028 const Vec<T, SIMD_WIDTH> &a)
1029{
1030 return internal::mask::maskz_floor(k, a);
1031}
1032
1037template <typename T, size_t SIMD_WIDTH>
1039 const Mask<T, SIMD_WIDTH> &k,
1040 const Vec<T, SIMD_WIDTH> &a)
1041{
1042 return internal::mask::mask_round(src, k, a);
1043}
1044
1049template <typename T, size_t SIMD_WIDTH>
1051 const Vec<T, SIMD_WIDTH> &a)
1052{
1053 return internal::mask::maskz_round(k, a);
1054}
1055
1060template <typename T, size_t SIMD_WIDTH>
1062 const Vec<T, SIMD_WIDTH> &src, const Mask<T, SIMD_WIDTH> &k,
1063 const Vec<T, SIMD_WIDTH> &a)
1064{
1065 return internal::mask::mask_truncate(src, k, a);
1066}
1067
1072template <typename T, size_t SIMD_WIDTH>
1074 const Mask<T, SIMD_WIDTH> &k, const Vec<T, SIMD_WIDTH> &a)
1075{
1076 return internal::mask::maskz_truncate(k, a);
1077}
1078
1090template <typename T, size_t SIMD_WIDTH>
1091static SIMD_INLINE Vec<T, SIMD_WIDTH> mask_and(const Vec<T, SIMD_WIDTH> &src,
1092 const Mask<T, SIMD_WIDTH> &k,
1093 const Vec<T, SIMD_WIDTH> &a,
1094 const Vec<T, SIMD_WIDTH> &b)
1095{
1096 return internal::mask::mask_and(src, k, a, b);
1097}
1098
1103template <typename T, size_t SIMD_WIDTH>
1105 const Vec<T, SIMD_WIDTH> &a,
1106 const Vec<T, SIMD_WIDTH> &b)
1107{
1108 return internal::mask::maskz_and(k, a, b);
1109}
1110
1115template <typename T, size_t SIMD_WIDTH>
1116static SIMD_INLINE Vec<T, SIMD_WIDTH> mask_or(const Vec<T, SIMD_WIDTH> &src,
1117 const Mask<T, SIMD_WIDTH> &k,
1118 const Vec<T, SIMD_WIDTH> &a,
1119 const Vec<T, SIMD_WIDTH> &b)
1120{
1121 return internal::mask::mask_or(src, k, a, b);
1122}
1123
1128template <typename T, size_t SIMD_WIDTH>
1130 const Vec<T, SIMD_WIDTH> &a,
1131 const Vec<T, SIMD_WIDTH> &b)
1132{
1133 return internal::mask::maskz_or(k, a, b);
1134}
1135
1140template <typename T, size_t SIMD_WIDTH>
1142 const Mask<T, SIMD_WIDTH> &k,
1143 const Vec<T, SIMD_WIDTH> &a,
1144 const Vec<T, SIMD_WIDTH> &b)
1145{
1146 return internal::mask::mask_andnot(src, k, a, b);
1147}
1148
1153template <typename T, size_t SIMD_WIDTH>
1155 const Vec<T, SIMD_WIDTH> &a,
1156 const Vec<T, SIMD_WIDTH> &b)
1157{
1158 return internal::mask::maskz_andnot(k, a, b);
1159}
1160
1165template <typename T, size_t SIMD_WIDTH>
1166static SIMD_INLINE Vec<T, SIMD_WIDTH> mask_xor(const Vec<T, SIMD_WIDTH> &src,
1167 const Mask<T, SIMD_WIDTH> &k,
1168 const Vec<T, SIMD_WIDTH> &a,
1169 const Vec<T, SIMD_WIDTH> &b)
1170{
1171 return internal::mask::mask_xor(src, k, a, b);
1172}
1173
1178template <typename T, size_t SIMD_WIDTH>
1180 const Vec<T, SIMD_WIDTH> &a,
1181 const Vec<T, SIMD_WIDTH> &b)
1182{
1183 return internal::mask::maskz_xor(k, a, b);
1184}
1185
1190template <typename T, size_t SIMD_WIDTH>
1191static SIMD_INLINE Vec<T, SIMD_WIDTH> mask_not(const Vec<T, SIMD_WIDTH> &src,
1192 const Mask<T, SIMD_WIDTH> &k,
1193 const Vec<T, SIMD_WIDTH> &a)
1194{
1195 return internal::mask::mask_not(src, k, a);
1196}
1197
1202template <typename T, size_t SIMD_WIDTH>
1204 const Vec<T, SIMD_WIDTH> &a)
1205{
1206 return internal::mask::maskz_not(k, a);
1207}
1208
1220template <size_t COUNT, typename T, size_t SIMD_WIDTH>
1222 const Mask<T, SIMD_WIDTH> &k,
1223 const Vec<T, SIMD_WIDTH> &a)
1224{
1225 return internal::mask::mask_srai<COUNT>(src, k, a);
1226}
1227
1232template <size_t COUNT, typename T, size_t SIMD_WIDTH>
1234 const Vec<T, SIMD_WIDTH> &a)
1235{
1236 return internal::mask::maskz_srai<COUNT>(k, a);
1237}
1238
1243template <size_t COUNT, typename T, size_t SIMD_WIDTH>
1245 const Mask<T, SIMD_WIDTH> &k,
1246 const Vec<T, SIMD_WIDTH> &a)
1247{
1248 return internal::mask::mask_srli<COUNT>(src, k, a);
1249}
1250
1255template <size_t COUNT, typename T, size_t SIMD_WIDTH>
1257 const Vec<T, SIMD_WIDTH> &a)
1258{
1259 return internal::mask::maskz_srli<COUNT>(k, a);
1260}
1261
1266template <size_t COUNT, typename T, size_t SIMD_WIDTH>
1268 const Mask<T, SIMD_WIDTH> &k,
1269 const Vec<T, SIMD_WIDTH> &a)
1270{
1271 return internal::mask::mask_slli<COUNT>(src, k, a);
1272}
1273
1278template <size_t COUNT, typename T, size_t SIMD_WIDTH>
1280 const Vec<T, SIMD_WIDTH> &a)
1281{
1282 return internal::mask::maskz_slli<COUNT>(k, a);
1283}
1284
1285// TODO: add masked versions of sra, srl and sll
1286
1309template <typename T, size_t SIMD_WIDTH>
1311 const Vec<T, SIMD_WIDTH> &a,
1312 const Vec<T, SIMD_WIDTH> &b)
1313{
1314 return internal::mask::mask_cmplt(k, a, b);
1315}
1316
1332template <typename T, size_t SIMD_WIDTH>
1334 const Vec<T, SIMD_WIDTH> &a,
1335 const Vec<T, SIMD_WIDTH> &b)
1336{
1337 return internal::mask::mask_cmple(k, a, b);
1338}
1339
1353template <typename T, size_t SIMD_WIDTH>
1355 const Vec<T, SIMD_WIDTH> &a,
1356 const Vec<T, SIMD_WIDTH> &b)
1357{
1358 return internal::mask::mask_cmpeq(k, a, b);
1359}
1360
1376template <typename T, size_t SIMD_WIDTH>
1378 const Vec<T, SIMD_WIDTH> &a,
1379 const Vec<T, SIMD_WIDTH> &b)
1380{
1381 return internal::mask::mask_cmpgt(k, a, b);
1382}
1383
1399template <typename T, size_t SIMD_WIDTH>
1401 const Vec<T, SIMD_WIDTH> &a,
1402 const Vec<T, SIMD_WIDTH> &b)
1403{
1404 return internal::mask::mask_cmpge(k, a, b);
1405}
1406
1422template <typename T, size_t SIMD_WIDTH>
1424 const Vec<T, SIMD_WIDTH> &a,
1425 const Vec<T, SIMD_WIDTH> &b)
1426{
1427 return internal::mask::mask_cmpneq(k, a, b);
1428}
1429
1441template <typename T, size_t SIMD_WIDTH>
1443 const Vec<T, SIMD_WIDTH> &b)
1444{
1445 return internal::mask::mask_cmplt(a, b);
1446}
1447
1459template <typename T, size_t SIMD_WIDTH>
1461 const Vec<T, SIMD_WIDTH> &b)
1462{
1463 return internal::mask::mask_cmple(a, b);
1464}
1465
1477template <typename T, size_t SIMD_WIDTH>
1479 const Vec<T, SIMD_WIDTH> &b)
1480{
1481 return internal::mask::mask_cmpeq(a, b);
1482}
1483
1495template <typename T, size_t SIMD_WIDTH>
1497 const Vec<T, SIMD_WIDTH> &b)
1498{
1499 return internal::mask::mask_cmpgt(a, b);
1500}
1501
1513template <typename T, size_t SIMD_WIDTH>
1515 const Vec<T, SIMD_WIDTH> &b)
1516{
1517 return internal::mask::mask_cmpge(a, b);
1518}
1519
1531template <typename T, size_t SIMD_WIDTH>
1533 const Vec<T, SIMD_WIDTH> &b)
1534{
1535 return internal::mask::mask_cmpneq(a, b);
1536}
1537
1548template <typename T, size_t SIMD_WIDTH>
1549static SIMD_INLINE bool mask_test_all_zeros(const Mask<T, SIMD_WIDTH> &k,
1550 const Vec<T, SIMD_WIDTH> &a)
1551{
1552 return internal::mask::mask_test_all_zeros(k, a);
1553}
1554
1565template <typename T, size_t SIMD_WIDTH>
1566static SIMD_INLINE bool mask_test_all_ones(const Mask<T, SIMD_WIDTH> &k,
1567 const Vec<T, SIMD_WIDTH> &a)
1568{
1569 return internal::mask::mask_test_all_ones(k, a);
1570}
1571
1581template <typename Tcond, typename T, size_t SIMD_WIDTH>
1583 const Mask<Tcond, SIMD_WIDTH> &cond, const Vec<T, SIMD_WIDTH> &trueVal,
1584 const Vec<T, SIMD_WIDTH> &falseVal)
1585{
1586 static_assert(sizeof(Tcond) == sizeof(T),
1587 "condition and value types must have the same size");
1588 return internal::mask::mask_ifelse(reinterpret_mask<T>(cond), trueVal,
1589 falseVal);
1590}
1591
1600template <typename Tcond, typename T, size_t SIMD_WIDTH>
1602 const Mask<Tcond, SIMD_WIDTH> &cond, const Vec<T, SIMD_WIDTH> &trueVal)
1603{
1604 static_assert(sizeof(Tcond) == sizeof(T),
1605 "condition and value types must have the same size");
1606 return internal::mask::mask_ifelsezero(reinterpret_mask<T>(cond), trueVal);
1607}
1608
1609// 07. Aug 23 (Jonas Keller): added kcmpeq
1610
1618template <typename T, size_t SIMD_WIDTH>
1619static SIMD_INLINE bool kcmpeq(const Mask<T, SIMD_WIDTH> &a,
1620 const Mask<T, SIMD_WIDTH> &b)
1621{
1622 return internal::mask::kcmpeq(a, b);
1623}
1624
1626} // namespace simd
1627
1628#endif // SIMD_VEC_MASK_H_
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