Source file
src/simd/archsimd/maskmerge_gen_amd64.go
1
2
3
4
5 package archsimd
6
7
8
9
10 func (x Int8x16) Masked(mask Mask8x16) Int8x16 {
11 im := mask.ToInt8x16()
12 return im.And(x)
13 }
14
15
16
17
18
19
20
21
22 func (x Int8x16) Merge(y Int8x16, mask Mask8x16) Int8x16 {
23 return x.IfElse(mask, y)
24 }
25
26
27
28
29 func (x Int8x16) IfElse(mask Mask8x16, y Int8x16) Int8x16 {
30 im := mask.ToInt8x16()
31 return y.blend(x, im)
32 }
33
34
35
36
37 func (x Int16x8) Masked(mask Mask16x8) Int16x8 {
38 im := mask.ToInt16x8()
39 return im.And(x)
40 }
41
42
43
44
45
46
47
48
49 func (x Int16x8) Merge(y Int16x8, mask Mask16x8) Int16x8 {
50 return x.IfElse(mask, y)
51 }
52
53
54
55
56 func (x Int16x8) IfElse(mask Mask16x8, y Int16x8) Int16x8 {
57 im := mask.ToInt16x8().AsInt8x16()
58 ix := x.AsInt8x16()
59 iy := y.AsInt8x16()
60 return iy.blend(ix, im).AsInt16x8()
61 }
62
63
64
65
66 func (x Int32x4) Masked(mask Mask32x4) Int32x4 {
67 im := mask.ToInt32x4()
68 return im.And(x)
69 }
70
71
72
73
74
75
76
77
78 func (x Int32x4) Merge(y Int32x4, mask Mask32x4) Int32x4 {
79 return x.IfElse(mask, y)
80 }
81
82
83
84
85 func (x Int32x4) IfElse(mask Mask32x4, y Int32x4) Int32x4 {
86 im := mask.ToInt32x4().AsInt8x16()
87 ix := x.AsInt8x16()
88 iy := y.AsInt8x16()
89 return iy.blend(ix, im).AsInt32x4()
90 }
91
92
93
94
95 func (x Int64x2) Masked(mask Mask64x2) Int64x2 {
96 im := mask.ToInt64x2()
97 return im.And(x)
98 }
99
100
101
102
103
104
105
106
107 func (x Int64x2) Merge(y Int64x2, mask Mask64x2) Int64x2 {
108 return x.IfElse(mask, y)
109 }
110
111
112
113
114 func (x Int64x2) IfElse(mask Mask64x2, y Int64x2) Int64x2 {
115 im := mask.ToInt64x2().AsInt8x16()
116 ix := x.AsInt8x16()
117 iy := y.AsInt8x16()
118 return iy.blend(ix, im).AsInt64x2()
119 }
120
121
122
123
124 func (x Uint8x16) Masked(mask Mask8x16) Uint8x16 {
125 im := mask.ToInt8x16()
126 return x.AsInt8x16().And(im).AsUint8x16()
127 }
128
129
130
131
132
133
134
135
136 func (x Uint8x16) Merge(y Uint8x16, mask Mask8x16) Uint8x16 {
137 return x.IfElse(mask, y)
138 }
139
140
141
142
143 func (x Uint8x16) IfElse(mask Mask8x16, y Uint8x16) Uint8x16 {
144 im := mask.ToInt8x16()
145 ix := x.AsInt8x16()
146 iy := y.AsInt8x16()
147 return iy.blend(ix, im).AsUint8x16()
148 }
149
150
151
152
153 func (x Uint16x8) Masked(mask Mask16x8) Uint16x8 {
154 im := mask.ToInt16x8()
155 return x.AsInt16x8().And(im).AsUint16x8()
156 }
157
158
159
160
161
162
163
164
165 func (x Uint16x8) Merge(y Uint16x8, mask Mask16x8) Uint16x8 {
166 return x.IfElse(mask, y)
167 }
168
169
170
171
172 func (x Uint16x8) IfElse(mask Mask16x8, y Uint16x8) Uint16x8 {
173 im := mask.ToInt16x8().AsInt8x16()
174 ix := x.AsInt8x16()
175 iy := y.AsInt8x16()
176 return iy.blend(ix, im).AsUint16x8()
177 }
178
179
180
181
182 func (x Uint32x4) Masked(mask Mask32x4) Uint32x4 {
183 im := mask.ToInt32x4()
184 return x.AsInt32x4().And(im).AsUint32x4()
185 }
186
187
188
189
190
191
192
193
194 func (x Uint32x4) Merge(y Uint32x4, mask Mask32x4) Uint32x4 {
195 return x.IfElse(mask, y)
196 }
197
198
199
200
201 func (x Uint32x4) IfElse(mask Mask32x4, y Uint32x4) Uint32x4 {
202 im := mask.ToInt32x4().AsInt8x16()
203 ix := x.AsInt8x16()
204 iy := y.AsInt8x16()
205 return iy.blend(ix, im).AsUint32x4()
206 }
207
208
209
210
211 func (x Uint64x2) Masked(mask Mask64x2) Uint64x2 {
212 im := mask.ToInt64x2()
213 return x.AsInt64x2().And(im).AsUint64x2()
214 }
215
216
217
218
219
220
221
222
223 func (x Uint64x2) Merge(y Uint64x2, mask Mask64x2) Uint64x2 {
224 return x.IfElse(mask, y)
225 }
226
227
228
229
230 func (x Uint64x2) IfElse(mask Mask64x2, y Uint64x2) Uint64x2 {
231 im := mask.ToInt64x2().AsInt8x16()
232 ix := x.AsInt8x16()
233 iy := y.AsInt8x16()
234 return iy.blend(ix, im).AsUint64x2()
235 }
236
237
238
239
240 func (x Float32x4) Masked(mask Mask32x4) Float32x4 {
241 im := mask.ToInt32x4()
242 return x.AsInt32x4().And(im).AsFloat32x4()
243 }
244
245
246
247
248
249
250
251
252 func (x Float32x4) Merge(y Float32x4, mask Mask32x4) Float32x4 {
253 return x.IfElse(mask, y)
254 }
255
256
257
258
259 func (x Float32x4) IfElse(mask Mask32x4, y Float32x4) Float32x4 {
260 im := mask.ToInt32x4().AsInt8x16()
261 ix := x.AsInt8x16()
262 iy := y.AsInt8x16()
263 return iy.blend(ix, im).AsFloat32x4()
264 }
265
266
267
268
269 func (x Float64x2) Masked(mask Mask64x2) Float64x2 {
270 im := mask.ToInt64x2()
271 return x.AsInt64x2().And(im).AsFloat64x2()
272 }
273
274
275
276
277
278
279
280
281 func (x Float64x2) Merge(y Float64x2, mask Mask64x2) Float64x2 {
282 return x.IfElse(mask, y)
283 }
284
285
286
287
288 func (x Float64x2) IfElse(mask Mask64x2, y Float64x2) Float64x2 {
289 im := mask.ToInt64x2().AsInt8x16()
290 ix := x.AsInt8x16()
291 iy := y.AsInt8x16()
292 return iy.blend(ix, im).AsFloat64x2()
293 }
294
295
296
297
298 func (x Int8x32) Masked(mask Mask8x32) Int8x32 {
299 im := mask.ToInt8x32()
300 return im.And(x)
301 }
302
303
304
305
306
307
308
309
310 func (x Int8x32) Merge(y Int8x32, mask Mask8x32) Int8x32 {
311 return x.IfElse(mask, y)
312 }
313
314
315
316
317 func (x Int8x32) IfElse(mask Mask8x32, y Int8x32) Int8x32 {
318 im := mask.ToInt8x32()
319 return y.blend(x, im)
320 }
321
322
323
324
325 func (x Int16x16) Masked(mask Mask16x16) Int16x16 {
326 im := mask.ToInt16x16()
327 return im.And(x)
328 }
329
330
331
332
333
334
335
336
337 func (x Int16x16) Merge(y Int16x16, mask Mask16x16) Int16x16 {
338 return x.IfElse(mask, y)
339 }
340
341
342
343
344 func (x Int16x16) IfElse(mask Mask16x16, y Int16x16) Int16x16 {
345 im := mask.ToInt16x16().AsInt8x32()
346 ix := x.AsInt8x32()
347 iy := y.AsInt8x32()
348 return iy.blend(ix, im).AsInt16x16()
349 }
350
351
352
353
354 func (x Int32x8) Masked(mask Mask32x8) Int32x8 {
355 im := mask.ToInt32x8()
356 return im.And(x)
357 }
358
359
360
361
362
363
364
365
366 func (x Int32x8) Merge(y Int32x8, mask Mask32x8) Int32x8 {
367 return x.IfElse(mask, y)
368 }
369
370
371
372
373 func (x Int32x8) IfElse(mask Mask32x8, y Int32x8) Int32x8 {
374 im := mask.ToInt32x8().AsInt8x32()
375 ix := x.AsInt8x32()
376 iy := y.AsInt8x32()
377 return iy.blend(ix, im).AsInt32x8()
378 }
379
380
381
382
383 func (x Int64x4) Masked(mask Mask64x4) Int64x4 {
384 im := mask.ToInt64x4()
385 return im.And(x)
386 }
387
388
389
390
391
392
393
394
395 func (x Int64x4) Merge(y Int64x4, mask Mask64x4) Int64x4 {
396 return x.IfElse(mask, y)
397 }
398
399
400
401
402 func (x Int64x4) IfElse(mask Mask64x4, y Int64x4) Int64x4 {
403 im := mask.ToInt64x4().AsInt8x32()
404 ix := x.AsInt8x32()
405 iy := y.AsInt8x32()
406 return iy.blend(ix, im).AsInt64x4()
407 }
408
409
410
411
412 func (x Uint8x32) Masked(mask Mask8x32) Uint8x32 {
413 im := mask.ToInt8x32()
414 return x.AsInt8x32().And(im).AsUint8x32()
415 }
416
417
418
419
420
421
422
423
424 func (x Uint8x32) Merge(y Uint8x32, mask Mask8x32) Uint8x32 {
425 return x.IfElse(mask, y)
426 }
427
428
429
430
431 func (x Uint8x32) IfElse(mask Mask8x32, y Uint8x32) Uint8x32 {
432 im := mask.ToInt8x32()
433 ix := x.AsInt8x32()
434 iy := y.AsInt8x32()
435 return iy.blend(ix, im).AsUint8x32()
436 }
437
438
439
440
441 func (x Uint16x16) Masked(mask Mask16x16) Uint16x16 {
442 im := mask.ToInt16x16()
443 return x.AsInt16x16().And(im).AsUint16x16()
444 }
445
446
447
448
449
450
451
452
453 func (x Uint16x16) Merge(y Uint16x16, mask Mask16x16) Uint16x16 {
454 return x.IfElse(mask, y)
455 }
456
457
458
459
460 func (x Uint16x16) IfElse(mask Mask16x16, y Uint16x16) Uint16x16 {
461 im := mask.ToInt16x16().AsInt8x32()
462 ix := x.AsInt8x32()
463 iy := y.AsInt8x32()
464 return iy.blend(ix, im).AsUint16x16()
465 }
466
467
468
469
470 func (x Uint32x8) Masked(mask Mask32x8) Uint32x8 {
471 im := mask.ToInt32x8()
472 return x.AsInt32x8().And(im).AsUint32x8()
473 }
474
475
476
477
478
479
480
481
482 func (x Uint32x8) Merge(y Uint32x8, mask Mask32x8) Uint32x8 {
483 return x.IfElse(mask, y)
484 }
485
486
487
488
489 func (x Uint32x8) IfElse(mask Mask32x8, y Uint32x8) Uint32x8 {
490 im := mask.ToInt32x8().AsInt8x32()
491 ix := x.AsInt8x32()
492 iy := y.AsInt8x32()
493 return iy.blend(ix, im).AsUint32x8()
494 }
495
496
497
498
499 func (x Uint64x4) Masked(mask Mask64x4) Uint64x4 {
500 im := mask.ToInt64x4()
501 return x.AsInt64x4().And(im).AsUint64x4()
502 }
503
504
505
506
507
508
509
510
511 func (x Uint64x4) Merge(y Uint64x4, mask Mask64x4) Uint64x4 {
512 return x.IfElse(mask, y)
513 }
514
515
516
517
518 func (x Uint64x4) IfElse(mask Mask64x4, y Uint64x4) Uint64x4 {
519 im := mask.ToInt64x4().AsInt8x32()
520 ix := x.AsInt8x32()
521 iy := y.AsInt8x32()
522 return iy.blend(ix, im).AsUint64x4()
523 }
524
525
526
527
528 func (x Float32x8) Masked(mask Mask32x8) Float32x8 {
529 im := mask.ToInt32x8()
530 return x.AsInt32x8().And(im).AsFloat32x8()
531 }
532
533
534
535
536
537
538
539
540 func (x Float32x8) Merge(y Float32x8, mask Mask32x8) Float32x8 {
541 return x.IfElse(mask, y)
542 }
543
544
545
546
547 func (x Float32x8) IfElse(mask Mask32x8, y Float32x8) Float32x8 {
548 im := mask.ToInt32x8().AsInt8x32()
549 ix := x.AsInt8x32()
550 iy := y.AsInt8x32()
551 return iy.blend(ix, im).AsFloat32x8()
552 }
553
554
555
556
557 func (x Float64x4) Masked(mask Mask64x4) Float64x4 {
558 im := mask.ToInt64x4()
559 return x.AsInt64x4().And(im).AsFloat64x4()
560 }
561
562
563
564
565
566
567
568
569 func (x Float64x4) Merge(y Float64x4, mask Mask64x4) Float64x4 {
570 return x.IfElse(mask, y)
571 }
572
573
574
575
576 func (x Float64x4) IfElse(mask Mask64x4, y Float64x4) Float64x4 {
577 im := mask.ToInt64x4().AsInt8x32()
578 ix := x.AsInt8x32()
579 iy := y.AsInt8x32()
580 return iy.blend(ix, im).AsFloat64x4()
581 }
582
583
584
585
586 func (x Int8x64) Masked(mask Mask8x64) Int8x64 {
587 im := mask.ToInt8x64()
588 return im.And(x)
589 }
590
591
592
593
594
595
596
597
598 func (x Int8x64) Merge(y Int8x64, mask Mask8x64) Int8x64 {
599 return x.IfElse(mask, y)
600 }
601
602
603
604
605 func (x Int8x64) IfElse(mask Mask8x64, y Int8x64) Int8x64 {
606 return y.blendMasked(x, mask)
607 }
608
609
610
611
612 func (x Int16x32) Masked(mask Mask16x32) Int16x32 {
613 im := mask.ToInt16x32()
614 return im.And(x)
615 }
616
617
618
619
620
621
622
623
624 func (x Int16x32) Merge(y Int16x32, mask Mask16x32) Int16x32 {
625 return x.IfElse(mask, y)
626 }
627
628
629
630
631 func (x Int16x32) IfElse(mask Mask16x32, y Int16x32) Int16x32 {
632 return y.blendMasked(x, mask)
633 }
634
635
636
637
638 func (x Int32x16) Masked(mask Mask32x16) Int32x16 {
639 im := mask.ToInt32x16()
640 return im.And(x)
641 }
642
643
644
645
646
647
648
649
650 func (x Int32x16) Merge(y Int32x16, mask Mask32x16) Int32x16 {
651 return x.IfElse(mask, y)
652 }
653
654
655
656
657 func (x Int32x16) IfElse(mask Mask32x16, y Int32x16) Int32x16 {
658 return y.blendMasked(x, mask)
659 }
660
661
662
663
664 func (x Int64x8) Masked(mask Mask64x8) Int64x8 {
665 im := mask.ToInt64x8()
666 return im.And(x)
667 }
668
669
670
671
672
673
674
675
676 func (x Int64x8) Merge(y Int64x8, mask Mask64x8) Int64x8 {
677 return x.IfElse(mask, y)
678 }
679
680
681
682
683 func (x Int64x8) IfElse(mask Mask64x8, y Int64x8) Int64x8 {
684 return y.blendMasked(x, mask)
685 }
686
687
688
689
690 func (x Uint8x64) Masked(mask Mask8x64) Uint8x64 {
691 im := mask.ToInt8x64()
692 return x.AsInt8x64().And(im).AsUint8x64()
693 }
694
695
696
697
698
699
700
701
702 func (x Uint8x64) Merge(y Uint8x64, mask Mask8x64) Uint8x64 {
703 return x.IfElse(mask, y)
704 }
705
706
707
708
709 func (x Uint8x64) IfElse(mask Mask8x64, y Uint8x64) Uint8x64 {
710 ix := x.AsInt8x64()
711 iy := y.AsInt8x64()
712 return iy.blendMasked(ix, mask).AsUint8x64()
713 }
714
715
716
717
718 func (x Uint16x32) Masked(mask Mask16x32) Uint16x32 {
719 im := mask.ToInt16x32()
720 return x.AsInt16x32().And(im).AsUint16x32()
721 }
722
723
724
725
726
727
728
729
730 func (x Uint16x32) Merge(y Uint16x32, mask Mask16x32) Uint16x32 {
731 return x.IfElse(mask, y)
732 }
733
734
735
736
737 func (x Uint16x32) IfElse(mask Mask16x32, y Uint16x32) Uint16x32 {
738 ix := x.AsInt16x32()
739 iy := y.AsInt16x32()
740 return iy.blendMasked(ix, mask).AsUint16x32()
741 }
742
743
744
745
746 func (x Uint32x16) Masked(mask Mask32x16) Uint32x16 {
747 im := mask.ToInt32x16()
748 return x.AsInt32x16().And(im).AsUint32x16()
749 }
750
751
752
753
754
755
756
757
758 func (x Uint32x16) Merge(y Uint32x16, mask Mask32x16) Uint32x16 {
759 return x.IfElse(mask, y)
760 }
761
762
763
764
765 func (x Uint32x16) IfElse(mask Mask32x16, y Uint32x16) Uint32x16 {
766 ix := x.AsInt32x16()
767 iy := y.AsInt32x16()
768 return iy.blendMasked(ix, mask).AsUint32x16()
769 }
770
771
772
773
774 func (x Uint64x8) Masked(mask Mask64x8) Uint64x8 {
775 im := mask.ToInt64x8()
776 return x.AsInt64x8().And(im).AsUint64x8()
777 }
778
779
780
781
782
783
784
785
786 func (x Uint64x8) Merge(y Uint64x8, mask Mask64x8) Uint64x8 {
787 return x.IfElse(mask, y)
788 }
789
790
791
792
793 func (x Uint64x8) IfElse(mask Mask64x8, y Uint64x8) Uint64x8 {
794 ix := x.AsInt64x8()
795 iy := y.AsInt64x8()
796 return iy.blendMasked(ix, mask).AsUint64x8()
797 }
798
799
800
801
802 func (x Float32x16) Masked(mask Mask32x16) Float32x16 {
803 im := mask.ToInt32x16()
804 return x.AsInt32x16().And(im).AsFloat32x16()
805 }
806
807
808
809
810
811
812
813
814 func (x Float32x16) Merge(y Float32x16, mask Mask32x16) Float32x16 {
815 return x.IfElse(mask, y)
816 }
817
818
819
820
821 func (x Float32x16) IfElse(mask Mask32x16, y Float32x16) Float32x16 {
822 ix := x.AsInt32x16()
823 iy := y.AsInt32x16()
824 return iy.blendMasked(ix, mask).AsFloat32x16()
825 }
826
827
828
829
830 func (x Float64x8) Masked(mask Mask64x8) Float64x8 {
831 im := mask.ToInt64x8()
832 return x.AsInt64x8().And(im).AsFloat64x8()
833 }
834
835
836
837
838
839
840
841
842 func (x Float64x8) Merge(y Float64x8, mask Mask64x8) Float64x8 {
843 return x.IfElse(mask, y)
844 }
845
846
847
848
849 func (x Float64x8) IfElse(mask Mask64x8, y Float64x8) Float64x8 {
850 ix := x.AsInt64x8()
851 iy := y.AsInt64x8()
852 return iy.blendMasked(ix, mask).AsFloat64x8()
853 }
854
View as plain text