T-SIMD v31.1.0
A C++ template SIMD library
Loading...
Searching...
No Matches
mask_impl_sandbox.H
1// ===========================================================================
2//
3// test template functions for Mask and associated function templates
4// these functions just print out template parameters and some arguments
5//
6// This source code file is part of the following software:
7//
8// - the low-level C++ template SIMD library
9// - the SIMD implementation of the MinWarping and the 2D-Warping methods
10// for local visual homing.
11//
12// The software is provided based on the accompanying license agreement in the
13// file LICENSE.md.
14// The software is provided "as is" without any warranty by the licensor and
15// without any liability of the licensor, and the software may not be
16// distributed by the licensee; see the license agreement for details.
17//
18// (C) Ralf Möller
19// Computer Engineering
20// Faculty of Technology
21// Bielefeld University
22// www.ti.uni-bielefeld.de
23//
24// ===========================================================================
25
26// 04. Aug 22 (Jonas Keller): added masked functions
27
28// 22. Jan 23 (Jonas Keller): moved sandbox implementations into internal
29// namespace
30
31#pragma once
32#ifndef SIMD_VEC_MASK_IMPL_SANDBOX_H_
33#define SIMD_VEC_MASK_IMPL_SANDBOX_H_
34
35// TODO: should this only contain level 0 functions?
36
37#include "../defs.H"
38#include "../types.H"
39#include "../vec.H"
40
41#include <cstddef>
42#include <cstdint>
43#include <cstdio>
44
45#ifdef SIMDVEC_SANDBOX
46
47namespace simd {
48// ===========================================================================
49// generic template for Mask
50// ===========================================================================
51
52template <typename T, size_t SIMD_WIDTH>
53class Mask
54{
55public:
56 Mask() {}
57 Mask(const uint64_t &) {}
58 operator uint64_t() const { return 0; }
59};
60
61namespace internal {
62namespace mask {
63// ===========================================================================
64// masked functions
65// ===========================================================================
66
67template <typename T, size_t SIMD_WIDTH>
68static SIMD_INLINE Mask<T, SIMD_WIDTH> mask_all_ones(OutputType<T>,
69 Integer<SIMD_WIDTH>)
70{
71 printf("mask_all_ones<%s,%zu>()\n", TypeInfo<T>::name(), SIMD_WIDTH);
72 return Mask<T, SIMD_WIDTH>();
73}
74
75template <typename T, size_t SIMD_WIDTH>
76static SIMD_INLINE Vec<T, SIMD_WIDTH> mask_ifelse(
77 const Mask<T, SIMD_WIDTH> &cond, const Vec<T, SIMD_WIDTH> &trueVal,
78 const Vec<T, SIMD_WIDTH> &falseVal)
79{
80 (void) cond;
81 (void) trueVal;
82 (void) falseVal;
83 printf("mask_ifelse<%s,%zu>(M,V,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
84 return Vec<T, SIMD_WIDTH>();
85}
86
87// mask_ifelsezero
88template <typename T, size_t SIMD_WIDTH>
89static SIMD_INLINE Vec<T, SIMD_WIDTH> mask_ifelsezero(
90 const Mask<T, SIMD_WIDTH> &cond, const Vec<T, SIMD_WIDTH> &trueVal)
91{
92 (void) cond;
93 (void) trueVal;
94 printf("mask_ifelsezero<%s,%zu>(M,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
95 return Vec<T, SIMD_WIDTH>();
96}
97
98// 06. Feb 23 (Jonas Keller): added reinterpret_mask
99
100template <typename Tout, typename Tin, size_t SIMD_WIDTH>
101static SIMD_INLINE Mask<Tout, SIMD_WIDTH> reinterpret_mask(
102 const Mask<Tin, SIMD_WIDTH> &)
103{
104 printf("reinterpret_mask<%s,%s,%zu>(M)\n", TypeInfo<Tout>::name(),
105 TypeInfo<Tin>::name(), SIMD_WIDTH);
106 return Mask<Tout, SIMD_WIDTH>();
107}
108
109template <size_t SIMD_WIDTH>
110static SIMD_INLINE Vec<Int, SIMD_WIDTH> mask_cvts(
111 const Vec<Int, SIMD_WIDTH> &, const Mask<Float, SIMD_WIDTH> &,
112 const Vec<Float, SIMD_WIDTH> &)
113{
114 printf("mask_cvts<%s,%s,%zu>(V,M,V)\n", TypeInfo<Int>::name(),
115 TypeInfo<Float>::name(), SIMD_WIDTH);
116 return Vec<Int, SIMD_WIDTH>();
117}
118
119template <size_t SIMD_WIDTH>
120static SIMD_INLINE Vec<Int, SIMD_WIDTH> maskz_cvts(
121 const Mask<Float, SIMD_WIDTH> &, const Vec<Float, SIMD_WIDTH> &)
122{
123 printf("maskz_cvts<%s,%s,%zu>(M,V)\n", TypeInfo<Int>::name(),
124 TypeInfo<Float>::name(), SIMD_WIDTH);
125 return Vec<Int, SIMD_WIDTH>();
126}
127
128template <size_t SIMD_WIDTH>
129static SIMD_INLINE Vec<Float, SIMD_WIDTH> mask_cvts(
130 const Vec<Float, SIMD_WIDTH> &, const Mask<Int, SIMD_WIDTH> &,
131 const Vec<Int, SIMD_WIDTH> &)
132{
133 printf("mask_cvts<%s,%s,%zu>(V,M,V)\n", TypeInfo<Float>::name(),
134 TypeInfo<Int>::name(), SIMD_WIDTH);
135 return Vec<Float, SIMD_WIDTH>();
136}
137
138template <size_t SIMD_WIDTH>
139static SIMD_INLINE Vec<Float, SIMD_WIDTH> maskz_cvts(
140 const Mask<Int, SIMD_WIDTH> &, const Vec<Int, SIMD_WIDTH> &)
141{
142 printf("maskz_cvts<%s,%s,%zu>(M,V)\n", TypeInfo<Float>::name(),
143 TypeInfo<Int>::name(), SIMD_WIDTH);
144 return Vec<Float, SIMD_WIDTH>();
145}
146
147template <typename T, size_t SIMD_WIDTH>
148static SIMD_INLINE Vec<T, SIMD_WIDTH> mask_set1(const Vec<T, SIMD_WIDTH> &,
149 const Mask<T, SIMD_WIDTH> &,
150 const T &)
151{
152 printf("mask_set1<%s,%zu>(V,M,T)\n", TypeInfo<T>::name(), SIMD_WIDTH);
153 return Vec<T, SIMD_WIDTH>();
154}
155
156template <typename T, size_t SIMD_WIDTH>
157static SIMD_INLINE Vec<T, SIMD_WIDTH> maskz_set1(const Mask<T, SIMD_WIDTH> &,
158 const T &)
159{
160 printf("maskz_set1<%s,%zu>(M,T)\n", TypeInfo<T>::name(), SIMD_WIDTH);
161 return Vec<T, SIMD_WIDTH>();
162}
163
164template <typename T, size_t SIMD_WIDTH>
165static SIMD_INLINE Vec<T, SIMD_WIDTH> mask_load(const Vec<T, SIMD_WIDTH> &,
166 const Mask<T, SIMD_WIDTH> &,
167 const T *const p)
168{
169 printf("mask_load<%s,%zu>(V,M,%p)\n", TypeInfo<T>::name(), SIMD_WIDTH,
170 (void *) p);
171 return Vec<T, SIMD_WIDTH>();
172}
173
174template <typename T, size_t SIMD_WIDTH>
175static SIMD_INLINE Vec<T, SIMD_WIDTH> maskz_load(const Mask<T, SIMD_WIDTH> &,
176 const T *const p)
177{
178 printf("maskz_load<%s,%zu>(M,%p)\n", TypeInfo<T>::name(), SIMD_WIDTH,
179 (void *) p);
180 return Vec<T, SIMD_WIDTH>();
181}
182
183template <typename T, size_t SIMD_WIDTH>
184static SIMD_INLINE Vec<T, SIMD_WIDTH> mask_loadu(const Vec<T, SIMD_WIDTH> &,
185 const Mask<T, SIMD_WIDTH> &,
186 const T *const p)
187{
188 printf("mask_loadu<%s,%zu>(V,M,%p)\n", TypeInfo<T>::name(), SIMD_WIDTH,
189 (void *) p);
190 return Vec<T, SIMD_WIDTH>();
191}
192
193template <typename T, size_t SIMD_WIDTH>
194static SIMD_INLINE Vec<T, SIMD_WIDTH> maskz_loadu(const Mask<T, SIMD_WIDTH> &,
195 const T *const p)
196{
197 printf("maskz_loadu<%s,%zu>(M,%p)\n", TypeInfo<T>::name(), SIMD_WIDTH,
198 (void *) p);
199 return Vec<T, SIMD_WIDTH>();
200}
201
202template <typename T, size_t SIMD_WIDTH>
203static SIMD_INLINE void mask_store(T *const p, const Mask<T, SIMD_WIDTH> &,
204 const Vec<T, SIMD_WIDTH> &)
205{
206 printf("mask_store<%s,%zu>(%p,M,V)\n", TypeInfo<T>::name(), SIMD_WIDTH,
207 (void *) p);
208}
209
210template <typename T, size_t SIMD_WIDTH>
211static SIMD_INLINE void mask_storeu(T *const p, const Mask<T, SIMD_WIDTH> &,
212 const Vec<T, SIMD_WIDTH> &)
213{
214 printf("mask_storeu<%s,%zu>(%p,M,V)\n", TypeInfo<T>::name(), SIMD_WIDTH,
215 (void *) p);
216}
217
218template <typename T, size_t SIMD_WIDTH>
219static SIMD_INLINE Vec<T, SIMD_WIDTH> mask_add(const Vec<T, SIMD_WIDTH> &,
220 const Mask<T, SIMD_WIDTH> &,
221 const Vec<T, SIMD_WIDTH> &,
222 const Vec<T, SIMD_WIDTH> &)
223{
224 printf("mask_add<%s,%zu>(V,M,V,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
225 return Vec<T, SIMD_WIDTH>();
226}
227
228template <typename T, size_t SIMD_WIDTH>
229static SIMD_INLINE Vec<T, SIMD_WIDTH> maskz_add(const Mask<T, SIMD_WIDTH> &,
230 const Vec<T, SIMD_WIDTH> &,
231 const Vec<T, SIMD_WIDTH> &)
232{
233 printf("maskz_add<%s,%zu>(M,V,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
234 return Vec<T, SIMD_WIDTH>();
235}
236
237template <typename T, size_t SIMD_WIDTH>
238static SIMD_INLINE Vec<T, SIMD_WIDTH> mask_adds(const Vec<T, SIMD_WIDTH> &,
239 const Mask<T, SIMD_WIDTH> &,
240 const Vec<T, SIMD_WIDTH> &,
241 const Vec<T, SIMD_WIDTH> &)
242{
243 printf("mask_adds<%s,%zu>(V,M,V,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
244 return Vec<T, SIMD_WIDTH>();
245}
246
247template <typename T, size_t SIMD_WIDTH>
248static SIMD_INLINE Vec<T, SIMD_WIDTH> maskz_adds(const Mask<T, SIMD_WIDTH> &,
249 const Vec<T, SIMD_WIDTH> &,
250 const Vec<T, SIMD_WIDTH> &)
251{
252 printf("maskz_adds<%s,%zu>(M,V,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
253 return Vec<T, SIMD_WIDTH>();
254}
255
256template <typename T, size_t SIMD_WIDTH>
257static SIMD_INLINE Vec<T, SIMD_WIDTH> mask_sub(const Vec<T, SIMD_WIDTH> &,
258 const Mask<T, SIMD_WIDTH> &,
259 const Vec<T, SIMD_WIDTH> &,
260 const Vec<T, SIMD_WIDTH> &)
261{
262 printf("mask_sub<%s,%zu>(V,M,V,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
263 return Vec<T, SIMD_WIDTH>();
264}
265
266template <typename T, size_t SIMD_WIDTH>
267static SIMD_INLINE Vec<T, SIMD_WIDTH> maskz_sub(const Mask<T, SIMD_WIDTH> &,
268 const Vec<T, SIMD_WIDTH> &,
269 const Vec<T, SIMD_WIDTH> &)
270{
271 printf("maskz_sub<%s,%zu>(M,V,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
272 return Vec<T, SIMD_WIDTH>();
273}
274
275template <typename T, size_t SIMD_WIDTH>
276static SIMD_INLINE Vec<T, SIMD_WIDTH> mask_subs(const Vec<T, SIMD_WIDTH> &,
277 const Mask<T, SIMD_WIDTH> &,
278 const Vec<T, SIMD_WIDTH> &,
279 const Vec<T, SIMD_WIDTH> &)
280{
281 printf("mask_subs<%s,%zu>(V,M,V,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
282 return Vec<T, SIMD_WIDTH>();
283}
284
285template <typename T, size_t SIMD_WIDTH>
286static SIMD_INLINE Vec<T, SIMD_WIDTH> maskz_subs(const Mask<T, SIMD_WIDTH> &,
287 const Vec<T, SIMD_WIDTH> &,
288 const Vec<T, SIMD_WIDTH> &)
289{
290 printf("maskz_subs<%s,%zu>(M,V,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
291 return Vec<T, SIMD_WIDTH>();
292}
293
294template <typename T, size_t SIMD_WIDTH>
295static SIMD_INLINE Vec<T, SIMD_WIDTH> mask_mul(const Vec<T, SIMD_WIDTH> &,
296 const Mask<T, SIMD_WIDTH> &,
297 const Vec<T, SIMD_WIDTH> &,
298 const Vec<T, SIMD_WIDTH> &)
299{
300 printf("mask_mul<%s,%zu>(V,M,V,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
301 return Vec<T, SIMD_WIDTH>();
302}
303
304template <typename T, size_t SIMD_WIDTH>
305static SIMD_INLINE Vec<T, SIMD_WIDTH> maskz_mul(const Mask<T, SIMD_WIDTH> &,
306 const Vec<T, SIMD_WIDTH> &,
307 const Vec<T, SIMD_WIDTH> &)
308{
309 printf("maskz_mul<%s,%zu>(M,V,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
310 return Vec<T, SIMD_WIDTH>();
311}
312
313template <typename T, size_t SIMD_WIDTH>
314static SIMD_INLINE Vec<T, SIMD_WIDTH> mask_div(const Vec<T, SIMD_WIDTH> &,
315 const Mask<T, SIMD_WIDTH> &,
316 const Vec<T, SIMD_WIDTH> &,
317 const Vec<T, SIMD_WIDTH> &)
318{
319 printf("mask_div<%s,%zu>(V,M,V,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
320 return Vec<T, SIMD_WIDTH>();
321}
322
323template <typename T, size_t SIMD_WIDTH>
324static SIMD_INLINE Vec<T, SIMD_WIDTH> maskz_div(const Mask<T, SIMD_WIDTH> &,
325 const Vec<T, SIMD_WIDTH> &,
326 const Vec<T, SIMD_WIDTH> &)
327{
328 printf("maskz_div<%s,%zu>(M,V,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
329 return Vec<T, SIMD_WIDTH>();
330}
331
332template <typename T, size_t SIMD_WIDTH>
333static SIMD_INLINE Vec<T, SIMD_WIDTH> mask_ceil(const Vec<T, SIMD_WIDTH> &,
334 const Mask<T, SIMD_WIDTH> &,
335 const Vec<T, SIMD_WIDTH> &)
336{
337 printf("mask_ceil<%s,%zu>(V,M,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
338 return Vec<T, SIMD_WIDTH>();
339}
340
341template <typename T, size_t SIMD_WIDTH>
342static SIMD_INLINE Vec<T, SIMD_WIDTH> maskz_ceil(const Mask<T, SIMD_WIDTH> &,
343 const Vec<T, SIMD_WIDTH> &)
344{
345 printf("maskz_ceil<%s,%zu>(M,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
346 return Vec<T, SIMD_WIDTH>();
347}
348
349template <typename T, size_t SIMD_WIDTH>
350static SIMD_INLINE Vec<T, SIMD_WIDTH> mask_floor(const Vec<T, SIMD_WIDTH> &,
351 const Mask<T, SIMD_WIDTH> &,
352 const Vec<T, SIMD_WIDTH> &)
353{
354 printf("mask_floor<%s,%zu>(V,M,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
355 return Vec<T, SIMD_WIDTH>();
356}
357
358template <typename T, size_t SIMD_WIDTH>
359static SIMD_INLINE Vec<T, SIMD_WIDTH> maskz_floor(const Mask<T, SIMD_WIDTH> &,
360 const Vec<T, SIMD_WIDTH> &)
361{
362 printf("maskz_floor<%s,%zu>(M,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
363 return Vec<T, SIMD_WIDTH>();
364}
365
366template <typename T, size_t SIMD_WIDTH>
367static SIMD_INLINE Vec<T, SIMD_WIDTH> mask_round(const Vec<T, SIMD_WIDTH> &,
368 const Mask<T, SIMD_WIDTH> &,
369 const Vec<T, SIMD_WIDTH> &)
370{
371 printf("mask_round<%s,%zu>(V,M,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
372 return Vec<T, SIMD_WIDTH>();
373}
374
375template <typename T, size_t SIMD_WIDTH>
376static SIMD_INLINE Vec<T, SIMD_WIDTH> maskz_round(const Mask<T, SIMD_WIDTH> &,
377 const Vec<T, SIMD_WIDTH> &)
378{
379 printf("maskz_round<%s,%zu>(M,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
380 return Vec<T, SIMD_WIDTH>();
381}
382
383template <typename T, size_t SIMD_WIDTH>
384static SIMD_INLINE Vec<T, SIMD_WIDTH> mask_truncate(const Vec<T, SIMD_WIDTH> &,
385 const Mask<T, SIMD_WIDTH> &,
386 const Vec<T, SIMD_WIDTH> &)
387{
388 printf("mask_truncate<%s,%zu>(V,M,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
389 return Vec<T, SIMD_WIDTH>();
390}
391
392template <typename T, size_t SIMD_WIDTH>
393static SIMD_INLINE Vec<T, SIMD_WIDTH> maskz_truncate(
394 const Mask<T, SIMD_WIDTH> &, const Vec<T, SIMD_WIDTH> &)
395{
396 printf("maskz_truncate<%s,%zu>(M,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
397 return Vec<T, SIMD_WIDTH>();
398}
399
400template <typename T, size_t SIMD_WIDTH>
401static SIMD_INLINE Vec<T, SIMD_WIDTH> mask_rcp(const Vec<T, SIMD_WIDTH> &,
402 const Mask<T, SIMD_WIDTH> &,
403 const Vec<T, SIMD_WIDTH> &)
404{
405 printf("mask_rcp<%s,%zu>(V,M,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
406 return Vec<T, SIMD_WIDTH>();
407}
408
409template <typename T, size_t SIMD_WIDTH>
410static SIMD_INLINE Vec<T, SIMD_WIDTH> maskz_rcp(const Mask<T, SIMD_WIDTH> &,
411 const Vec<T, SIMD_WIDTH> &)
412{
413 printf("maskz_rcp<%s,%zu>(M,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
414 return Vec<T, SIMD_WIDTH>();
415}
416
417template <typename T, size_t SIMD_WIDTH>
418static SIMD_INLINE Vec<T, SIMD_WIDTH> mask_rsqrt(const Vec<T, SIMD_WIDTH> &,
419 const Mask<T, SIMD_WIDTH> &,
420 const Vec<T, SIMD_WIDTH> &)
421{
422 printf("mask_rsqrt<%s,%zu>(V,M,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
423 return Vec<T, SIMD_WIDTH>();
424}
425
426template <typename T, size_t SIMD_WIDTH>
427static SIMD_INLINE Vec<T, SIMD_WIDTH> maskz_rsqrt(const Mask<T, SIMD_WIDTH> &,
428 const Vec<T, SIMD_WIDTH> &)
429{
430 printf("maskz_rsqrt<%s,%zu>(M,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
431 return Vec<T, SIMD_WIDTH>();
432}
433
434template <typename T, size_t SIMD_WIDTH>
435static SIMD_INLINE Vec<T, SIMD_WIDTH> mask_sqrt(const Vec<T, SIMD_WIDTH> &,
436 const Mask<T, SIMD_WIDTH> &,
437 const Vec<T, SIMD_WIDTH> &)
438{
439 printf("mask_sqrt<%s,%zu>(V,M,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
440 return Vec<T, SIMD_WIDTH>();
441}
442
443template <typename T, size_t SIMD_WIDTH>
444static SIMD_INLINE Vec<T, SIMD_WIDTH> maskz_sqrt(const Mask<T, SIMD_WIDTH> &,
445 const Vec<T, SIMD_WIDTH> &)
446{
447 printf("maskz_sqrt<%s,%zu>(M,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
448 return Vec<T, SIMD_WIDTH>();
449}
450
451template <typename T, size_t SIMD_WIDTH>
452static SIMD_INLINE Vec<T, SIMD_WIDTH> mask_abs(const Vec<T, SIMD_WIDTH> &,
453 const Mask<T, SIMD_WIDTH> &,
454 const Vec<T, SIMD_WIDTH> &)
455{
456 printf("mask_abs<%s,%zu>(V,M,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
457 return Vec<T, SIMD_WIDTH>();
458}
459
460template <typename T, size_t SIMD_WIDTH>
461static SIMD_INLINE Vec<T, SIMD_WIDTH> maskz_abs(const Mask<T, SIMD_WIDTH> &,
462 const Vec<T, SIMD_WIDTH> &)
463{
464 printf("maskz_abs<%s,%zu>(M,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
465 return Vec<T, SIMD_WIDTH>();
466}
467
468template <typename T, size_t SIMD_WIDTH>
469static SIMD_INLINE Vec<T, SIMD_WIDTH> mask_and(const Vec<T, SIMD_WIDTH> &,
470 const Mask<T, SIMD_WIDTH> &,
471 const Vec<T, SIMD_WIDTH> &,
472 const Vec<T, SIMD_WIDTH> &)
473{
474 printf("mask_and<%s,%zu>(V,M,V,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
475 return Vec<T, SIMD_WIDTH>();
476}
477
478template <typename T, size_t SIMD_WIDTH>
479static SIMD_INLINE Vec<T, SIMD_WIDTH> maskz_and(const Mask<T, SIMD_WIDTH> &,
480 const Vec<T, SIMD_WIDTH> &,
481 const Vec<T, SIMD_WIDTH> &)
482{
483 printf("maskz_and<%s,%zu>(M,V,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
484 return Vec<T, SIMD_WIDTH>();
485}
486
487template <typename T, size_t SIMD_WIDTH>
488static SIMD_INLINE Vec<T, SIMD_WIDTH> mask_or(const Vec<T, SIMD_WIDTH> &,
489 const Mask<T, SIMD_WIDTH> &,
490 const Vec<T, SIMD_WIDTH> &,
491 const Vec<T, SIMD_WIDTH> &)
492{
493 printf("mask_or<%s,%zu>(V,M,V,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
494 return Vec<T, SIMD_WIDTH>();
495}
496
497template <typename T, size_t SIMD_WIDTH>
498static SIMD_INLINE Vec<T, SIMD_WIDTH> maskz_or(const Mask<T, SIMD_WIDTH> &,
499 const Vec<T, SIMD_WIDTH> &,
500 const Vec<T, SIMD_WIDTH> &)
501{
502 printf("maskz_or<%s,%zu>(M,V,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
503 return Vec<T, SIMD_WIDTH>();
504}
505
506template <typename T, size_t SIMD_WIDTH>
507static SIMD_INLINE Vec<T, SIMD_WIDTH> mask_andnot(const Vec<T, SIMD_WIDTH> &,
508 const Mask<T, SIMD_WIDTH> &,
509 const Vec<T, SIMD_WIDTH> &,
510 const Vec<T, SIMD_WIDTH> &)
511{
512 printf("mask_andnot<%s,%zu>(V,M,V,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
513 return Vec<T, SIMD_WIDTH>();
514}
515
516template <typename T, size_t SIMD_WIDTH>
517static SIMD_INLINE Vec<T, SIMD_WIDTH> maskz_andnot(const Mask<T, SIMD_WIDTH> &,
518 const Vec<T, SIMD_WIDTH> &,
519 const Vec<T, SIMD_WIDTH> &)
520{
521 printf("maskz_andnot<%s,%zu>(M,V,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
522 return Vec<T, SIMD_WIDTH>();
523}
524
525template <typename T, size_t SIMD_WIDTH>
526static SIMD_INLINE Vec<T, SIMD_WIDTH> mask_xor(const Vec<T, SIMD_WIDTH> &,
527 const Mask<T, SIMD_WIDTH> &,
528 const Vec<T, SIMD_WIDTH> &,
529 const Vec<T, SIMD_WIDTH> &)
530{
531 printf("mask_xor<%s,%zu>(V,M,V,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
532 return Vec<T, SIMD_WIDTH>();
533}
534
535template <typename T, size_t SIMD_WIDTH>
536static SIMD_INLINE Vec<T, SIMD_WIDTH> maskz_xor(const Mask<T, SIMD_WIDTH> &,
537 const Vec<T, SIMD_WIDTH> &,
538 const Vec<T, SIMD_WIDTH> &)
539{
540 printf("maskz_xor<%s,%zu>(M,V,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
541 return Vec<T, SIMD_WIDTH>();
542}
543
544template <typename T, size_t SIMD_WIDTH>
545static SIMD_INLINE Vec<T, SIMD_WIDTH> mask_not(const Vec<T, SIMD_WIDTH> &,
546 const Mask<T, SIMD_WIDTH> &,
547 const Vec<T, SIMD_WIDTH> &)
548{
549 printf("mask_not<%s,%zu>(V,M,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
550 return Vec<T, SIMD_WIDTH>();
551}
552
553template <typename T, size_t SIMD_WIDTH>
554static SIMD_INLINE Vec<T, SIMD_WIDTH> maskz_not(const Mask<T, SIMD_WIDTH> &,
555 const Vec<T, SIMD_WIDTH> &)
556{
557 printf("maskz_not<%s,%zu>(M,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
558 return Vec<T, SIMD_WIDTH>();
559}
560
561template <typename T, size_t SIMD_WIDTH>
562static SIMD_INLINE Vec<T, SIMD_WIDTH> mask_neg(const Vec<T, SIMD_WIDTH> &,
563 const Mask<T, SIMD_WIDTH> &,
564 const Vec<T, SIMD_WIDTH> &)
565{
566 printf("mask_neg<%s,%zu>(V,M,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
567 return Vec<T, SIMD_WIDTH>();
568}
569
570template <typename T, size_t SIMD_WIDTH>
571static SIMD_INLINE Vec<T, SIMD_WIDTH> maskz_neg(const Mask<T, SIMD_WIDTH> &,
572 const Vec<T, SIMD_WIDTH> &)
573{
574 printf("maskz_neg<%s,%zu>(M,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
575 return Vec<T, SIMD_WIDTH>();
576}
577
578template <typename T, size_t SIMD_WIDTH>
579static SIMD_INLINE Vec<T, SIMD_WIDTH> mask_min(const Vec<T, SIMD_WIDTH> &,
580 const Mask<T, SIMD_WIDTH> &,
581 const Vec<T, SIMD_WIDTH> &,
582 const Vec<T, SIMD_WIDTH> &)
583{
584 printf("mask_min<%s,%zu>(V,M,V,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
585 return Vec<T, SIMD_WIDTH>();
586}
587
588template <typename T, size_t SIMD_WIDTH>
589static SIMD_INLINE Vec<T, SIMD_WIDTH> maskz_min(const Mask<T, SIMD_WIDTH> &,
590 const Vec<T, SIMD_WIDTH> &,
591 const Vec<T, SIMD_WIDTH> &)
592{
593 printf("maskz_min<%s,%zu>(M,V,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
594 return Vec<T, SIMD_WIDTH>();
595}
596
597template <typename T, size_t SIMD_WIDTH>
598static SIMD_INLINE Vec<T, SIMD_WIDTH> mask_max(const Vec<T, SIMD_WIDTH> &,
599 const Mask<T, SIMD_WIDTH> &,
600 const Vec<T, SIMD_WIDTH> &,
601 const Vec<T, SIMD_WIDTH> &)
602{
603 printf("mask_max<%s,%zu>(V,M,V,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
604 return Vec<T, SIMD_WIDTH>();
605}
606
607template <typename T, size_t SIMD_WIDTH>
608static SIMD_INLINE Vec<T, SIMD_WIDTH> maskz_max(const Mask<T, SIMD_WIDTH> &,
609 const Vec<T, SIMD_WIDTH> &,
610 const Vec<T, SIMD_WIDTH> &)
611{
612 printf("maskz_max<%s,%zu>(M,V,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
613 return Vec<T, SIMD_WIDTH>();
614}
615
616template <typename T, size_t SIMD_WIDTH>
617static SIMD_INLINE Vec<T, SIMD_WIDTH> mask_div2r0(const Vec<T, SIMD_WIDTH> &,
618 const Mask<T, SIMD_WIDTH> &,
619 const Vec<T, SIMD_WIDTH> &)
620{
621 printf("mask_div2r0<%s,%zu>(V,M,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
622 return Vec<T, SIMD_WIDTH>();
623}
624
625template <typename T, size_t SIMD_WIDTH>
626static SIMD_INLINE Vec<T, SIMD_WIDTH> maskz_div2r0(const Mask<T, SIMD_WIDTH> &,
627 const Vec<T, SIMD_WIDTH> &)
628{
629 printf("maskz_div2r0<%s,%zu>(M,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
630 return Vec<T, SIMD_WIDTH>();
631}
632
633template <typename T, size_t SIMD_WIDTH>
634static SIMD_INLINE Vec<T, SIMD_WIDTH> mask_div2rd(const Vec<T, SIMD_WIDTH> &,
635 const Mask<T, SIMD_WIDTH> &,
636 const Vec<T, SIMD_WIDTH> &)
637{
638 printf("mask_div2rd<%s,%zu>(V,M,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
639 return Vec<T, SIMD_WIDTH>();
640}
641
642template <typename T, size_t SIMD_WIDTH>
643static SIMD_INLINE Vec<T, SIMD_WIDTH> maskz_div2rd(const Mask<T, SIMD_WIDTH> &,
644 const Vec<T, SIMD_WIDTH> &)
645{
646 printf("maskz_div2rd<%s,%zu>(M,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
647 return Vec<T, SIMD_WIDTH>();
648}
649
650template <size_t COUNT, typename T, size_t SIMD_WIDTH>
651static SIMD_INLINE Vec<T, SIMD_WIDTH> mask_srai(const Vec<T, SIMD_WIDTH> &,
652 const Mask<T, SIMD_WIDTH> &,
653 const Vec<T, SIMD_WIDTH> &)
654{
655 printf("mask_srai<%zu,%s,%zu>(V,M,V)\n", COUNT, TypeInfo<T>::name(),
656 SIMD_WIDTH);
657 return Vec<T, SIMD_WIDTH>();
658}
659
660template <size_t COUNT, typename T, size_t SIMD_WIDTH>
661static SIMD_INLINE Vec<T, SIMD_WIDTH> maskz_srai(const Mask<T, SIMD_WIDTH> &,
662 const Vec<T, SIMD_WIDTH> &)
663{
664 printf("maskz_srai<%zu,%s,%zu>(M,V)\n", COUNT, TypeInfo<T>::name(),
665 SIMD_WIDTH);
666 return Vec<T, SIMD_WIDTH>();
667}
668
669template <size_t COUNT, typename T, size_t SIMD_WIDTH>
670static SIMD_INLINE Vec<T, SIMD_WIDTH> mask_srli(const Vec<T, SIMD_WIDTH> &,
671 const Mask<T, SIMD_WIDTH> &,
672 const Vec<T, SIMD_WIDTH> &)
673{
674 printf("mask_srli<%zu,%s,%zu>(V,M,V)\n", COUNT, TypeInfo<T>::name(),
675 SIMD_WIDTH);
676 return Vec<T, SIMD_WIDTH>();
677}
678
679template <size_t COUNT, typename T, size_t SIMD_WIDTH>
680static SIMD_INLINE Vec<T, SIMD_WIDTH> maskz_srli(const Mask<T, SIMD_WIDTH> &,
681 const Vec<T, SIMD_WIDTH> &)
682{
683 printf("maskz_srli<%zu,%s,%zu>(M,V)\n", COUNT, TypeInfo<T>::name(),
684 SIMD_WIDTH);
685 return Vec<T, SIMD_WIDTH>();
686}
687
688template <size_t COUNT, typename T, size_t SIMD_WIDTH>
689static SIMD_INLINE Vec<T, SIMD_WIDTH> mask_slli(const Vec<T, SIMD_WIDTH> &,
690 const Mask<T, SIMD_WIDTH> &,
691 const Vec<T, SIMD_WIDTH> &)
692{
693 printf("mask_slli<%zu,%s,%zu>(V,M,V)\n", COUNT, TypeInfo<T>::name(),
694 SIMD_WIDTH);
695 return Vec<T, SIMD_WIDTH>();
696}
697
698template <size_t COUNT, typename T, size_t SIMD_WIDTH>
699static SIMD_INLINE Vec<T, SIMD_WIDTH> maskz_slli(const Mask<T, SIMD_WIDTH> &,
700 const Vec<T, SIMD_WIDTH> &)
701{
702 printf("maskz_slli<%zu,%s,%zu>(M,V)\n", COUNT, TypeInfo<T>::name(),
703 SIMD_WIDTH);
704 return Vec<T, SIMD_WIDTH>();
705}
706
707template <typename T, size_t SIMD_WIDTH>
708static SIMD_INLINE Vec<T, SIMD_WIDTH> mask_hadd(const Vec<T, SIMD_WIDTH> &,
709 const Mask<T, SIMD_WIDTH> &,
710 const Vec<T, SIMD_WIDTH> &,
711 const Vec<T, SIMD_WIDTH> &)
712{
713 printf("mask_hadd<%s,%zu>(V,M,V,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
714 return Vec<T, SIMD_WIDTH>();
715}
716
717template <typename T, size_t SIMD_WIDTH>
718static SIMD_INLINE Vec<T, SIMD_WIDTH> maskz_hadd(const Mask<T, SIMD_WIDTH> &,
719 const Vec<T, SIMD_WIDTH> &,
720 const Vec<T, SIMD_WIDTH> &)
721{
722 printf("maskz_hadd<%s,%zu>(M,V,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
723 return Vec<T, SIMD_WIDTH>();
724}
725
726template <typename T, size_t SIMD_WIDTH>
727static SIMD_INLINE Vec<T, SIMD_WIDTH> mask_hadds(const Vec<T, SIMD_WIDTH> &,
728 const Mask<T, SIMD_WIDTH> &,
729 const Vec<T, SIMD_WIDTH> &,
730 const Vec<T, SIMD_WIDTH> &)
731{
732 printf("mask_hadds<%s,%zu>(V,M,V,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
733 return Vec<T, SIMD_WIDTH>();
734}
735
736template <typename T, size_t SIMD_WIDTH>
737static SIMD_INLINE Vec<T, SIMD_WIDTH> maskz_hadds(const Mask<T, SIMD_WIDTH> &,
738 const Vec<T, SIMD_WIDTH> &,
739 const Vec<T, SIMD_WIDTH> &)
740{
741 printf("maskz_hadds<%s,%zu>(M,V,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
742 return Vec<T, SIMD_WIDTH>();
743}
744
745template <typename T, size_t SIMD_WIDTH>
746static SIMD_INLINE Vec<T, SIMD_WIDTH> mask_hsub(const Vec<T, SIMD_WIDTH> &,
747 const Mask<T, SIMD_WIDTH> &,
748 const Vec<T, SIMD_WIDTH> &,
749 const Vec<T, SIMD_WIDTH> &)
750{
751 printf("mask_hsub<%s,%zu>(V,M,V,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
752 return Vec<T, SIMD_WIDTH>();
753}
754
755template <typename T, size_t SIMD_WIDTH>
756static SIMD_INLINE Vec<T, SIMD_WIDTH> maskz_hsub(const Mask<T, SIMD_WIDTH> &,
757 const Vec<T, SIMD_WIDTH> &,
758 const Vec<T, SIMD_WIDTH> &)
759{
760 printf("maskz_hsub<%s,%zu>(M,V,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
761 return Vec<T, SIMD_WIDTH>();
762}
763
764template <typename T, size_t SIMD_WIDTH>
765static SIMD_INLINE Vec<T, SIMD_WIDTH> mask_hsubs(const Vec<T, SIMD_WIDTH> &,
766 const Mask<T, SIMD_WIDTH> &,
767 const Vec<T, SIMD_WIDTH> &,
768 const Vec<T, SIMD_WIDTH> &)
769{
770 printf("mask_hsubs<%s,%zu>(V,M,V,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
771 return Vec<T, SIMD_WIDTH>();
772}
773
774template <typename T, size_t SIMD_WIDTH>
775static SIMD_INLINE Vec<T, SIMD_WIDTH> maskz_hsubs(const Mask<T, SIMD_WIDTH> &,
776 const Vec<T, SIMD_WIDTH> &,
777 const Vec<T, SIMD_WIDTH> &)
778{
779 printf("maskz_hsubs<%s,%zu>(M,V,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
780 return Vec<T, SIMD_WIDTH>();
781}
782
783template <typename T, size_t SIMD_WIDTH>
784static SIMD_INLINE Mask<T, SIMD_WIDTH> mask_cmplt(const Mask<T, SIMD_WIDTH> &,
785 const Vec<T, SIMD_WIDTH> &,
786 const Vec<T, SIMD_WIDTH> &)
787{
788 printf("mask_cmplt<%s,%zu>(M,V,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
789 return Mask<T, SIMD_WIDTH>();
790}
791
792template <typename T, size_t SIMD_WIDTH>
793static SIMD_INLINE Mask<T, SIMD_WIDTH> mask_cmple(const Mask<T, SIMD_WIDTH> &,
794 const Vec<T, SIMD_WIDTH> &,
795 const Vec<T, SIMD_WIDTH> &)
796{
797 printf("mask_cmple<%s,%zu>(M,V,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
798 return Mask<T, SIMD_WIDTH>();
799}
800
801template <typename T, size_t SIMD_WIDTH>
802static SIMD_INLINE Mask<T, SIMD_WIDTH> mask_cmpeq(const Mask<T, SIMD_WIDTH> &,
803 const Vec<T, SIMD_WIDTH> &,
804 const Vec<T, SIMD_WIDTH> &)
805{
806 printf("mask_cmpeq<%s,%zu>(M,V,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
807 return Mask<T, SIMD_WIDTH>();
808}
809
810template <typename T, size_t SIMD_WIDTH>
811static SIMD_INLINE Mask<T, SIMD_WIDTH> mask_cmpgt(const Mask<T, SIMD_WIDTH> &,
812 const Vec<T, SIMD_WIDTH> &,
813 const Vec<T, SIMD_WIDTH> &)
814{
815 printf("mask_cmpgt<%s,%zu>(M,V,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
816 return Mask<T, SIMD_WIDTH>();
817}
818
819template <typename T, size_t SIMD_WIDTH>
820static SIMD_INLINE Mask<T, SIMD_WIDTH> mask_cmpge(const Mask<T, SIMD_WIDTH> &,
821 const Vec<T, SIMD_WIDTH> &,
822 const Vec<T, SIMD_WIDTH> &)
823{
824 printf("mask_cmpge<%s,%zu>(M,V,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
825 return Mask<T, SIMD_WIDTH>();
826}
827
828template <typename T, size_t SIMD_WIDTH>
829static SIMD_INLINE Mask<T, SIMD_WIDTH> mask_cmpneq(const Mask<T, SIMD_WIDTH> &,
830 const Vec<T, SIMD_WIDTH> &,
831 const Vec<T, SIMD_WIDTH> &)
832{
833 printf("mask_cmpneq<%s,%zu>(M,V,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
834 return Mask<T, SIMD_WIDTH>();
835}
836
837// 12. Jan 23 (Jonas Keller): added overloaded versions of mask_cmp*
838// that only take two vector parameters and no mask parameter
839
840template <typename T, size_t SIMD_WIDTH>
841static SIMD_INLINE Mask<T, SIMD_WIDTH> mask_cmplt(const Vec<T, SIMD_WIDTH> &,
842 const Vec<T, SIMD_WIDTH> &)
843{
844 printf("mask_cmplt<%s,%zu>(V,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
845 return Mask<T, SIMD_WIDTH>();
846}
847
848template <typename T, size_t SIMD_WIDTH>
849static SIMD_INLINE Mask<T, SIMD_WIDTH> mask_cmple(const Vec<T, SIMD_WIDTH> &,
850 const Vec<T, SIMD_WIDTH> &)
851{
852 printf("mask_cmple<%s,%zu>(V,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
853 return Mask<T, SIMD_WIDTH>();
854}
855
856template <typename T, size_t SIMD_WIDTH>
857static SIMD_INLINE Mask<T, SIMD_WIDTH> mask_cmpeq(const Vec<T, SIMD_WIDTH> &,
858 const Vec<T, SIMD_WIDTH> &)
859{
860 printf("mask_cmpeq<%s,%zu>(V,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
861 return Mask<T, SIMD_WIDTH>();
862}
863
864template <typename T, size_t SIMD_WIDTH>
865static SIMD_INLINE Mask<T, SIMD_WIDTH> mask_cmpgt(const Vec<T, SIMD_WIDTH> &,
866 const Vec<T, SIMD_WIDTH> &)
867{
868 printf("mask_cmpgt<%s,%zu>(V,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
869 return Mask<T, SIMD_WIDTH>();
870}
871
872template <typename T, size_t SIMD_WIDTH>
873static SIMD_INLINE Mask<T, SIMD_WIDTH> mask_cmpge(const Vec<T, SIMD_WIDTH> &,
874 const Vec<T, SIMD_WIDTH> &)
875{
876 printf("mask_cmpge<%s,%zu>(V,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
877 return Mask<T, SIMD_WIDTH>();
878}
879
880template <typename T, size_t SIMD_WIDTH>
881static SIMD_INLINE Mask<T, SIMD_WIDTH> mask_cmpneq(const Vec<T, SIMD_WIDTH> &,
882 const Vec<T, SIMD_WIDTH> &)
883{
884 printf("mask_cmpneq<%s,%zu>(V,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
885 return Mask<T, SIMD_WIDTH>();
886}
887
888template <typename T, size_t SIMD_WIDTH>
889static SIMD_INLINE Vec<T, SIMD_WIDTH> mask_avg(const Vec<T, SIMD_WIDTH> &,
890 const Mask<T, SIMD_WIDTH> &,
891 const Vec<T, SIMD_WIDTH> &,
892 const Vec<T, SIMD_WIDTH> &)
893{
894 printf("mask_avg<%s,%zu>(V,M,V,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
895 return Vec<T, SIMD_WIDTH>();
896}
897
898template <typename T, size_t SIMD_WIDTH>
899static SIMD_INLINE Vec<T, SIMD_WIDTH> maskz_avg(const Mask<T, SIMD_WIDTH> &,
900 const Vec<T, SIMD_WIDTH> &,
901 const Vec<T, SIMD_WIDTH> &)
902{
903 printf("maskz_avg<%s,%zu>(M,V,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
904 return Vec<T, SIMD_WIDTH>();
905}
906
907template <typename T, size_t SIMD_WIDTH>
908static SIMD_INLINE bool mask_test_all_zeros(const Mask<T, SIMD_WIDTH> &k,
909 const Vec<T, SIMD_WIDTH> &a)
910{
911 (void) k;
912 (void) a;
913 printf("mask_test_all_zeros<%s,%zu>(M,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
914 return 0;
915}
916
917template <typename T, size_t SIMD_WIDTH>
918static SIMD_INLINE bool mask_test_all_ones(const Mask<T, SIMD_WIDTH> &k,
919 const Vec<T, SIMD_WIDTH> &a)
920{
921 (void) k;
922 (void) a;
923 printf("mask_test_all_ones<%s,%zu>(M,V)\n", TypeInfo<T>::name(), SIMD_WIDTH);
924 return 0;
925}
926
927template <typename T, size_t SIMD_WIDTH>
928static SIMD_INLINE Mask<T, SIMD_WIDTH> kadd(const Mask<T, SIMD_WIDTH> &a,
929 const Mask<T, SIMD_WIDTH> &b)
930{
931 (void) a;
932 (void) b;
933 printf("kadd<%s,%zu>(M,M)\n", TypeInfo<T>::name(), SIMD_WIDTH);
934 return Mask<T, SIMD_WIDTH>();
935}
936
937template <typename T, size_t SIMD_WIDTH>
938static SIMD_INLINE Mask<T, SIMD_WIDTH> kand(const Mask<T, SIMD_WIDTH> &a,
939 const Mask<T, SIMD_WIDTH> &b)
940{
941 (void) a;
942 (void) b;
943 printf("kand<%s,%zu>(M,M)\n", TypeInfo<T>::name(), SIMD_WIDTH);
944 return Mask<T, SIMD_WIDTH>();
945}
946
947template <typename T, size_t SIMD_WIDTH>
948static SIMD_INLINE Mask<T, SIMD_WIDTH> kandn(const Mask<T, SIMD_WIDTH> &a,
949 const Mask<T, SIMD_WIDTH> &b)
950{
951 (void) a;
952 (void) b;
953 printf("kandn<%s,%zu>(M,M)\n", TypeInfo<T>::name(), SIMD_WIDTH);
954 return Mask<T, SIMD_WIDTH>();
955}
956
957template <typename T, size_t SIMD_WIDTH>
958static SIMD_INLINE Mask<T, SIMD_WIDTH> kor(const Mask<T, SIMD_WIDTH> &a,
959 const Mask<T, SIMD_WIDTH> &b)
960{
961 (void) a;
962 (void) b;
963 printf("kor<%s,%zu>(M,M)\n", TypeInfo<T>::name(), SIMD_WIDTH);
964 return Mask<T, SIMD_WIDTH>();
965}
966
967template <typename T, size_t SIMD_WIDTH>
968static SIMD_INLINE Mask<T, SIMD_WIDTH> kxor(const Mask<T, SIMD_WIDTH> &a,
969 const Mask<T, SIMD_WIDTH> &b)
970{
971 (void) a;
972 (void) b;
973 printf("kxor<%s,%zu>(M,M)\n", TypeInfo<T>::name(), SIMD_WIDTH);
974 return Mask<T, SIMD_WIDTH>();
975}
976
977template <typename T, size_t SIMD_WIDTH>
978static SIMD_INLINE Mask<T, SIMD_WIDTH> kxnor(const Mask<T, SIMD_WIDTH> &a,
979 const Mask<T, SIMD_WIDTH> &b)
980{
981 (void) a;
982 (void) b;
983 printf("kxnor<%s,%zu>(M,M)\n", TypeInfo<T>::name(), SIMD_WIDTH);
984 return Mask<T, SIMD_WIDTH>();
985}
986
987template <typename T, size_t SIMD_WIDTH>
988static SIMD_INLINE Mask<T, SIMD_WIDTH> knot(const Mask<T, SIMD_WIDTH> &a)
989{
990 (void) a;
991 printf("knot<%s,%zu>(M)\n", TypeInfo<T>::name(), SIMD_WIDTH);
992 return Mask<T, SIMD_WIDTH>();
993}
994
995template <size_t COUNT, typename T, size_t SIMD_WIDTH>
996static SIMD_INLINE Mask<T, SIMD_WIDTH> kshiftri(const Mask<T, SIMD_WIDTH> &a)
997{
998 (void) a;
999 printf("kshiftri<%zu, %s,%zu>(M,%zu)\n", COUNT, TypeInfo<T>::name(),
1000 SIMD_WIDTH, COUNT);
1001 return Mask<T, SIMD_WIDTH>();
1002}
1003
1004template <size_t COUNT, typename T, size_t SIMD_WIDTH>
1005static SIMD_INLINE Mask<T, SIMD_WIDTH> kshiftli(const Mask<T, SIMD_WIDTH> &a)
1006{
1007 (void) a;
1008 printf("kshiftli<%zu, %s,%zu>(M,%zu)\n", COUNT, TypeInfo<T>::name(),
1009 SIMD_WIDTH, COUNT);
1010 return Mask<T, SIMD_WIDTH>();
1011}
1012
1013template <typename T, size_t SIMD_WIDTH>
1014static SIMD_INLINE Mask<T, SIMD_WIDTH> kshiftri(const Mask<T, SIMD_WIDTH> &a,
1015 const uint64_t count)
1016{
1017 (void) a;
1018 printf("kshiftri<%s,%zu>(M,%zu)\n", TypeInfo<T>::name(), SIMD_WIDTH, count);
1019 return Mask<T, SIMD_WIDTH>();
1020}
1021
1022template <typename T, size_t SIMD_WIDTH>
1023static SIMD_INLINE Mask<T, SIMD_WIDTH> kshiftli(const Mask<T, SIMD_WIDTH> &a,
1024 const uint64_t count)
1025{
1026 (void) a;
1027 printf("kshiftli<%s,%zu>(M,%zu)\n", TypeInfo<T>::name(), SIMD_WIDTH, count);
1028 return Mask<T, SIMD_WIDTH>();
1029}
1030
1031// 12. Jan 23 (Jonas Keller): add setTrueRight and setTrueLeft
1032// 30. Jan 23 (Jonas Keller): removed setTrueLeft/Right and replaced them with
1033// mask_set_true/false_low/high.
1034
1035template <typename T, size_t SIMD_WIDTH>
1036static SIMD_INLINE Mask<T, SIMD_WIDTH> mask_set_true_low(const size_t x,
1037 OutputType<T>,
1038 Integer<SIMD_WIDTH>)
1039{
1040 printf("mask_set_true_low<%s,%zu>(%zu)\n", TypeInfo<T>::name(), SIMD_WIDTH,
1041 x);
1042 return Mask<T, SIMD_WIDTH>();
1043}
1044
1045template <typename T, size_t SIMD_WIDTH>
1046static SIMD_INLINE Mask<T, SIMD_WIDTH> mask_set_true_high(const size_t x,
1047 OutputType<T>,
1048 Integer<SIMD_WIDTH>)
1049{
1050 printf("mask_set_true_high<%s,%zu>(%zu)\n", TypeInfo<T>::name(), SIMD_WIDTH,
1051 x);
1052 return Mask<T, SIMD_WIDTH>();
1053}
1054
1055template <typename T, size_t SIMD_WIDTH>
1056static SIMD_INLINE Mask<T, SIMD_WIDTH> mask_set_false_low(const size_t x,
1057 OutputType<T>,
1058 Integer<SIMD_WIDTH>)
1059{
1060 printf("mask_set_false_low<%s,%zu>(%zu)\n", TypeInfo<T>::name(), SIMD_WIDTH,
1061 x);
1062 return Mask<T, SIMD_WIDTH>();
1063}
1064
1065template <typename T, size_t SIMD_WIDTH>
1066static SIMD_INLINE Mask<T, SIMD_WIDTH> mask_set_false_high(const size_t x,
1067 OutputType<T>,
1068 Integer<SIMD_WIDTH>)
1069{
1070 printf("mask_set_false_high<%s,%zu>(%zu)\n", TypeInfo<T>::name(), SIMD_WIDTH,
1071 x);
1072 return Mask<T, SIMD_WIDTH>();
1073}
1074
1075// 07. Aug 23 (Jonas Keller): added ktest_all_zeros/ones.
1076
1077template <typename T, size_t SIMD_WIDTH>
1078static SIMD_INLINE bool ktest_all_zeros(const Mask<T, SIMD_WIDTH> &a)
1079{
1080 (void) a;
1081 printf("ktest_all_zeros<%s,%zu>(M)\n", TypeInfo<T>::name(), SIMD_WIDTH);
1082 return false;
1083}
1084
1085template <typename T, size_t SIMD_WIDTH>
1086static SIMD_INLINE bool ktest_all_ones(const Mask<T, SIMD_WIDTH> &a)
1087{
1088 (void) a;
1089 printf("ktest_all_ones<%s,%zu>(M)\n", TypeInfo<T>::name(), SIMD_WIDTH);
1090 return false;
1091}
1092
1093// 07. Aug 23 (Jonas Keller): added kcmpeq
1094
1095template <typename T, size_t SIMD_WIDTH>
1096static SIMD_INLINE bool kcmpeq(const Mask<T, SIMD_WIDTH> &a,
1097 const Mask<T, SIMD_WIDTH> &b)
1098{
1099 (void) a;
1100 (void) b;
1101 printf("kcmpeq<%s,%zu>(M,M)\n", TypeInfo<T>::name(), SIMD_WIDTH);
1102 return false;
1103}
1104} // namespace mask
1105} // namespace internal
1106} // namespace simd
1107
1108#endif // SIMDVEC_SANDBOX
1109
1110#endif // SIMD_VEC_MASK_IMPL_SANDBOX_H_
Mask(const Vec< T, SIMD_WIDTH > &x)
Constructs a Mask from a Vec.
Namespace for T-SIMD.
Definition time_measurement.H:161
static constexpr const char * name()
Returns the name of the type (e.g. "Int" for Int)
Definition types.H:259