Source file
src/simd/archsimd/other_gen_amd64.go
1
2
3
4
5 package archsimd
6
7
8
9
10
11 func BroadcastInt8x16(x int8) Int8x16 {
12 var z Int8x16
13 return z.SetElem(0, x).broadcast1To16()
14 }
15
16
17
18
19
20 func BroadcastInt16x8(x int16) Int16x8 {
21 var z Int16x8
22 return z.SetElem(0, x).broadcast1To8()
23 }
24
25
26
27
28
29 func BroadcastInt32x4(x int32) Int32x4 {
30 var z Int32x4
31 return z.SetElem(0, x).broadcast1To4()
32 }
33
34
35
36
37
38 func BroadcastInt64x2(x int64) Int64x2 {
39 var z Int64x2
40 return z.SetElem(0, x).broadcast1To2()
41 }
42
43
44
45
46
47 func BroadcastUint8x16(x uint8) Uint8x16 {
48 var z Uint8x16
49 return z.SetElem(0, x).broadcast1To16()
50 }
51
52
53
54
55
56 func BroadcastUint16x8(x uint16) Uint16x8 {
57 var z Uint16x8
58 return z.SetElem(0, x).broadcast1To8()
59 }
60
61
62
63
64
65 func BroadcastUint32x4(x uint32) Uint32x4 {
66 var z Uint32x4
67 return z.SetElem(0, x).broadcast1To4()
68 }
69
70
71
72
73
74 func BroadcastUint64x2(x uint64) Uint64x2 {
75 var z Uint64x2
76 return z.SetElem(0, x).broadcast1To2()
77 }
78
79
80
81
82
83 func BroadcastFloat32x4(x float32) Float32x4 {
84 var z Float32x4
85 return z.SetElem(0, x).broadcast1To4()
86 }
87
88
89
90
91
92 func BroadcastFloat64x2(x float64) Float64x2 {
93 var z Float64x2
94 return z.SetElem(0, x).broadcast1To2()
95 }
96
97
98
99
100
101 func BroadcastInt8x32(x int8) Int8x32 {
102 var z Int8x16
103 return z.SetElem(0, x).broadcast1To32()
104 }
105
106
107
108
109
110 func BroadcastInt16x16(x int16) Int16x16 {
111 var z Int16x8
112 return z.SetElem(0, x).broadcast1To16()
113 }
114
115
116
117
118
119 func BroadcastInt32x8(x int32) Int32x8 {
120 var z Int32x4
121 return z.SetElem(0, x).broadcast1To8()
122 }
123
124
125
126
127
128 func BroadcastInt64x4(x int64) Int64x4 {
129 var z Int64x2
130 return z.SetElem(0, x).broadcast1To4()
131 }
132
133
134
135
136
137 func BroadcastUint8x32(x uint8) Uint8x32 {
138 var z Uint8x16
139 return z.SetElem(0, x).broadcast1To32()
140 }
141
142
143
144
145
146 func BroadcastUint16x16(x uint16) Uint16x16 {
147 var z Uint16x8
148 return z.SetElem(0, x).broadcast1To16()
149 }
150
151
152
153
154
155 func BroadcastUint32x8(x uint32) Uint32x8 {
156 var z Uint32x4
157 return z.SetElem(0, x).broadcast1To8()
158 }
159
160
161
162
163
164 func BroadcastUint64x4(x uint64) Uint64x4 {
165 var z Uint64x2
166 return z.SetElem(0, x).broadcast1To4()
167 }
168
169
170
171
172
173 func BroadcastFloat32x8(x float32) Float32x8 {
174 var z Float32x4
175 return z.SetElem(0, x).broadcast1To8()
176 }
177
178
179
180
181
182 func BroadcastFloat64x4(x float64) Float64x4 {
183 var z Float64x2
184 return z.SetElem(0, x).broadcast1To4()
185 }
186
187
188
189
190
191 func BroadcastInt8x64(x int8) Int8x64 {
192 var z Int8x16
193 return z.SetElem(0, x).broadcast1To64()
194 }
195
196
197
198
199
200 func BroadcastInt16x32(x int16) Int16x32 {
201 var z Int16x8
202 return z.SetElem(0, x).broadcast1To32()
203 }
204
205
206
207
208
209 func BroadcastInt32x16(x int32) Int32x16 {
210 var z Int32x4
211 return z.SetElem(0, x).broadcast1To16()
212 }
213
214
215
216
217
218 func BroadcastInt64x8(x int64) Int64x8 {
219 var z Int64x2
220 return z.SetElem(0, x).broadcast1To8()
221 }
222
223
224
225
226
227 func BroadcastUint8x64(x uint8) Uint8x64 {
228 var z Uint8x16
229 return z.SetElem(0, x).broadcast1To64()
230 }
231
232
233
234
235
236 func BroadcastUint16x32(x uint16) Uint16x32 {
237 var z Uint16x8
238 return z.SetElem(0, x).broadcast1To32()
239 }
240
241
242
243
244
245 func BroadcastUint32x16(x uint32) Uint32x16 {
246 var z Uint32x4
247 return z.SetElem(0, x).broadcast1To16()
248 }
249
250
251
252
253
254 func BroadcastUint64x8(x uint64) Uint64x8 {
255 var z Uint64x2
256 return z.SetElem(0, x).broadcast1To8()
257 }
258
259
260
261
262
263 func BroadcastFloat32x16(x float32) Float32x16 {
264 var z Float32x4
265 return z.SetElem(0, x).broadcast1To16()
266 }
267
268
269
270
271
272 func BroadcastFloat64x8(x float64) Float64x8 {
273 var z Float64x2
274 return z.SetElem(0, x).broadcast1To8()
275 }
276
277
278 func (from Int8x16) ToMask() (to Mask8x16) {
279 return from.NotEqual(Int8x16{})
280 }
281
282
283 func (from Int16x8) ToMask() (to Mask16x8) {
284 return from.NotEqual(Int16x8{})
285 }
286
287
288 func (from Int32x4) ToMask() (to Mask32x4) {
289 return from.NotEqual(Int32x4{})
290 }
291
292
293 func (from Int64x2) ToMask() (to Mask64x2) {
294 return from.NotEqual(Int64x2{})
295 }
296
297
298 func (from Int8x32) ToMask() (to Mask8x32) {
299 return from.NotEqual(Int8x32{})
300 }
301
302
303 func (from Int16x16) ToMask() (to Mask16x16) {
304 return from.NotEqual(Int16x16{})
305 }
306
307
308 func (from Int32x8) ToMask() (to Mask32x8) {
309 return from.NotEqual(Int32x8{})
310 }
311
312
313 func (from Int64x4) ToMask() (to Mask64x4) {
314 return from.NotEqual(Int64x4{})
315 }
316
317
318 func (from Int8x64) ToMask() (to Mask8x64) {
319 return from.NotEqual(Int8x64{})
320 }
321
322
323 func (from Int16x32) ToMask() (to Mask16x32) {
324 return from.NotEqual(Int16x32{})
325 }
326
327
328 func (from Int32x16) ToMask() (to Mask32x16) {
329 return from.NotEqual(Int32x16{})
330 }
331
332
333 func (from Int64x8) ToMask() (to Mask64x8) {
334 return from.NotEqual(Int64x8{})
335 }
336
337
338
339
340 func (x Int8x16) Not() Int8x16 {
341 return x.Xor(x.Equal(x).ToInt8x16())
342 }
343
344
345
346
347 func (x Int8x16) Neg() Int8x16 {
348 var zero Int8x16
349 return zero.Sub(x)
350 }
351
352
353
354
355 func (x Int16x8) Not() Int16x8 {
356 return x.Xor(x.Equal(x).ToInt16x8())
357 }
358
359
360
361
362 func (x Int16x8) Neg() Int16x8 {
363 var zero Int16x8
364 return zero.Sub(x)
365 }
366
367
368
369
370 func (x Int32x4) Not() Int32x4 {
371 return x.Xor(x.Equal(x).ToInt32x4())
372 }
373
374
375
376
377 func (x Int32x4) Neg() Int32x4 {
378 var zero Int32x4
379 return zero.Sub(x)
380 }
381
382
383
384
385 func (x Int64x2) Not() Int64x2 {
386 return x.Xor(x.Equal(x).ToInt64x2())
387 }
388
389
390
391
392 func (x Int64x2) Neg() Int64x2 {
393 var zero Int64x2
394 return zero.Sub(x)
395 }
396
397
398
399
400 func (x Int8x32) Not() Int8x32 {
401 return x.Xor(x.Equal(x).ToInt8x32())
402 }
403
404
405
406
407 func (x Int8x32) Neg() Int8x32 {
408 var zero Int8x32
409 return zero.Sub(x)
410 }
411
412
413
414
415 func (x Int16x16) Not() Int16x16 {
416 return x.Xor(x.Equal(x).ToInt16x16())
417 }
418
419
420
421
422 func (x Int16x16) Neg() Int16x16 {
423 var zero Int16x16
424 return zero.Sub(x)
425 }
426
427
428
429
430 func (x Int32x8) Not() Int32x8 {
431 return x.Xor(x.Equal(x).ToInt32x8())
432 }
433
434
435
436
437 func (x Int32x8) Neg() Int32x8 {
438 var zero Int32x8
439 return zero.Sub(x)
440 }
441
442
443
444
445 func (x Int64x4) Not() Int64x4 {
446 return x.Xor(x.Equal(x).ToInt64x4())
447 }
448
449
450
451
452 func (x Int64x4) Neg() Int64x4 {
453 var zero Int64x4
454 return zero.Sub(x)
455 }
456
457
458
459
460 func (x Int8x64) Not() Int8x64 {
461 return x.Xor(x.Equal(x).ToInt8x64())
462 }
463
464
465
466
467 func (x Int8x64) Neg() Int8x64 {
468 var zero Int8x64
469 return zero.Sub(x)
470 }
471
472
473
474
475 func (x Int16x32) Not() Int16x32 {
476 return x.Xor(x.Equal(x).ToInt16x32())
477 }
478
479
480
481
482 func (x Int16x32) Neg() Int16x32 {
483 var zero Int16x32
484 return zero.Sub(x)
485 }
486
487
488
489
490 func (x Int32x16) Not() Int32x16 {
491 return x.Xor(x.Equal(x).ToInt32x16())
492 }
493
494
495
496
497 func (x Int32x16) Neg() Int32x16 {
498 var zero Int32x16
499 return zero.Sub(x)
500 }
501
502
503
504
505 func (x Int64x8) Not() Int64x8 {
506 return x.Xor(x.Equal(x).ToInt64x8())
507 }
508
509
510
511
512 func (x Int64x8) Neg() Int64x8 {
513 var zero Int64x8
514 return zero.Sub(x)
515 }
516
517
518
519
520 func (x Uint8x16) Not() Uint8x16 {
521 return x.Xor(x.Equal(x).ToInt8x16().AsUint8x16())
522 }
523
524
525
526
527 func (x Uint16x8) Not() Uint16x8 {
528 return x.Xor(x.Equal(x).ToInt16x8().AsUint16x8())
529 }
530
531
532
533
534 func (x Uint32x4) Not() Uint32x4 {
535 return x.Xor(x.Equal(x).ToInt32x4().AsUint32x4())
536 }
537
538
539
540
541 func (x Uint64x2) Not() Uint64x2 {
542 return x.Xor(x.Equal(x).ToInt64x2().AsUint64x2())
543 }
544
545
546
547
548 func (x Uint8x32) Not() Uint8x32 {
549 return x.Xor(x.Equal(x).ToInt8x32().AsUint8x32())
550 }
551
552
553
554
555 func (x Uint16x16) Not() Uint16x16 {
556 return x.Xor(x.Equal(x).ToInt16x16().AsUint16x16())
557 }
558
559
560
561
562 func (x Uint32x8) Not() Uint32x8 {
563 return x.Xor(x.Equal(x).ToInt32x8().AsUint32x8())
564 }
565
566
567
568
569 func (x Uint64x4) Not() Uint64x4 {
570 return x.Xor(x.Equal(x).ToInt64x4().AsUint64x4())
571 }
572
573
574
575
576 func (x Uint8x64) Not() Uint8x64 {
577 return x.Xor(x.Equal(x).ToInt8x64().AsUint8x64())
578 }
579
580
581
582
583 func (x Uint16x32) Not() Uint16x32 {
584 return x.Xor(x.Equal(x).ToInt16x32().AsUint16x32())
585 }
586
587
588
589
590 func (x Uint32x16) Not() Uint32x16 {
591 return x.Xor(x.Equal(x).ToInt32x16().AsUint32x16())
592 }
593
594
595
596
597 func (x Uint64x8) Not() Uint64x8 {
598 return x.Xor(x.Equal(x).ToInt64x8().AsUint64x8())
599 }
600
601
602 func (x Int8x16) String() string {
603 var s [16]int8
604 x.StoreArray(&s)
605 return sliceToString(s[:])
606 }
607
608
609 func (x Int16x8) String() string {
610 var s [8]int16
611 x.StoreArray(&s)
612 return sliceToString(s[:])
613 }
614
615
616 func (x Int32x4) String() string {
617 var s [4]int32
618 x.StoreArray(&s)
619 return sliceToString(s[:])
620 }
621
622
623 func (x Int64x2) String() string {
624 var s [2]int64
625 x.StoreArray(&s)
626 return sliceToString(s[:])
627 }
628
629
630 func (x Uint8x16) String() string {
631 var s [16]uint8
632 x.StoreArray(&s)
633 return sliceToString(s[:])
634 }
635
636
637 func (x Uint16x8) String() string {
638 var s [8]uint16
639 x.StoreArray(&s)
640 return sliceToString(s[:])
641 }
642
643
644 func (x Uint32x4) String() string {
645 var s [4]uint32
646 x.StoreArray(&s)
647 return sliceToString(s[:])
648 }
649
650
651 func (x Uint64x2) String() string {
652 var s [2]uint64
653 x.StoreArray(&s)
654 return sliceToString(s[:])
655 }
656
657
658 func (x Float32x4) String() string {
659 var s [4]float32
660 x.StoreArray(&s)
661 return sliceToString(s[:])
662 }
663
664
665 func (x Float64x2) String() string {
666 var s [2]float64
667 x.StoreArray(&s)
668 return sliceToString(s[:])
669 }
670
671
672 func (x Int8x32) String() string {
673 var s [32]int8
674 x.StoreArray(&s)
675 return sliceToString(s[:])
676 }
677
678
679 func (x Int16x16) String() string {
680 var s [16]int16
681 x.StoreArray(&s)
682 return sliceToString(s[:])
683 }
684
685
686 func (x Int32x8) String() string {
687 var s [8]int32
688 x.StoreArray(&s)
689 return sliceToString(s[:])
690 }
691
692
693 func (x Int64x4) String() string {
694 var s [4]int64
695 x.StoreArray(&s)
696 return sliceToString(s[:])
697 }
698
699
700 func (x Uint8x32) String() string {
701 var s [32]uint8
702 x.StoreArray(&s)
703 return sliceToString(s[:])
704 }
705
706
707 func (x Uint16x16) String() string {
708 var s [16]uint16
709 x.StoreArray(&s)
710 return sliceToString(s[:])
711 }
712
713
714 func (x Uint32x8) String() string {
715 var s [8]uint32
716 x.StoreArray(&s)
717 return sliceToString(s[:])
718 }
719
720
721 func (x Uint64x4) String() string {
722 var s [4]uint64
723 x.StoreArray(&s)
724 return sliceToString(s[:])
725 }
726
727
728 func (x Float32x8) String() string {
729 var s [8]float32
730 x.StoreArray(&s)
731 return sliceToString(s[:])
732 }
733
734
735 func (x Float64x4) String() string {
736 var s [4]float64
737 x.StoreArray(&s)
738 return sliceToString(s[:])
739 }
740
741
742 func (x Int8x64) String() string {
743 var s [64]int8
744 x.StoreArray(&s)
745 return sliceToString(s[:])
746 }
747
748
749 func (x Int16x32) String() string {
750 var s [32]int16
751 x.StoreArray(&s)
752 return sliceToString(s[:])
753 }
754
755
756 func (x Int32x16) String() string {
757 var s [16]int32
758 x.StoreArray(&s)
759 return sliceToString(s[:])
760 }
761
762
763 func (x Int64x8) String() string {
764 var s [8]int64
765 x.StoreArray(&s)
766 return sliceToString(s[:])
767 }
768
769
770 func (x Uint8x64) String() string {
771 var s [64]uint8
772 x.StoreArray(&s)
773 return sliceToString(s[:])
774 }
775
776
777 func (x Uint16x32) String() string {
778 var s [32]uint16
779 x.StoreArray(&s)
780 return sliceToString(s[:])
781 }
782
783
784 func (x Uint32x16) String() string {
785 var s [16]uint32
786 x.StoreArray(&s)
787 return sliceToString(s[:])
788 }
789
790
791 func (x Uint64x8) String() string {
792 var s [8]uint64
793 x.StoreArray(&s)
794 return sliceToString(s[:])
795 }
796
797
798 func (x Float32x16) String() string {
799 var s [16]float32
800 x.StoreArray(&s)
801 return sliceToString(s[:])
802 }
803
804
805 func (x Float64x8) String() string {
806 var s [8]float64
807 x.StoreArray(&s)
808 return sliceToString(s[:])
809 }
810
811
812 func (x Mask8x16) String() string {
813 var s [16]int8
814 x.ToInt8x16().Neg().StoreArray(&s)
815 return sliceToString(s[:])
816 }
817
818
819 func (x Mask16x8) String() string {
820 var s [8]int16
821 x.ToInt16x8().Neg().StoreArray(&s)
822 return sliceToString(s[:])
823 }
824
825
826 func (x Mask32x4) String() string {
827 var s [4]int32
828 x.ToInt32x4().Neg().StoreArray(&s)
829 return sliceToString(s[:])
830 }
831
832
833 func (x Mask64x2) String() string {
834 var s [2]int64
835 x.ToInt64x2().Neg().StoreArray(&s)
836 return sliceToString(s[:])
837 }
838
839
840 func (x Mask8x32) String() string {
841 var s [32]int8
842 x.ToInt8x32().Neg().StoreArray(&s)
843 return sliceToString(s[:])
844 }
845
846
847 func (x Mask16x16) String() string {
848 var s [16]int16
849 x.ToInt16x16().Neg().StoreArray(&s)
850 return sliceToString(s[:])
851 }
852
853
854 func (x Mask32x8) String() string {
855 var s [8]int32
856 x.ToInt32x8().Neg().StoreArray(&s)
857 return sliceToString(s[:])
858 }
859
860
861 func (x Mask64x4) String() string {
862 var s [4]int64
863 x.ToInt64x4().Neg().StoreArray(&s)
864 return sliceToString(s[:])
865 }
866
867
868 func (x Mask8x64) String() string {
869 var s [64]int8
870 x.ToInt8x64().Neg().StoreArray(&s)
871 return sliceToString(s[:])
872 }
873
874
875 func (x Mask16x32) String() string {
876 var s [32]int16
877 x.ToInt16x32().Neg().StoreArray(&s)
878 return sliceToString(s[:])
879 }
880
881
882 func (x Mask32x16) String() string {
883 var s [16]int32
884 x.ToInt32x16().Neg().StoreArray(&s)
885 return sliceToString(s[:])
886 }
887
888
889 func (x Mask64x8) String() string {
890 var s [8]int64
891 x.ToInt64x8().Neg().StoreArray(&s)
892 return sliceToString(s[:])
893 }
894
895
896
897
898 func (x Int16x8) RotateAllLeft(dist uint64) Int16x8 {
899 dist = dist & (16 - 1)
900 ndist := 16 - dist
901 return x.ToBits().ShiftAllLeft(dist).Or(x.ToBits().ShiftAllRight(ndist)).BitsToInt16()
902 }
903
904
905
906
907 func (x Int16x8) RotateAllRight(dist uint64) Int16x8 {
908 dist = dist & (16 - 1)
909 ndist := 16 - dist
910 return x.ToBits().ShiftAllLeft(ndist).Or(x.ToBits().ShiftAllRight(dist)).BitsToInt16()
911 }
912
913
914
915
916 func (x Int32x4) RotateAllLeft(dist uint64) Int32x4 {
917 dist = dist & (32 - 1)
918 ndist := 32 - dist
919 return x.ToBits().ShiftAllLeft(dist).Or(x.ToBits().ShiftAllRight(ndist)).BitsToInt32()
920 }
921
922
923
924
925 func (x Int32x4) RotateAllRight(dist uint64) Int32x4 {
926 dist = dist & (32 - 1)
927 ndist := 32 - dist
928 return x.ToBits().ShiftAllLeft(ndist).Or(x.ToBits().ShiftAllRight(dist)).BitsToInt32()
929 }
930
931
932
933
934 func (x Int64x2) RotateAllLeft(dist uint64) Int64x2 {
935 dist = dist & (64 - 1)
936 ndist := 64 - dist
937 return x.ToBits().ShiftAllLeft(dist).Or(x.ToBits().ShiftAllRight(ndist)).BitsToInt64()
938 }
939
940
941
942
943 func (x Int64x2) RotateAllRight(dist uint64) Int64x2 {
944 dist = dist & (64 - 1)
945 ndist := 64 - dist
946 return x.ToBits().ShiftAllLeft(ndist).Or(x.ToBits().ShiftAllRight(dist)).BitsToInt64()
947 }
948
949
950
951
952 func (x Int16x16) RotateAllLeft(dist uint64) Int16x16 {
953 dist = dist & (16 - 1)
954 ndist := 16 - dist
955 return x.ToBits().ShiftAllLeft(dist).Or(x.ToBits().ShiftAllRight(ndist)).BitsToInt16()
956 }
957
958
959
960
961 func (x Int16x16) RotateAllRight(dist uint64) Int16x16 {
962 dist = dist & (16 - 1)
963 ndist := 16 - dist
964 return x.ToBits().ShiftAllLeft(ndist).Or(x.ToBits().ShiftAllRight(dist)).BitsToInt16()
965 }
966
967
968
969
970 func (x Int32x8) RotateAllLeft(dist uint64) Int32x8 {
971 dist = dist & (32 - 1)
972 ndist := 32 - dist
973 return x.ToBits().ShiftAllLeft(dist).Or(x.ToBits().ShiftAllRight(ndist)).BitsToInt32()
974 }
975
976
977
978
979 func (x Int32x8) RotateAllRight(dist uint64) Int32x8 {
980 dist = dist & (32 - 1)
981 ndist := 32 - dist
982 return x.ToBits().ShiftAllLeft(ndist).Or(x.ToBits().ShiftAllRight(dist)).BitsToInt32()
983 }
984
985
986
987
988 func (x Int64x4) RotateAllLeft(dist uint64) Int64x4 {
989 dist = dist & (64 - 1)
990 ndist := 64 - dist
991 return x.ToBits().ShiftAllLeft(dist).Or(x.ToBits().ShiftAllRight(ndist)).BitsToInt64()
992 }
993
994
995
996
997 func (x Int64x4) RotateAllRight(dist uint64) Int64x4 {
998 dist = dist & (64 - 1)
999 ndist := 64 - dist
1000 return x.ToBits().ShiftAllLeft(ndist).Or(x.ToBits().ShiftAllRight(dist)).BitsToInt64()
1001 }
1002
1003
1004
1005
1006 func (x Int16x32) RotateAllLeft(dist uint64) Int16x32 {
1007 dist = dist & (16 - 1)
1008 ndist := 16 - dist
1009 return x.ToBits().ShiftAllLeft(dist).Or(x.ToBits().ShiftAllRight(ndist)).BitsToInt16()
1010 }
1011
1012
1013
1014
1015 func (x Int16x32) RotateAllRight(dist uint64) Int16x32 {
1016 dist = dist & (16 - 1)
1017 ndist := 16 - dist
1018 return x.ToBits().ShiftAllLeft(ndist).Or(x.ToBits().ShiftAllRight(dist)).BitsToInt16()
1019 }
1020
1021
1022
1023
1024 func (x Int32x16) RotateAllLeft(dist uint64) Int32x16 {
1025 dist = dist & (32 - 1)
1026 ndist := 32 - dist
1027 return x.ToBits().ShiftAllLeft(dist).Or(x.ToBits().ShiftAllRight(ndist)).BitsToInt32()
1028 }
1029
1030
1031
1032
1033 func (x Int32x16) RotateAllRight(dist uint64) Int32x16 {
1034 dist = dist & (32 - 1)
1035 ndist := 32 - dist
1036 return x.ToBits().ShiftAllLeft(ndist).Or(x.ToBits().ShiftAllRight(dist)).BitsToInt32()
1037 }
1038
1039
1040
1041
1042 func (x Int64x8) RotateAllLeft(dist uint64) Int64x8 {
1043 dist = dist & (64 - 1)
1044 ndist := 64 - dist
1045 return x.ToBits().ShiftAllLeft(dist).Or(x.ToBits().ShiftAllRight(ndist)).BitsToInt64()
1046 }
1047
1048
1049
1050
1051 func (x Int64x8) RotateAllRight(dist uint64) Int64x8 {
1052 dist = dist & (64 - 1)
1053 ndist := 64 - dist
1054 return x.ToBits().ShiftAllLeft(ndist).Or(x.ToBits().ShiftAllRight(dist)).BitsToInt64()
1055 }
1056
1057
1058
1059
1060 func (x Uint16x8) RotateAllLeft(dist uint64) Uint16x8 {
1061 dist = dist & (16 - 1)
1062 ndist := 16 - dist
1063 return x.ShiftAllLeft(dist).Or(x.ShiftAllRight(ndist))
1064 }
1065
1066
1067
1068
1069 func (x Uint16x8) RotateAllRight(dist uint64) Uint16x8 {
1070 dist = dist & (16 - 1)
1071 ndist := 16 - dist
1072 return x.ShiftAllLeft(ndist).Or(x.ShiftAllRight(dist))
1073 }
1074
1075
1076
1077
1078 func (x Uint32x4) RotateAllLeft(dist uint64) Uint32x4 {
1079 dist = dist & (32 - 1)
1080 ndist := 32 - dist
1081 return x.ShiftAllLeft(dist).Or(x.ShiftAllRight(ndist))
1082 }
1083
1084
1085
1086
1087 func (x Uint32x4) RotateAllRight(dist uint64) Uint32x4 {
1088 dist = dist & (32 - 1)
1089 ndist := 32 - dist
1090 return x.ShiftAllLeft(ndist).Or(x.ShiftAllRight(dist))
1091 }
1092
1093
1094
1095
1096 func (x Uint64x2) RotateAllLeft(dist uint64) Uint64x2 {
1097 dist = dist & (64 - 1)
1098 ndist := 64 - dist
1099 return x.ShiftAllLeft(dist).Or(x.ShiftAllRight(ndist))
1100 }
1101
1102
1103
1104
1105 func (x Uint64x2) RotateAllRight(dist uint64) Uint64x2 {
1106 dist = dist & (64 - 1)
1107 ndist := 64 - dist
1108 return x.ShiftAllLeft(ndist).Or(x.ShiftAllRight(dist))
1109 }
1110
1111
1112
1113
1114 func (x Uint16x16) RotateAllLeft(dist uint64) Uint16x16 {
1115 dist = dist & (16 - 1)
1116 ndist := 16 - dist
1117 return x.ShiftAllLeft(dist).Or(x.ShiftAllRight(ndist))
1118 }
1119
1120
1121
1122
1123 func (x Uint16x16) RotateAllRight(dist uint64) Uint16x16 {
1124 dist = dist & (16 - 1)
1125 ndist := 16 - dist
1126 return x.ShiftAllLeft(ndist).Or(x.ShiftAllRight(dist))
1127 }
1128
1129
1130
1131
1132 func (x Uint32x8) RotateAllLeft(dist uint64) Uint32x8 {
1133 dist = dist & (32 - 1)
1134 ndist := 32 - dist
1135 return x.ShiftAllLeft(dist).Or(x.ShiftAllRight(ndist))
1136 }
1137
1138
1139
1140
1141 func (x Uint32x8) RotateAllRight(dist uint64) Uint32x8 {
1142 dist = dist & (32 - 1)
1143 ndist := 32 - dist
1144 return x.ShiftAllLeft(ndist).Or(x.ShiftAllRight(dist))
1145 }
1146
1147
1148
1149
1150 func (x Uint64x4) RotateAllLeft(dist uint64) Uint64x4 {
1151 dist = dist & (64 - 1)
1152 ndist := 64 - dist
1153 return x.ShiftAllLeft(dist).Or(x.ShiftAllRight(ndist))
1154 }
1155
1156
1157
1158
1159 func (x Uint64x4) RotateAllRight(dist uint64) Uint64x4 {
1160 dist = dist & (64 - 1)
1161 ndist := 64 - dist
1162 return x.ShiftAllLeft(ndist).Or(x.ShiftAllRight(dist))
1163 }
1164
1165
1166
1167
1168 func (x Uint16x32) RotateAllLeft(dist uint64) Uint16x32 {
1169 dist = dist & (16 - 1)
1170 ndist := 16 - dist
1171 return x.ShiftAllLeft(dist).Or(x.ShiftAllRight(ndist))
1172 }
1173
1174
1175
1176
1177 func (x Uint16x32) RotateAllRight(dist uint64) Uint16x32 {
1178 dist = dist & (16 - 1)
1179 ndist := 16 - dist
1180 return x.ShiftAllLeft(ndist).Or(x.ShiftAllRight(dist))
1181 }
1182
1183
1184
1185
1186 func (x Uint32x16) RotateAllLeft(dist uint64) Uint32x16 {
1187 dist = dist & (32 - 1)
1188 ndist := 32 - dist
1189 return x.ShiftAllLeft(dist).Or(x.ShiftAllRight(ndist))
1190 }
1191
1192
1193
1194
1195 func (x Uint32x16) RotateAllRight(dist uint64) Uint32x16 {
1196 dist = dist & (32 - 1)
1197 ndist := 32 - dist
1198 return x.ShiftAllLeft(ndist).Or(x.ShiftAllRight(dist))
1199 }
1200
1201
1202
1203
1204 func (x Uint64x8) RotateAllLeft(dist uint64) Uint64x8 {
1205 dist = dist & (64 - 1)
1206 ndist := 64 - dist
1207 return x.ShiftAllLeft(dist).Or(x.ShiftAllRight(ndist))
1208 }
1209
1210
1211
1212
1213 func (x Uint64x8) RotateAllRight(dist uint64) Uint64x8 {
1214 dist = dist & (64 - 1)
1215 ndist := 64 - dist
1216 return x.ShiftAllLeft(ndist).Or(x.ShiftAllRight(dist))
1217 }
1218
View as plain text