Source file
src/simd/archsimd/shuffles_gen_amd64.go
1
2
3
4
5 package archsimd
6
7
8
9
10
11
12 func (x Float32x4) InterleaveLo(y Float32x4) (z Float32x4) {
13 return x.ToBits().InterleaveLo(y.ToBits()).BitsToFloat32()
14 }
15
16
17
18
19
20
21 func (x Float64x2) InterleaveLo(y Float64x2) (z Float64x2) {
22 return x.concatPermuteScalars(0, 2, y)
23 }
24
25
26
27
28
29
30 func (x Int8x32) InterleaveLo(y Int8x32) (z Int8x32) {
31 lo := x.interleaveLoGrouped(y)
32 hi := x.interleaveHiGrouped(y)
33 return lo.concatPermute128Scalars(0, 2, hi)
34 }
35
36
37
38
39
40
41 func (x Uint8x32) InterleaveLo(y Uint8x32) (z Uint8x32) {
42 lo := x.interleaveLoGrouped(y)
43 hi := x.interleaveHiGrouped(y)
44 return lo.concatPermute128Scalars(0, 2, hi)
45 }
46
47
48
49
50
51
52 func (x Int16x16) InterleaveLo(y Int16x16) (z Int16x16) {
53 lo := x.interleaveLoGrouped(y)
54 hi := x.interleaveHiGrouped(y)
55 return lo.concatPermute128Scalars(0, 2, hi)
56 }
57
58
59
60
61
62
63 func (x Uint16x16) InterleaveLo(y Uint16x16) (z Uint16x16) {
64 lo := x.interleaveLoGrouped(y)
65 hi := x.interleaveHiGrouped(y)
66 return lo.concatPermute128Scalars(0, 2, hi)
67 }
68
69
70
71
72
73
74 func (x Int32x8) InterleaveLo(y Int32x8) (z Int32x8) {
75 lo := x.interleaveLoGrouped(y)
76 hi := x.interleaveHiGrouped(y)
77 return lo.concatPermute128Scalars(0, 2, hi)
78 }
79
80
81
82
83
84
85 func (x Uint32x8) InterleaveLo(y Uint32x8) (z Uint32x8) {
86 lo := x.interleaveLoGrouped(y)
87 hi := x.interleaveHiGrouped(y)
88 return lo.concatPermute128Scalars(0, 2, hi)
89 }
90
91
92
93
94
95
96 func (x Float32x8) InterleaveLo(y Float32x8) (z Float32x8) {
97 return x.ToBits().InterleaveLo(y.ToBits()).BitsToFloat32()
98 }
99
100
101
102
103
104
105 func (x Int64x4) InterleaveLo(y Int64x4) (z Int64x4) {
106 lo := x.interleaveLoGrouped(y)
107 hi := x.interleaveHiGrouped(y)
108 return lo.concatPermute128Scalars(0, 2, hi)
109 }
110
111
112
113
114
115
116 func (x Uint64x4) InterleaveLo(y Uint64x4) (z Uint64x4) {
117 lo := x.interleaveLoGrouped(y)
118 hi := x.interleaveHiGrouped(y)
119 return lo.concatPermute128Scalars(0, 2, hi)
120 }
121
122
123
124
125
126
127 func (x Float64x4) InterleaveLo(y Float64x4) (z Float64x4) {
128 lo := x.concatPermuteScalarsGrouped(0, 2, y)
129 hi := x.concatPermuteScalarsGrouped(1, 3, y)
130 return lo.concatPermute128Scalars(0, 2, hi)
131 }
132
133
134
135
136
137
138 func (x Int8x64) InterleaveLo(y Int8x64) (z Int8x64) {
139 return x.ToBits().InterleaveLo(y.ToBits()).BitsToInt8()
140 }
141
142
143
144
145
146
147 func (x Uint8x64) InterleaveLo(y Uint8x64) (z Uint8x64) {
148 if X86.AVX512VBMI() {
149 return x.ConcatLookupMod(y, LoadUint8x64Array(&interleaveLo8x64Idx))
150 }
151 lo := x.interleaveLoGrouped(y).ReshapeToUint64s()
152 hi := x.interleaveHiGrouped(y).ReshapeToUint64s()
153 return lo.ConcatLookupMod(hi, LoadUint64x8Array(&interleaveLo128x4Idx)).ReshapeToUint8s()
154 }
155
156
157
158
159
160
161 func (x Int16x32) InterleaveLo(y Int16x32) (z Int16x32) {
162 return x.ConcatLookupMod(y, LoadUint16x32Array(&interleaveLo16x32Idx))
163 }
164
165
166
167
168
169
170 func (x Uint16x32) InterleaveLo(y Uint16x32) (z Uint16x32) {
171 return x.ConcatLookupMod(y, LoadUint16x32Array(&interleaveLo16x32Idx))
172 }
173
174
175
176
177
178
179 func (x Int32x16) InterleaveLo(y Int32x16) (z Int32x16) {
180 return x.ConcatLookupMod(y, LoadUint32x16Array(&interleaveLo32x16Idx))
181 }
182
183
184
185
186
187
188 func (x Uint32x16) InterleaveLo(y Uint32x16) (z Uint32x16) {
189 return x.ConcatLookupMod(y, LoadUint32x16Array(&interleaveLo32x16Idx))
190 }
191
192
193
194
195
196
197 func (x Float32x16) InterleaveLo(y Float32x16) (z Float32x16) {
198 return x.ConcatLookupMod(y, LoadUint32x16Array(&interleaveLo32x16Idx))
199 }
200
201
202
203
204
205
206 func (x Int64x8) InterleaveLo(y Int64x8) (z Int64x8) {
207 return x.ConcatLookupMod(y, LoadUint64x8Array(&interleaveLo64x8Idx))
208 }
209
210
211
212
213
214
215 func (x Uint64x8) InterleaveLo(y Uint64x8) (z Uint64x8) {
216 return x.ConcatLookupMod(y, LoadUint64x8Array(&interleaveLo64x8Idx))
217 }
218
219
220
221
222
223
224 func (x Float64x8) InterleaveLo(y Float64x8) (z Float64x8) {
225 return x.ConcatLookupMod(y, LoadUint64x8Array(&interleaveLo64x8Idx))
226 }
227
228
229
230
231
232
233 func (x Float32x4) InterleaveHi(y Float32x4) (z Float32x4) {
234 return x.ToBits().InterleaveHi(y.ToBits()).BitsToFloat32()
235 }
236
237
238
239
240
241
242 func (x Float64x2) InterleaveHi(y Float64x2) (z Float64x2) {
243 return x.concatPermuteScalars(1, 3, y)
244 }
245
246
247
248
249
250
251 func (x Int8x32) InterleaveHi(y Int8x32) (z Int8x32) {
252 lo := x.interleaveLoGrouped(y)
253 hi := x.interleaveHiGrouped(y)
254 return lo.concatPermute128Scalars(1, 3, hi)
255 }
256
257
258
259
260
261
262 func (x Uint8x32) InterleaveHi(y Uint8x32) (z Uint8x32) {
263 lo := x.interleaveLoGrouped(y)
264 hi := x.interleaveHiGrouped(y)
265 return lo.concatPermute128Scalars(1, 3, hi)
266 }
267
268
269
270
271
272
273 func (x Int16x16) InterleaveHi(y Int16x16) (z Int16x16) {
274 lo := x.interleaveLoGrouped(y)
275 hi := x.interleaveHiGrouped(y)
276 return lo.concatPermute128Scalars(1, 3, hi)
277 }
278
279
280
281
282
283
284 func (x Uint16x16) InterleaveHi(y Uint16x16) (z Uint16x16) {
285 lo := x.interleaveLoGrouped(y)
286 hi := x.interleaveHiGrouped(y)
287 return lo.concatPermute128Scalars(1, 3, hi)
288 }
289
290
291
292
293
294
295 func (x Int32x8) InterleaveHi(y Int32x8) (z Int32x8) {
296 lo := x.interleaveLoGrouped(y)
297 hi := x.interleaveHiGrouped(y)
298 return lo.concatPermute128Scalars(1, 3, hi)
299 }
300
301
302
303
304
305
306 func (x Uint32x8) InterleaveHi(y Uint32x8) (z Uint32x8) {
307 lo := x.interleaveLoGrouped(y)
308 hi := x.interleaveHiGrouped(y)
309 return lo.concatPermute128Scalars(1, 3, hi)
310 }
311
312
313
314
315
316
317 func (x Float32x8) InterleaveHi(y Float32x8) (z Float32x8) {
318 return x.ToBits().InterleaveHi(y.ToBits()).BitsToFloat32()
319 }
320
321
322
323
324
325
326 func (x Int64x4) InterleaveHi(y Int64x4) (z Int64x4) {
327 lo := x.interleaveLoGrouped(y)
328 hi := x.interleaveHiGrouped(y)
329 return lo.concatPermute128Scalars(1, 3, hi)
330 }
331
332
333
334
335
336
337 func (x Uint64x4) InterleaveHi(y Uint64x4) (z Uint64x4) {
338 lo := x.interleaveLoGrouped(y)
339 hi := x.interleaveHiGrouped(y)
340 return lo.concatPermute128Scalars(1, 3, hi)
341 }
342
343
344
345
346
347
348 func (x Float64x4) InterleaveHi(y Float64x4) (z Float64x4) {
349 lo := x.concatPermuteScalarsGrouped(0, 2, y)
350 hi := x.concatPermuteScalarsGrouped(1, 3, y)
351 return lo.concatPermute128Scalars(1, 3, hi)
352 }
353
354
355
356
357
358
359 func (x Int8x64) InterleaveHi(y Int8x64) (z Int8x64) {
360 return x.ToBits().InterleaveHi(y.ToBits()).BitsToInt8()
361 }
362
363
364
365
366
367
368 func (x Uint8x64) InterleaveHi(y Uint8x64) (z Uint8x64) {
369 if X86.AVX512VBMI() {
370 return x.ConcatLookupMod(y, LoadUint8x64Array(&interleaveHi8x64Idx))
371 }
372 lo := x.interleaveLoGrouped(y).ReshapeToUint64s()
373 hi := x.interleaveHiGrouped(y).ReshapeToUint64s()
374 return lo.ConcatLookupMod(hi, LoadUint64x8Array(&interleaveHi128x4Idx)).ReshapeToUint8s()
375 }
376
377
378
379
380
381
382 func (x Int16x32) InterleaveHi(y Int16x32) (z Int16x32) {
383 return x.ConcatLookupMod(y, LoadUint16x32Array(&interleaveHi16x32Idx))
384 }
385
386
387
388
389
390
391 func (x Uint16x32) InterleaveHi(y Uint16x32) (z Uint16x32) {
392 return x.ConcatLookupMod(y, LoadUint16x32Array(&interleaveHi16x32Idx))
393 }
394
395
396
397
398
399
400 func (x Int32x16) InterleaveHi(y Int32x16) (z Int32x16) {
401 return x.ConcatLookupMod(y, LoadUint32x16Array(&interleaveHi32x16Idx))
402 }
403
404
405
406
407
408
409 func (x Uint32x16) InterleaveHi(y Uint32x16) (z Uint32x16) {
410 return x.ConcatLookupMod(y, LoadUint32x16Array(&interleaveHi32x16Idx))
411 }
412
413
414
415
416
417
418 func (x Float32x16) InterleaveHi(y Float32x16) (z Float32x16) {
419 return x.ConcatLookupMod(y, LoadUint32x16Array(&interleaveHi32x16Idx))
420 }
421
422
423
424
425
426
427 func (x Int64x8) InterleaveHi(y Int64x8) (z Int64x8) {
428 return x.ConcatLookupMod(y, LoadUint64x8Array(&interleaveHi64x8Idx))
429 }
430
431
432
433
434
435
436 func (x Uint64x8) InterleaveHi(y Uint64x8) (z Uint64x8) {
437 return x.ConcatLookupMod(y, LoadUint64x8Array(&interleaveHi64x8Idx))
438 }
439
440
441
442
443
444
445 func (x Float64x8) InterleaveHi(y Float64x8) (z Float64x8) {
446 return x.ConcatLookupMod(y, LoadUint64x8Array(&interleaveHi64x8Idx))
447 }
448
449
450
451
452
453
454 func (x Int8x16) ConcatEven(y Int8x16) (z Int8x16) {
455 return x.ToBits().ConcatEven(y.ToBits()).BitsToInt8()
456 }
457
458
459
460
461
462
463 func (x Uint8x16) ConcatEven(y Uint8x16) (z Uint8x16) {
464 idx := LoadInt8x16Array(&trunc16To8Idx)
465 a := x.LookupModOrZero(idx).ReshapeToUint64s()
466 b := y.LookupModOrZero(idx).ReshapeToUint64s()
467 return a.InterleaveLo(b).ReshapeToUint8s()
468 }
469
470
471
472
473
474
475 func (x Int16x8) ConcatEven(y Int16x8) (z Int16x8) {
476 return x.ToBits().ConcatEven(y.ToBits()).BitsToInt16()
477 }
478
479
480
481
482
483
484 func (x Uint16x8) ConcatEven(y Uint16x8) (z Uint16x8) {
485 idx := LoadInt8x16Array(&trunc32To16Idx)
486 a := x.ReshapeToUint8s().LookupModOrZero(idx).ReshapeToUint64s()
487 b := y.ReshapeToUint8s().LookupModOrZero(idx).ReshapeToUint64s()
488 return a.InterleaveLo(b).ReshapeToUint16s()
489 }
490
491
492
493
494
495
496 func (x Int32x4) ConcatEven(y Int32x4) (z Int32x4) {
497 return x.concatPermuteScalars(0, 2, 4, 6, y)
498 }
499
500
501
502
503
504
505 func (x Uint32x4) ConcatEven(y Uint32x4) (z Uint32x4) {
506 return x.concatPermuteScalars(0, 2, 4, 6, y)
507 }
508
509
510
511
512
513
514 func (x Float32x4) ConcatEven(y Float32x4) (z Float32x4) {
515 return x.concatPermuteScalars(0, 2, 4, 6, y)
516 }
517
518
519
520
521
522
523 func (x Int64x2) ConcatEven(y Int64x2) (z Int64x2) {
524 return x.InterleaveLo(y)
525 }
526
527
528
529
530
531
532 func (x Uint64x2) ConcatEven(y Uint64x2) (z Uint64x2) {
533 return x.InterleaveLo(y)
534 }
535
536
537
538
539
540
541 func (x Float64x2) ConcatEven(y Float64x2) (z Float64x2) {
542 return x.concatPermuteScalars(0, 2, y)
543 }
544
545
546
547
548
549
550 func (x Int8x32) ConcatEven(y Int8x32) (z Int8x32) {
551 return x.ToBits().ConcatEven(y.ToBits()).BitsToInt8()
552 }
553
554
555
556
557
558
559 func (x Uint8x32) ConcatEven(y Uint8x32) (z Uint8x32) {
560 if X86.AVX512VBMI() {
561 return x.ConcatLookupMod(y, LoadUint8x32Array(&concatEven8x32Idx))
562 }
563 idx := LoadInt8x32Array(&trunc16To8GroupedIdx)
564 a := x.LookupModOrZeroGrouped(idx).ReshapeToUint64s()
565 b := y.LookupModOrZeroGrouped(idx).ReshapeToUint64s()
566 return gatherLo64(a.interleaveLoGrouped(b)).ReshapeToUint8s()
567 }
568
569
570
571
572
573
574 func (x Int16x16) ConcatEven(y Int16x16) (z Int16x16) {
575 return x.ToBits().ConcatEven(y.ToBits()).BitsToInt16()
576 }
577
578
579
580
581
582
583 func (x Uint16x16) ConcatEven(y Uint16x16) (z Uint16x16) {
584 if X86.AVX512() {
585 return x.ConcatLookupMod(y, LoadUint16x16Array(&concatEven16x16Idx))
586 }
587 idx := LoadInt8x32Array(&trunc32To16GroupedIdx)
588 a := x.ReshapeToUint8s().LookupModOrZeroGrouped(idx).ReshapeToUint64s()
589 b := y.ReshapeToUint8s().LookupModOrZeroGrouped(idx).ReshapeToUint64s()
590 return gatherLo64(a.interleaveLoGrouped(b)).ReshapeToUint16s()
591 }
592
593
594
595
596
597
598 func (x Int32x8) ConcatEven(y Int32x8) (z Int32x8) {
599 return x.ToBits().ConcatEven(y.ToBits()).BitsToInt32()
600 }
601
602
603
604
605
606
607 func (x Uint32x8) ConcatEven(y Uint32x8) (z Uint32x8) {
608 return x.concatPermuteScalarsGrouped(0, 2, 4, 6, y).LookupMod(LoadUint32x8Array(&gatherLo64Idx))
609 }
610
611
612
613
614
615
616 func (x Float32x8) ConcatEven(y Float32x8) (z Float32x8) {
617 lo := x.concatPermute128Scalars(0, 2, y)
618 hi := x.concatPermute128Scalars(1, 3, y)
619 return lo.concatPermuteScalarsGrouped(0, 2, 4, 6, hi)
620 }
621
622
623
624
625
626
627 func (x Int64x4) ConcatEven(y Int64x4) (z Int64x4) {
628 return x.ToBits().ConcatEven(y.ToBits()).BitsToInt64()
629 }
630
631
632
633
634
635
636 func (x Uint64x4) ConcatEven(y Uint64x4) (z Uint64x4) {
637 return gatherLo64(x.interleaveLoGrouped(y))
638 }
639
640
641
642
643
644
645 func (x Float64x4) ConcatEven(y Float64x4) (z Float64x4) {
646 lo := x.concatPermute128Scalars(0, 2, y)
647 hi := x.concatPermute128Scalars(1, 3, y)
648 return lo.concatPermuteScalarsGrouped(0, 2, hi)
649 }
650
651
652
653
654
655
656 func (x Int8x64) ConcatEven(y Int8x64) (z Int8x64) {
657 return x.ToBits().ConcatEven(y.ToBits()).BitsToInt8()
658 }
659
660
661
662
663
664
665 func (x Uint8x64) ConcatEven(y Uint8x64) (z Uint8x64) {
666 if X86.AVX512VBMI() {
667 return x.ConcatLookupMod(y, LoadUint8x64Array(&concatEven8x64Idx))
668 }
669 idx := LoadInt8x64Array(&concatEven8x64GroupedIdx)
670 a := x.LookupModOrZeroGrouped(idx).ReshapeToUint64s()
671 b := y.LookupModOrZeroGrouped(idx).ReshapeToUint64s()
672 return a.ConcatLookupMod(b, LoadUint64x8Array(&concatEven64x8Idx)).ReshapeToUint8s()
673 }
674
675
676
677
678
679
680 func (x Int16x32) ConcatEven(y Int16x32) (z Int16x32) {
681 return x.ConcatLookupMod(y, LoadUint16x32Array(&concatEven16x32Idx))
682 }
683
684
685
686
687
688
689 func (x Uint16x32) ConcatEven(y Uint16x32) (z Uint16x32) {
690 return x.ConcatLookupMod(y, LoadUint16x32Array(&concatEven16x32Idx))
691 }
692
693
694
695
696
697
698 func (x Int32x16) ConcatEven(y Int32x16) (z Int32x16) {
699 return x.ConcatLookupMod(y, LoadUint32x16Array(&concatEven32x16Idx))
700 }
701
702
703
704
705
706
707 func (x Uint32x16) ConcatEven(y Uint32x16) (z Uint32x16) {
708 return x.ConcatLookupMod(y, LoadUint32x16Array(&concatEven32x16Idx))
709 }
710
711
712
713
714
715
716 func (x Float32x16) ConcatEven(y Float32x16) (z Float32x16) {
717 return x.ConcatLookupMod(y, LoadUint32x16Array(&concatEven32x16Idx))
718 }
719
720
721
722
723
724
725 func (x Int64x8) ConcatEven(y Int64x8) (z Int64x8) {
726 return x.ConcatLookupMod(y, LoadUint64x8Array(&concatEven64x8Idx))
727 }
728
729
730
731
732
733
734 func (x Uint64x8) ConcatEven(y Uint64x8) (z Uint64x8) {
735 return x.ConcatLookupMod(y, LoadUint64x8Array(&concatEven64x8Idx))
736 }
737
738
739
740
741
742
743 func (x Float64x8) ConcatEven(y Float64x8) (z Float64x8) {
744 return x.ConcatLookupMod(y, LoadUint64x8Array(&concatEven64x8Idx))
745 }
746
747
748
749
750
751
752 func (x Int8x16) ConcatOdd(y Int8x16) (z Int8x16) {
753 return x.ToBits().ConcatOdd(y.ToBits()).BitsToInt8()
754 }
755
756
757
758
759
760
761 func (x Uint8x16) ConcatOdd(y Uint8x16) (z Uint8x16) {
762 xo := x.ReshapeToUint16s().BitsToInt16().ShiftAllRight(8)
763 yo := y.ReshapeToUint16s().BitsToInt16().ShiftAllRight(8)
764 return xo.concatSaturateToInt8(yo).ToBits()
765 }
766
767
768
769
770
771
772 func (x Int16x8) ConcatOdd(y Int16x8) (z Int16x8) {
773 return x.ToBits().ConcatOdd(y.ToBits()).BitsToInt16()
774 }
775
776
777
778
779
780
781 func (x Uint16x8) ConcatOdd(y Uint16x8) (z Uint16x8) {
782 xo := x.ReshapeToUint32s().BitsToInt32().ShiftAllRight(16)
783 yo := y.ReshapeToUint32s().BitsToInt32().ShiftAllRight(16)
784 return xo.ConcatSaturateToInt16(yo).ToBits()
785 }
786
787
788
789
790
791
792 func (x Int32x4) ConcatOdd(y Int32x4) (z Int32x4) {
793 return x.concatPermuteScalars(1, 3, 5, 7, y)
794 }
795
796
797
798
799
800
801 func (x Uint32x4) ConcatOdd(y Uint32x4) (z Uint32x4) {
802 return x.concatPermuteScalars(1, 3, 5, 7, y)
803 }
804
805
806
807
808
809
810 func (x Float32x4) ConcatOdd(y Float32x4) (z Float32x4) {
811 return x.concatPermuteScalars(1, 3, 5, 7, y)
812 }
813
814
815
816
817
818
819 func (x Int64x2) ConcatOdd(y Int64x2) (z Int64x2) {
820 return x.InterleaveHi(y)
821 }
822
823
824
825
826
827
828 func (x Uint64x2) ConcatOdd(y Uint64x2) (z Uint64x2) {
829 return x.InterleaveHi(y)
830 }
831
832
833
834
835
836
837 func (x Float64x2) ConcatOdd(y Float64x2) (z Float64x2) {
838 return x.concatPermuteScalars(1, 3, y)
839 }
840
841
842
843
844
845
846 func (x Int8x32) ConcatOdd(y Int8x32) (z Int8x32) {
847 return x.ToBits().ConcatOdd(y.ToBits()).BitsToInt8()
848 }
849
850
851
852
853
854
855 func (x Uint8x32) ConcatOdd(y Uint8x32) (z Uint8x32) {
856 if X86.AVX512VBMI() {
857 return x.ConcatLookupMod(y, LoadUint8x32Array(&concatOdd8x32Idx))
858 }
859 xo := x.ReshapeToUint16s().BitsToInt16().ShiftAllRight(8)
860 yo := y.ReshapeToUint16s().BitsToInt16().ShiftAllRight(8)
861 return gatherLo64(xo.concatSaturateToInt8Grouped(yo).ToBits().ReshapeToUint64s()).ReshapeToUint8s()
862 }
863
864
865
866
867
868
869 func (x Int16x16) ConcatOdd(y Int16x16) (z Int16x16) {
870 return x.ToBits().ConcatOdd(y.ToBits()).BitsToInt16()
871 }
872
873
874
875
876
877
878 func (x Uint16x16) ConcatOdd(y Uint16x16) (z Uint16x16) {
879 if X86.AVX512() {
880 return x.ConcatLookupMod(y, LoadUint16x16Array(&concatOdd16x16Idx))
881 }
882 xo := x.ReshapeToUint32s().BitsToInt32().ShiftAllRight(16)
883 yo := y.ReshapeToUint32s().BitsToInt32().ShiftAllRight(16)
884 return gatherLo64(xo.ConcatSaturateToInt16Grouped(yo).ToBits().ReshapeToUint64s()).ReshapeToUint16s()
885 }
886
887
888
889
890
891
892 func (x Int32x8) ConcatOdd(y Int32x8) (z Int32x8) {
893 return x.ToBits().ConcatOdd(y.ToBits()).BitsToInt32()
894 }
895
896
897
898
899
900
901 func (x Uint32x8) ConcatOdd(y Uint32x8) (z Uint32x8) {
902 return x.concatPermuteScalarsGrouped(1, 3, 5, 7, y).LookupMod(LoadUint32x8Array(&gatherLo64Idx))
903 }
904
905
906
907
908
909
910 func (x Float32x8) ConcatOdd(y Float32x8) (z Float32x8) {
911 lo := x.concatPermute128Scalars(0, 2, y)
912 hi := x.concatPermute128Scalars(1, 3, y)
913 return lo.concatPermuteScalarsGrouped(1, 3, 5, 7, hi)
914 }
915
916
917
918
919
920
921 func (x Int64x4) ConcatOdd(y Int64x4) (z Int64x4) {
922 return x.ToBits().ConcatOdd(y.ToBits()).BitsToInt64()
923 }
924
925
926
927
928
929
930 func (x Uint64x4) ConcatOdd(y Uint64x4) (z Uint64x4) {
931 return gatherLo64(x.interleaveHiGrouped(y))
932 }
933
934
935
936
937
938
939 func (x Float64x4) ConcatOdd(y Float64x4) (z Float64x4) {
940 lo := x.concatPermute128Scalars(0, 2, y)
941 hi := x.concatPermute128Scalars(1, 3, y)
942 return lo.concatPermuteScalarsGrouped(1, 3, hi)
943 }
944
945
946
947
948
949
950 func (x Int8x64) ConcatOdd(y Int8x64) (z Int8x64) {
951 return x.ToBits().ConcatOdd(y.ToBits()).BitsToInt8()
952 }
953
954
955
956
957
958
959 func (x Uint8x64) ConcatOdd(y Uint8x64) (z Uint8x64) {
960 if X86.AVX512VBMI() {
961 return x.ConcatLookupMod(y, LoadUint8x64Array(&concatOdd8x64Idx))
962 }
963 idx := LoadInt8x64Array(&concatOdd8x64GroupedIdx)
964 a := x.LookupModOrZeroGrouped(idx).ReshapeToUint64s()
965 b := y.LookupModOrZeroGrouped(idx).ReshapeToUint64s()
966 return a.ConcatLookupMod(b, LoadUint64x8Array(&concatEven64x8Idx)).ReshapeToUint8s()
967 }
968
969
970
971
972
973
974 func (x Int16x32) ConcatOdd(y Int16x32) (z Int16x32) {
975 return x.ConcatLookupMod(y, LoadUint16x32Array(&concatOdd16x32Idx))
976 }
977
978
979
980
981
982
983 func (x Uint16x32) ConcatOdd(y Uint16x32) (z Uint16x32) {
984 return x.ConcatLookupMod(y, LoadUint16x32Array(&concatOdd16x32Idx))
985 }
986
987
988
989
990
991
992 func (x Int32x16) ConcatOdd(y Int32x16) (z Int32x16) {
993 return x.ConcatLookupMod(y, LoadUint32x16Array(&concatOdd32x16Idx))
994 }
995
996
997
998
999
1000
1001 func (x Uint32x16) ConcatOdd(y Uint32x16) (z Uint32x16) {
1002 return x.ConcatLookupMod(y, LoadUint32x16Array(&concatOdd32x16Idx))
1003 }
1004
1005
1006
1007
1008
1009
1010 func (x Float32x16) ConcatOdd(y Float32x16) (z Float32x16) {
1011 return x.ConcatLookupMod(y, LoadUint32x16Array(&concatOdd32x16Idx))
1012 }
1013
1014
1015
1016
1017
1018
1019 func (x Int64x8) ConcatOdd(y Int64x8) (z Int64x8) {
1020 return x.ConcatLookupMod(y, LoadUint64x8Array(&concatOdd64x8Idx))
1021 }
1022
1023
1024
1025
1026
1027
1028 func (x Uint64x8) ConcatOdd(y Uint64x8) (z Uint64x8) {
1029 return x.ConcatLookupMod(y, LoadUint64x8Array(&concatOdd64x8Idx))
1030 }
1031
1032
1033
1034
1035
1036
1037 func (x Float64x8) ConcatOdd(y Float64x8) (z Float64x8) {
1038 return x.ConcatLookupMod(y, LoadUint64x8Array(&concatOdd64x8Idx))
1039 }
1040
View as plain text