This repository was archived by the owner on Jan 23, 2023. It is now read-only.
Repository navigation
Expand file tree
/
Copy pathAvx2.cs
More file actions
2669 lines (2546 loc) · 140 KB
/
Copy pathAvx2.cs
File metadata and controls
2669 lines (2546 loc) · 140 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Runtime.CompilerServices;
namespace System.Runtime.Intrinsics.X86
{
/// <summary>
/// This class provides access to Intel AVX2 hardware instructions via intrinsics
/// </summary>
[Intrinsic]
[CLSCompliant(false)]
public abstract class Avx2 : Avx
{
internal Avx2() { }
public static new bool IsSupported { get => IsSupported; }
/// <summary>
/// __m256i _mm256_abs_epi8 (__m256i a)
/// VPABSB ymm, ymm/m256
/// </summary>
public static Vector256<byte> Abs(Vector256<sbyte> value) => Abs(value);
/// <summary>
/// __m256i _mm256_abs_epi16 (__m256i a)
/// VPABSW ymm, ymm/m256
/// </summary>
public static Vector256<ushort> Abs(Vector256<short> value) => Abs(value);
/// <summary>
/// __m256i _mm256_abs_epi32 (__m256i a)
/// VPABSD ymm, ymm/m256
/// </summary>
public static Vector256<uint> Abs(Vector256<int> value) => Abs(value);
/// <summary>
/// __m256i _mm256_add_epi8 (__m256i a, __m256i b)
/// VPADDB ymm, ymm, ymm/m256
/// </summary>
public static Vector256<sbyte> Add(Vector256<sbyte> left, Vector256<sbyte> right) => Add(left, right);
/// <summary>
/// __m256i _mm256_add_epi8 (__m256i a, __m256i b)
/// VPADDB ymm, ymm, ymm/m256
/// </summary>
public static Vector256<byte> Add(Vector256<byte> left, Vector256<byte> right) => Add(left, right);
/// <summary>
/// __m256i _mm256_add_epi16 (__m256i a, __m256i b)
/// VPADDW ymm, ymm, ymm/m256
/// </summary>
public static Vector256<short> Add(Vector256<short> left, Vector256<short> right) => Add(left, right);
/// <summary>
/// __m256i _mm256_add_epi16 (__m256i a, __m256i b)
/// VPADDW ymm, ymm, ymm/m256
/// </summary>
public static Vector256<ushort> Add(Vector256<ushort> left, Vector256<ushort> right) => Add(left, right);
/// <summary>
/// __m256i _mm256_add_epi32 (__m256i a, __m256i b)
/// VPADDD ymm, ymm, ymm/m256
/// </summary>
public static Vector256<int> Add(Vector256<int> left, Vector256<int> right) => Add(left, right);
/// <summary>
/// __m256i _mm256_add_epi32 (__m256i a, __m256i b)
/// VPADDD ymm, ymm, ymm/m256
/// </summary>
public static Vector256<uint> Add(Vector256<uint> left, Vector256<uint> right) => Add(left, right);
/// <summary>
/// __m256i _mm256_add_epi64 (__m256i a, __m256i b)
/// VPADDQ ymm, ymm, ymm/m256
/// </summary>
public static Vector256<long> Add(Vector256<long> left, Vector256<long> right) => Add(left, right);
/// <summary>
/// __m256i _mm256_add_epi64 (__m256i a, __m256i b)
/// VPADDQ ymm, ymm, ymm/m256
/// </summary>
public static Vector256<ulong> Add(Vector256<ulong> left, Vector256<ulong> right) => Add(left, right);
/// <summary>
/// __m256i _mm256_adds_epi8 (__m256i a, __m256i b)
/// VPADDSB ymm, ymm, ymm/m256
/// </summary>
public static Vector256<sbyte> AddSaturate(Vector256<sbyte> left, Vector256<sbyte> right) => AddSaturate(left, right);
/// <summary>
/// __m256i _mm256_adds_epu8 (__m256i a, __m256i b)
/// VPADDUSB ymm, ymm, ymm/m256
/// </summary>
public static Vector256<byte> AddSaturate(Vector256<byte> left, Vector256<byte> right) => AddSaturate(left, right);
/// <summary>
/// __m256i _mm256_adds_epi16 (__m256i a, __m256i b)
/// VPADDSW ymm, ymm, ymm/m256
/// </summary>
public static Vector256<short> AddSaturate(Vector256<short> left, Vector256<short> right) => AddSaturate(left, right);
/// <summary>
/// __m256i _mm256_adds_epu16 (__m256i a, __m256i b)
/// VPADDUSW ymm, ymm, ymm/m256
/// </summary>
public static Vector256<ushort> AddSaturate(Vector256<ushort> left, Vector256<ushort> right) => AddSaturate(left, right);
/// <summary>
/// __m256i _mm256_alignr_epi8 (__m256i a, __m256i b, const int count)
/// VPALIGNR ymm, ymm, ymm/m256, imm8
/// </summary>
public static Vector256<sbyte> AlignRight(Vector256<sbyte> left, Vector256<sbyte> right, byte mask) => AlignRight(left, right, mask);
/// <summary>
/// __m256i _mm256_alignr_epi8 (__m256i a, __m256i b, const int count)
/// VPALIGNR ymm, ymm, ymm/m256, imm8
/// </summary>
public static Vector256<byte> AlignRight(Vector256<byte> left, Vector256<byte> right, byte mask) => AlignRight(left, right, mask);
/// <summary>
/// __m256i _mm256_alignr_epi8 (__m256i a, __m256i b, const int count)
/// VPALIGNR ymm, ymm, ymm/m256, imm8
/// This intrinsic generates VPALIGNR that operates over bytes rather than elements of the vectors.
/// </summary>
public static Vector256<short> AlignRight(Vector256<short> left, Vector256<short> right, byte mask) => AlignRight(left, right, mask);
/// <summary>
/// __m256i _mm256_alignr_epi8 (__m256i a, __m256i b, const int count)
/// VPALIGNR ymm, ymm, ymm/m256, imm8
/// This intrinsic generates VPALIGNR that operates over bytes rather than elements of the vectors.
/// </summary>
public static Vector256<ushort> AlignRight(Vector256<ushort> left, Vector256<ushort> right, byte mask) => AlignRight(left, right, mask);
/// <summary>
/// __m256i _mm256_alignr_epi8 (__m256i a, __m256i b, const int count)
/// VPALIGNR ymm, ymm, ymm/m256, imm8
/// This intrinsic generates VPALIGNR that operates over bytes rather than elements of the vectors.
/// </summary>
public static Vector256<int> AlignRight(Vector256<int> left, Vector256<int> right, byte mask) => AlignRight(left, right, mask);
/// <summary>
/// __m256i _mm256_alignr_epi8 (__m256i a, __m256i b, const int count)
/// VPALIGNR ymm, ymm, ymm/m256, imm8
/// This intrinsic generates VPALIGNR that operates over bytes rather than elements of the vectors.
/// </summary>
public static Vector256<uint> AlignRight(Vector256<uint> left, Vector256<uint> right, byte mask) => AlignRight(left, right, mask);
/// <summary>
/// __m256i _mm256_alignr_epi8 (__m256i a, __m256i b, const int count)
/// VPALIGNR ymm, ymm, ymm/m256, imm8
/// This intrinsic generates VPALIGNR that operates over bytes rather than elements of the vectors.
/// </summary>
public static Vector256<long> AlignRight(Vector256<long> left, Vector256<long> right, byte mask) => AlignRight(left, right, mask);
/// <summary>
/// __m256i _mm256_alignr_epi8 (__m256i a, __m256i b, const int count)
/// VPALIGNR ymm, ymm, ymm/m256, imm8
/// This intrinsic generates VPALIGNR that operates over bytes rather than elements of the vectors.
/// </summary>
public static Vector256<ulong> AlignRight(Vector256<ulong> left, Vector256<ulong> right, byte mask) => AlignRight(left, right, mask);
/// <summary>
/// __m256i _mm256_and_si256 (__m256i a, __m256i b)
/// VPAND ymm, ymm, ymm/m256
/// </summary>
public static Vector256<sbyte> And(Vector256<sbyte> left, Vector256<sbyte> right) => And(left, right);
/// <summary>
/// __m256i _mm256_and_si256 (__m256i a, __m256i b)
/// VPAND ymm, ymm, ymm/m256
/// </summary>
public static Vector256<byte> And(Vector256<byte> left, Vector256<byte> right) => And(left, right);
/// <summary>
/// __m256i _mm256_and_si256 (__m256i a, __m256i b)
/// VPAND ymm, ymm, ymm/m256
/// </summary>
public static Vector256<short> And(Vector256<short> left, Vector256<short> right) => And(left, right);
/// <summary>
/// __m256i _mm256_and_si256 (__m256i a, __m256i b)
/// VPAND ymm, ymm, ymm/m256
/// </summary>
public static Vector256<ushort> And(Vector256<ushort> left, Vector256<ushort> right) => And(left, right);
/// <summary>
/// __m256i _mm256_and_si256 (__m256i a, __m256i b)
/// VPAND ymm, ymm, ymm/m256
/// </summary>
public static Vector256<int> And(Vector256<int> left, Vector256<int> right) => And(left, right);
/// <summary>
/// __m256i _mm256_and_si256 (__m256i a, __m256i b)
/// VPAND ymm, ymm, ymm/m256
/// </summary>
public static Vector256<uint> And(Vector256<uint> left, Vector256<uint> right) => And(left, right);
/// <summary>
/// __m256i _mm256_and_si256 (__m256i a, __m256i b)
/// VPAND ymm, ymm, ymm/m256
/// </summary>
public static Vector256<long> And(Vector256<long> left, Vector256<long> right) => And(left, right);
/// <summary>
/// __m256i _mm256_and_si256 (__m256i a, __m256i b)
/// VPAND ymm, ymm, ymm/m256
/// </summary>
public static Vector256<ulong> And(Vector256<ulong> left, Vector256<ulong> right) => And(left, right);
/// <summary>
/// __m256i _mm256_andnot_si256 (__m256i a, __m256i b)
/// VPANDN ymm, ymm, ymm/m256
/// </summary>
public static Vector256<sbyte> AndNot(Vector256<sbyte> left, Vector256<sbyte> right) => AndNot(left, right);
/// <summary>
/// __m256i _mm256_andnot_si256 (__m256i a, __m256i b)
/// VPANDN ymm, ymm, ymm/m256
/// </summary>
public static Vector256<byte> AndNot(Vector256<byte> left, Vector256<byte> right) => AndNot(left, right);
/// <summary>
/// __m256i _mm256_andnot_si256 (__m256i a, __m256i b)
/// VPANDN ymm, ymm, ymm/m256
/// </summary>
public static Vector256<short> AndNot(Vector256<short> left, Vector256<short> right) => AndNot(left, right);
/// <summary>
/// __m256i _mm256_andnot_si256 (__m256i a, __m256i b)
/// VPANDN ymm, ymm, ymm/m256
/// </summary>
public static Vector256<ushort> AndNot(Vector256<ushort> left, Vector256<ushort> right) => AndNot(left, right);
/// <summary>
/// __m256i _mm256_andnot_si256 (__m256i a, __m256i b)
/// VPANDN ymm, ymm, ymm/m256
/// </summary>
public static Vector256<int> AndNot(Vector256<int> left, Vector256<int> right) => AndNot(left, right);
/// <summary>
/// __m256i _mm256_andnot_si256 (__m256i a, __m256i b)
/// VPANDN ymm, ymm, ymm/m256
/// </summary>
public static Vector256<uint> AndNot(Vector256<uint> left, Vector256<uint> right) => AndNot(left, right);
/// <summary>
/// __m256i _mm256_andnot_si256 (__m256i a, __m256i b)
/// VPANDN ymm, ymm, ymm/m256
/// </summary>
public static Vector256<long> AndNot(Vector256<long> left, Vector256<long> right) => AndNot(left, right);
/// <summary>
/// __m256i _mm256_andnot_si256 (__m256i a, __m256i b)
/// VPANDN ymm, ymm, ymm/m256
/// </summary>
public static Vector256<ulong> AndNot(Vector256<ulong> left, Vector256<ulong> right) => AndNot(left, right);
/// <summary>
/// __m256i _mm256_avg_epu8 (__m256i a, __m256i b)
/// VPAVGB ymm, ymm, ymm/m256
/// </summary>
public static Vector256<byte> Average(Vector256<byte> left, Vector256<byte> right) => Average(left, right);
/// <summary>
/// __m256i _mm256_avg_epu16 (__m256i a, __m256i b)
/// VPAVGW ymm, ymm, ymm/m256
/// </summary>
public static Vector256<ushort> Average(Vector256<ushort> left, Vector256<ushort> right) => Average(left, right);
/// <summary>
/// __m128i _mm_blend_epi32 (__m128i a, __m128i b, const int imm8)
/// VPBLENDD xmm, xmm, xmm/m128, imm8
/// </summary>
public static Vector128<int> Blend(Vector128<int> left, Vector128<int> right, byte control) => Blend(left, right, control);
/// <summary>
/// __m128i _mm_blend_epi32 (__m128i a, __m128i b, const int imm8)
/// VPBLENDD xmm, xmm, xmm/m128, imm8
/// </summary>
public static Vector128<uint> Blend(Vector128<uint> left, Vector128<uint> right, byte control) => Blend(left, right, control);
/// <summary>
/// __m256i _mm256_blend_epi16 (__m256i a, __m256i b, const int imm8)
/// VPBLENDW ymm, ymm, ymm/m256, imm8
/// </summary>
public static Vector256<short> Blend(Vector256<short> left, Vector256<short> right, byte control) => Blend(left, right, control);
/// <summary>
/// __m256i _mm256_blend_epi16 (__m256i a, __m256i b, const int imm8)
/// VPBLENDW ymm, ymm, ymm/m256, imm8
/// </summary>
public static Vector256<ushort> Blend(Vector256<ushort> left, Vector256<ushort> right, byte control) => Blend(left, right, control);
/// <summary>
/// __m256i _mm256_blend_epi32 (__m256i a, __m256i b, const int imm8)
/// VPBLENDD ymm, ymm, ymm/m256, imm8
/// </summary>
public static Vector256<int> Blend(Vector256<int> left, Vector256<int> right, byte control) => Blend(left, right, control);
/// <summary>
/// __m256i _mm256_blend_epi32 (__m256i a, __m256i b, const int imm8)
/// VPBLENDD ymm, ymm, ymm/m256, imm8
/// </summary>
public static Vector256<uint> Blend(Vector256<uint> left, Vector256<uint> right, byte control) => Blend(left, right, control);
/// <summary>
/// __m256i _mm256_blendv_epi8 (__m256i a, __m256i b, __m256i mask)
/// VPBLENDVB ymm, ymm, ymm/m256, ymm
/// </summary>
public static Vector256<sbyte> BlendVariable(Vector256<sbyte> left, Vector256<sbyte> right, Vector256<sbyte> mask) => BlendVariable(left, right, mask);
/// <summary>
/// __m256i _mm256_blendv_epi8 (__m256i a, __m256i b, __m256i mask)
/// VPBLENDVB ymm, ymm, ymm/m256, ymm
/// </summary>
public static Vector256<byte> BlendVariable(Vector256<byte> left, Vector256<byte> right, Vector256<byte> mask) => BlendVariable(left, right, mask);
/// <summary>
/// __m256i _mm256_blendv_epi8 (__m256i a, __m256i b, __m256i mask)
/// VPBLENDVB ymm, ymm, ymm/m256, ymm
/// This intrinsic generates VPBLENDVB that needs a BYTE mask-vector, so users should correctly set each mask byte for the selected elements.
/// </summary>
public static Vector256<short> BlendVariable(Vector256<short> left, Vector256<short> right, Vector256<short> mask) => BlendVariable(left, right, mask);
/// <summary>
/// __m256i _mm256_blendv_epi8 (__m256i a, __m256i b, __m256i mask)
/// VPBLENDVB ymm, ymm, ymm/m256, ymm
/// This intrinsic generates VPBLENDVB that needs a BYTE mask-vector, so users should correctly set each mask byte for the selected elements.
/// </summary>
public static Vector256<ushort> BlendVariable(Vector256<ushort> left, Vector256<ushort> right, Vector256<ushort> mask) => BlendVariable(left, right, mask);
/// <summary>
/// __m256i _mm256_blendv_epi8 (__m256i a, __m256i b, __m256i mask)
/// VPBLENDVB ymm, ymm, ymm/m256, ymm
/// This intrinsic generates VPBLENDVB that needs a BYTE mask-vector, so users should correctly set each mask byte for the selected elements.
/// </summary>
public static Vector256<int> BlendVariable(Vector256<int> left, Vector256<int> right, Vector256<int> mask) => BlendVariable(left, right, mask);
/// <summary>
/// __m256i _mm256_blendv_epi8 (__m256i a, __m256i b, __m256i mask)
/// VPBLENDVB ymm, ymm, ymm/m256, ymm
/// This intrinsic generates VPBLENDVB that needs a BYTE mask-vector, so users should correctly set each mask byte for the selected elements.
/// </summary>
public static Vector256<uint> BlendVariable(Vector256<uint> left, Vector256<uint> right, Vector256<uint> mask) => BlendVariable(left, right, mask);
/// <summary>
/// __m256i _mm256_blendv_epi8 (__m256i a, __m256i b, __m256i mask)
/// VPBLENDVB ymm, ymm, ymm/m256, ymm
/// This intrinsic generates VPBLENDVB that needs a BYTE mask-vector, so users should correctly set each mask byte for the selected elements.
/// </summary>
public static Vector256<long> BlendVariable(Vector256<long> left, Vector256<long> right, Vector256<long> mask) => BlendVariable(left, right, mask);
/// <summary>
/// __m256i _mm256_blendv_epi8 (__m256i a, __m256i b, __m256i mask)
/// VPBLENDVB ymm, ymm, ymm/m256, ymm
/// This intrinsic generates VPBLENDVB that needs a BYTE mask-vector, so users should correctly set each mask byte for the selected elements.
/// </summary>
public static Vector256<ulong> BlendVariable(Vector256<ulong> left, Vector256<ulong> right, Vector256<ulong> mask) => BlendVariable(left, right, mask);
/// <summary>
/// __m128i _mm_broadcastb_epi8 (__m128i a)
/// VPBROADCASTB xmm, xmm
/// </summary>
public static Vector128<byte> BroadcastScalarToVector128(Vector128<byte> value) => BroadcastScalarToVector128(value);
/// <summary>
/// __m128i _mm_broadcastb_epi8 (__m128i a)
/// VPBROADCASTB xmm, xmm
/// </summary>
public static Vector128<sbyte> BroadcastScalarToVector128(Vector128<sbyte> value) => BroadcastScalarToVector128(value);
/// <summary>
/// __m128i _mm_broadcastw_epi16 (__m128i a)
/// VPBROADCASTW xmm, xmm
/// </summary>
public static Vector128<short> BroadcastScalarToVector128(Vector128<short> value) => BroadcastScalarToVector128(value);
/// <summary>
/// __m128i _mm_broadcastw_epi16 (__m128i a)
/// VPBROADCASTW xmm, xmm
/// </summary>
public static Vector128<ushort> BroadcastScalarToVector128(Vector128<ushort> value) => BroadcastScalarToVector128(value);
/// <summary>
/// __m128i _mm_broadcastd_epi32 (__m128i a)
/// VPBROADCASTD xmm, xmm
/// </summary>
public static Vector128<int> BroadcastScalarToVector128(Vector128<int> value) => BroadcastScalarToVector128(value);
/// <summary>
/// __m128i _mm_broadcastd_epi32 (__m128i a)
/// VPBROADCASTD xmm, xmm
/// </summary>
public static Vector128<uint> BroadcastScalarToVector128(Vector128<uint> value) => BroadcastScalarToVector128(value);
/// <summary>
/// __m128i _mm_broadcastq_epi64 (__m128i a)
/// VPBROADCASTQ xmm, xmm
/// </summary>
public static Vector128<long> BroadcastScalarToVector128(Vector128<long> value) => BroadcastScalarToVector128(value);
/// <summary>
/// __m128i _mm_broadcastq_epi64 (__m128i a)
/// VPBROADCASTQ xmm, xmm
/// </summary>
public static Vector128<ulong> BroadcastScalarToVector128(Vector128<ulong> value) => BroadcastScalarToVector128(value);
/// <summary>
/// __m128 _mm_broadcastss_ps (__m128 a)
/// VBROADCASTSS xmm, xmm
/// </summary>
public static Vector128<float> BroadcastScalarToVector128(Vector128<float> value) => BroadcastScalarToVector128(value);
/// <summary>
/// __m128d _mm_broadcastsd_pd (__m128d a)
/// VMOVDDUP xmm, xmm
/// </summary>
public static Vector128<double> BroadcastScalarToVector128(Vector128<double> value) => BroadcastScalarToVector128(value);
/// <summary>
/// __m128i _mm_broadcastb_epi8 (__m128i a)
/// VPBROADCASTB xmm, m8
/// The above native signature does not directly correspond to the managed signature.
/// </summary>
public static unsafe Vector128<byte> BroadcastScalarToVector128(byte* source) => BroadcastScalarToVector128(source);
/// <summary>
/// __m128i _mm_broadcastb_epi8 (__m128i a)
/// VPBROADCASTB xmm, m8
/// The above native signature does not directly correspond to the managed signature.
/// </summary>
public static unsafe Vector128<sbyte> BroadcastScalarToVector128(sbyte* source) => BroadcastScalarToVector128(source);
/// <summary>
/// __m128i _mm_broadcastw_epi16 (__m128i a)
/// VPBROADCASTW xmm, m16
/// The above native signature does not directly correspond to the managed signature.
/// </summary>
public static unsafe Vector128<short> BroadcastScalarToVector128(short* source) => BroadcastScalarToVector128(source);
/// <summary>
/// __m128i _mm_broadcastw_epi16 (__m128i a)
/// VPBROADCASTW xmm, m16
/// The above native signature does not directly correspond to the managed signature.
/// </summary>
public static unsafe Vector128<ushort> BroadcastScalarToVector128(ushort* source) => BroadcastScalarToVector128(source);
/// <summary>
/// __m128i _mm_broadcastd_epi32 (__m128i a)
/// VPBROADCASTD xmm, m32
/// The above native signature does not directly correspond to the managed signature.
/// </summary>
public static unsafe Vector128<int> BroadcastScalarToVector128(int* source) => BroadcastScalarToVector128(source);
/// <summary>
/// __m128i _mm_broadcastd_epi32 (__m128i a)
/// VPBROADCASTD xmm, m32
/// The above native signature does not directly correspond to the managed signature.
/// </summary>
public static unsafe Vector128<uint> BroadcastScalarToVector128(uint* source) => BroadcastScalarToVector128(source);
/// <summary>
/// __m128i _mm_broadcastq_epi64 (__m128i a)
/// VPBROADCASTQ xmm, m64
/// The above native signature does not directly correspond to the managed signature.
/// </summary>
public static unsafe Vector128<long> BroadcastScalarToVector128(long* source) => BroadcastScalarToVector128(source);
/// <summary>
/// __m128i _mm_broadcastq_epi64 (__m128i a)
/// VPBROADCASTQ xmm, m64
/// The above native signature does not directly correspond to the managed signature.
/// </summary>
public static unsafe Vector128<ulong> BroadcastScalarToVector128(ulong* source) => BroadcastScalarToVector128(source);
/// <summary>
/// __m256i _mm256_broadcastb_epi8 (__m128i a)
/// VPBROADCASTB ymm, xmm
/// </summary>
public static Vector256<byte> BroadcastScalarToVector256(Vector128<byte> value) => BroadcastScalarToVector256(value);
/// <summary>
/// __m256i _mm256_broadcastb_epi8 (__m128i a)
/// VPBROADCASTB ymm, xmm
/// </summary>
public static Vector256<sbyte> BroadcastScalarToVector256(Vector128<sbyte> value) => BroadcastScalarToVector256(value);
/// <summary>
/// __m256i _mm256_broadcastw_epi16 (__m128i a)
/// VPBROADCASTW ymm, xmm
/// </summary>
public static Vector256<short> BroadcastScalarToVector256(Vector128<short> value) => BroadcastScalarToVector256(value);
/// <summary>
/// __m256i _mm256_broadcastw_epi16 (__m128i a)
/// VPBROADCASTW ymm, xmm
/// </summary>
public static Vector256<ushort> BroadcastScalarToVector256(Vector128<ushort> value) => BroadcastScalarToVector256(value);
/// <summary>
/// __m256i _mm256_broadcastd_epi32 (__m128i a)
/// VPBROADCASTD ymm, xmm
/// </summary>
public static Vector256<int> BroadcastScalarToVector256(Vector128<int> value) => BroadcastScalarToVector256(value);
/// <summary>
/// __m256i _mm256_broadcastd_epi32 (__m128i a)
/// VPBROADCASTD ymm, xmm
/// </summary>
public static Vector256<uint> BroadcastScalarToVector256(Vector128<uint> value) => BroadcastScalarToVector256(value);
/// <summary>
/// __m256i _mm256_broadcastq_epi64 (__m128i a)
/// VPBROADCASTQ ymm, xmm
/// </summary>
public static Vector256<long> BroadcastScalarToVector256(Vector128<long> value) => BroadcastScalarToVector256(value);
/// <summary>
/// __m256i _mm256_broadcastq_epi64 (__m128i a)
/// VPBROADCASTQ ymm, xmm
/// </summary>
public static Vector256<ulong> BroadcastScalarToVector256(Vector128<ulong> value) => BroadcastScalarToVector256(value);
/// <summary>
/// __m256 _mm256_broadcastss_ps (__m128 a)
/// VBROADCASTSS ymm, xmm
/// </summary>
public static Vector256<float> BroadcastScalarToVector256(Vector128<float> value) => BroadcastScalarToVector256(value);
/// <summary>
/// __m256d _mm256_broadcastsd_pd (__m128d a)
/// VBROADCASTSD ymm, xmm
/// </summary>
public static Vector256<double> BroadcastScalarToVector256(Vector128<double> value) => BroadcastScalarToVector256(value);
/// <summary>
/// __m256i _mm256_broadcastb_epi8 (__m128i a)
/// VPBROADCASTB ymm, m8
/// The above native signature does not directly correspond to the managed signature.
/// </summary>
public static unsafe Vector256<byte> BroadcastScalarToVector256(byte* source) => BroadcastScalarToVector256(source);
/// <summary>
/// __m256i _mm256_broadcastb_epi8 (__m128i a)
/// VPBROADCASTB ymm, m8
/// The above native signature does not directly correspond to the managed signature.
/// </summary>
public static unsafe Vector256<sbyte> BroadcastScalarToVector256(sbyte* source) => BroadcastScalarToVector256(source);
/// <summary>
/// __m256i _mm256_broadcastw_epi16 (__m128i a)
/// VPBROADCASTW ymm, m16
/// The above native signature does not directly correspond to the managed signature.
/// </summary>
public static unsafe Vector256<short> BroadcastScalarToVector256(short* source) => BroadcastScalarToVector256(source);
/// <summary>
/// __m256i _mm256_broadcastw_epi16 (__m128i a)
/// VPBROADCASTW ymm, m16
/// The above native signature does not directly correspond to the managed signature.
/// </summary>
public static unsafe Vector256<ushort> BroadcastScalarToVector256(ushort* source) => BroadcastScalarToVector256(source);
/// <summary>
/// __m256i _mm256_broadcastd_epi32 (__m128i a)
/// VPBROADCASTD ymm, m32
/// The above native signature does not directly correspond to the managed signature.
/// </summary>
public static unsafe Vector256<int> BroadcastScalarToVector256(int* source) => BroadcastScalarToVector256(source);
/// <summary>
/// __m256i _mm256_broadcastd_epi32 (__m128i a)
/// VPBROADCASTD ymm, m32
/// The above native signature does not directly correspond to the managed signature.
/// </summary>
public static unsafe Vector256<uint> BroadcastScalarToVector256(uint* source) => BroadcastScalarToVector256(source);
/// <summary>
/// __m256i _mm256_broadcastq_epi64 (__m128i a)
/// VPBROADCASTQ ymm, m64
/// The above native signature does not directly correspond to the managed signature.
/// </summary>
public static unsafe Vector256<long> BroadcastScalarToVector256(long* source) => BroadcastScalarToVector256(source);
/// <summary>
/// __m256i _mm256_broadcastq_epi64 (__m128i a)
/// VPBROADCASTQ ymm, m64
/// The above native signature does not directly correspond to the managed signature.
/// </summary>
public static unsafe Vector256<ulong> BroadcastScalarToVector256(ulong* source) => BroadcastScalarToVector256(source);
/// <summary>
/// __m256i _mm256_broadcastsi128_si256 (__m128i a)
/// VBROADCASTI128 ymm, m128
/// The above native signature does not directly correspond to the managed signature.
/// </summary>
public static unsafe Vector256<sbyte> BroadcastVector128ToVector256(sbyte* address) => BroadcastVector128ToVector256(address);
/// <summary>
/// __m256i _mm256_broadcastsi128_si256 (__m128i a)
/// VBROADCASTI128 ymm, m128
/// The above native signature does not directly correspond to the managed signature.
/// </summary>
public static unsafe Vector256<byte> BroadcastVector128ToVector256(byte* address) => BroadcastVector128ToVector256(address);
/// <summary>
/// __m256i _mm256_broadcastsi128_si256 (__m128i a)
/// VBROADCASTI128 ymm, m128
/// The above native signature does not directly correspond to the managed signature.
/// </summary>
public static unsafe Vector256<short> BroadcastVector128ToVector256(short* address) => BroadcastVector128ToVector256(address);
/// <summary>
/// __m256i _mm256_broadcastsi128_si256 (__m128i a)
/// VBROADCASTI128 ymm, m128
/// The above native signature does not directly correspond to the managed signature.
/// </summary>
public static unsafe Vector256<ushort> BroadcastVector128ToVector256(ushort* address) => BroadcastVector128ToVector256(address);
/// <summary>
/// __m256i _mm256_broadcastsi128_si256 (__m128i a)
/// VBROADCASTI128 ymm, m128
/// The above native signature does not directly correspond to the managed signature.
/// </summary>
public static unsafe Vector256<int> BroadcastVector128ToVector256(int* address) => BroadcastVector128ToVector256(address);
/// <summary>
/// __m256i _mm256_broadcastsi128_si256 (__m128i a)
/// VBROADCASTI128 ymm, m128
/// The above native signature does not directly correspond to the managed signature.
/// </summary>
public static unsafe Vector256<uint> BroadcastVector128ToVector256(uint* address) => BroadcastVector128ToVector256(address);
/// <summary>
/// __m256i _mm256_broadcastsi128_si256 (__m128i a)
/// VBROADCASTI128 ymm, m128
/// The above native signature does not directly correspond to the managed signature.
/// </summary>
public static unsafe Vector256<long> BroadcastVector128ToVector256(long* address) => BroadcastVector128ToVector256(address);
/// <summary>
/// __m256i _mm256_broadcastsi128_si256 (__m128i a)
/// VBROADCASTI128 ymm, m128
/// The above native signature does not directly correspond to the managed signature.
/// </summary>
public static unsafe Vector256<ulong> BroadcastVector128ToVector256(ulong* address) => BroadcastVector128ToVector256(address);
/// <summary>
/// __m256i _mm256_cmpeq_epi8 (__m256i a, __m256i b)
/// VPCMPEQB ymm, ymm, ymm/m256
/// </summary>
public static Vector256<sbyte> CompareEqual(Vector256<sbyte> left, Vector256<sbyte> right) => CompareEqual(left, right);
/// <summary>
/// __m256i _mm256_cmpeq_epi8 (__m256i a, __m256i b)
/// VPCMPEQB ymm, ymm, ymm/m256
/// </summary>
public static Vector256<byte> CompareEqual(Vector256<byte> left, Vector256<byte> right) => CompareEqual(left, right);
/// <summary>
/// __m256i _mm256_cmpeq_epi16 (__m256i a, __m256i b)
/// VPCMPEQW ymm, ymm, ymm/m256
/// </summary>
public static Vector256<short> CompareEqual(Vector256<short> left, Vector256<short> right) => CompareEqual(left, right);
/// <summary>
/// __m256i _mm256_cmpeq_epi16 (__m256i a, __m256i b)
/// VPCMPEQW ymm, ymm, ymm/m256
/// </summary>
public static Vector256<ushort> CompareEqual(Vector256<ushort> left, Vector256<ushort> right) => CompareEqual(left, right);
/// <summary>
/// __m256i _mm256_cmpeq_epi32 (__m256i a, __m256i b)
/// VPCMPEQD ymm, ymm, ymm/m256
/// </summary>
public static Vector256<int> CompareEqual(Vector256<int> left, Vector256<int> right) => CompareEqual(left, right);
/// <summary>
/// __m256i _mm256_cmpeq_epi32 (__m256i a, __m256i b)
/// VPCMPEQD ymm, ymm, ymm/m256
/// </summary>
public static Vector256<uint> CompareEqual(Vector256<uint> left, Vector256<uint> right) => CompareEqual(left, right);
/// <summary>
/// __m256i _mm256_cmpeq_epi64 (__m256i a, __m256i b)
/// VPCMPEQQ ymm, ymm, ymm/m256
/// </summary>
public static Vector256<long> CompareEqual(Vector256<long> left, Vector256<long> right) => CompareEqual(left, right);
/// <summary>
/// __m256i _mm256_cmpeq_epi64 (__m256i a, __m256i b)
/// VPCMPEQQ ymm, ymm, ymm/m256
/// </summary>
public static Vector256<ulong> CompareEqual(Vector256<ulong> left, Vector256<ulong> right) => CompareEqual(left, right);
/// <summary>
/// __m256i _mm256_cmpgt_epi8 (__m256i a, __m256i b)
/// VPCMPGTB ymm, ymm, ymm/m256
/// </summary>
public static Vector256<sbyte> CompareGreaterThan(Vector256<sbyte> left, Vector256<sbyte> right) => CompareGreaterThan(left, right);
/// <summary>
/// __m256i _mm256_cmpgt_epi16 (__m256i a, __m256i b)
/// VPCMPGTW ymm, ymm, ymm/m256
/// </summary>
public static Vector256<short> CompareGreaterThan(Vector256<short> left, Vector256<short> right) => CompareGreaterThan(left, right);
/// <summary>
/// __m256i _mm256_cmpgt_epi32 (__m256i a, __m256i b)
/// VPCMPGTD ymm, ymm, ymm/m256
/// </summary>
public static Vector256<int> CompareGreaterThan(Vector256<int> left, Vector256<int> right) => CompareGreaterThan(left, right);
/// <summary>
/// __m256i _mm256_cmpgt_epi64 (__m256i a, __m256i b)
/// VPCMPGTQ ymm, ymm, ymm/m256
/// </summary>
public static Vector256<long> CompareGreaterThan(Vector256<long> left, Vector256<long> right) => CompareGreaterThan(left, right);
/// <summary>
/// int _mm256_cvtsi256_si32 (__m256i a)
/// MOVD reg/m32, xmm
/// </summary>
public static int ConvertToInt32(Vector256<int> value) => ConvertToInt32(value);
/// <summary>
/// int _mm256_cvtsi256_si32 (__m256i a)
/// MOVD reg/m32, xmm
/// </summary>
public static uint ConvertToUInt32(Vector256<uint> value) => ConvertToUInt32(value);
/// <summary>
/// __m256i _mm256_cvtepi8_epi16 (__m128i a)
/// VPMOVSXBW ymm, xmm
/// </summary>
public static Vector256<short> ConvertToVector256Int16(Vector128<sbyte> value) => ConvertToVector256Int16(value);
/// <summary>
/// __m256i _mm256_cvtepu8_epi16 (__m128i a)
/// VPMOVZXBW ymm, xmm
/// </summary>
public static Vector256<short> ConvertToVector256Int16(Vector128<byte> value) => ConvertToVector256Int16(value);
/// <summary>
/// __m256i _mm256_cvtepi8_epi32 (__m128i a)
/// VPMOVSXBD ymm, xmm
/// </summary>
public static Vector256<int> ConvertToVector256Int32(Vector128<sbyte> value) => ConvertToVector256Int32(value);
/// <summary>
/// __m256i _mm256_cvtepu8_epi32 (__m128i a)
/// VPMOVZXBD ymm, xmm
/// </summary>
public static Vector256<int> ConvertToVector256Int32(Vector128<byte> value) => ConvertToVector256Int32(value);
/// <summary>
/// __m256i _mm256_cvtepi16_epi32 (__m128i a)
/// VPMOVSXWD ymm, xmm
/// </summary>
public static Vector256<int> ConvertToVector256Int32(Vector128<short> value) => ConvertToVector256Int32(value);
/// <summary>
/// __m256i _mm256_cvtepu16_epi32 (__m128i a)
/// VPMOVZXWD ymm, xmm
/// </summary>
public static Vector256<int> ConvertToVector256Int32(Vector128<ushort> value) => ConvertToVector256Int32(value);
/// <summary>
/// __m256i _mm256_cvtepi8_epi64 (__m128i a)
/// VPMOVSXBQ ymm, xmm
/// </summary>
public static Vector256<long> ConvertToVector256Int64(Vector128<sbyte> value) => ConvertToVector256Int64(value);
/// <summary>
/// __m256i _mm256_cvtepu8_epi64 (__m128i a)
/// VPMOVZXBQ ymm, xmm
/// </summary>
public static Vector256<long> ConvertToVector256Int64(Vector128<byte> value) => ConvertToVector256Int64(value);
/// <summary>
/// __m256i _mm256_cvtepi16_epi64 (__m128i a)
/// VPMOVSXWQ ymm, xmm
/// </summary>
public static Vector256<long> ConvertToVector256Int64(Vector128<short> value) => ConvertToVector256Int64(value);
/// <summary>
/// __m256i _mm256_cvtepu16_epi64 (__m128i a)
/// VPMOVZXWQ ymm, xmm
/// </summary>
public static Vector256<long> ConvertToVector256Int64(Vector128<ushort> value) => ConvertToVector256Int64(value);
/// <summary>
/// __m256i _mm256_cvtepi32_epi64 (__m128i a)
/// VPMOVSXDQ ymm, xmm
/// </summary>
public static Vector256<long> ConvertToVector256Int64(Vector128<int> value) => ConvertToVector256Int64(value);
/// <summary>
/// __m256i _mm256_cvtepu32_epi64 (__m128i a)
/// VPMOVZXDQ ymm, xmm
/// </summary>
public static Vector256<long> ConvertToVector256Int64(Vector128<uint> value) => ConvertToVector256Int64(value);
/// <summary>
/// VPMOVSXBW ymm, m128
/// The native signature does not exist. We provide this additional overload for completeness.
/// </summary>
public static unsafe Vector256<short> ConvertToVector256Int16(sbyte* address) => ConvertToVector256Int16(address);
/// <summary>
/// VPMOVZXBW ymm, m128
/// The native signature does not exist. We provide this additional overload for completeness.
/// </summary>
public static unsafe Vector256<short> ConvertToVector256Int16(byte* address) => ConvertToVector256Int16(address);
/// <summary>
/// VPMOVSXBD ymm, m64
/// The native signature does not exist. We provide this additional overload for completeness.
/// </summary>
public static unsafe Vector256<int> ConvertToVector256Int32(sbyte* address) => ConvertToVector256Int32(address);
/// <summary>
/// VPMOVZXBD ymm, m64
/// The native signature does not exist. We provide this additional overload for completeness.
/// </summary>
public static unsafe Vector256<int> ConvertToVector256Int32(byte* address) => ConvertToVector256Int32(address);
/// <summary>
/// VPMOVSXWD ymm, m128
/// The native signature does not exist. We provide this additional overload for completeness.
/// </summary>
public static unsafe Vector256<int> ConvertToVector256Int32(short* address) => ConvertToVector256Int32(address);
/// <summary>
/// VPMOVZXWD ymm, m128
/// The native signature does not exist. We provide this additional overload for completeness.
/// </summary>
public static unsafe Vector256<int> ConvertToVector256Int32(ushort* address) => ConvertToVector256Int32(address);
/// <summary>
/// VPMOVSXBQ ymm, m32
/// The native signature does not exist. We provide this additional overload for completeness.
/// </summary>
public static unsafe Vector256<long> ConvertToVector256Int64(sbyte* address) => ConvertToVector256Int64(address);
/// <summary>
/// VPMOVZXBQ ymm, m32
/// The native signature does not exist. We provide this additional overload for completeness.
/// </summary>
public static unsafe Vector256<long> ConvertToVector256Int64(byte* address) => ConvertToVector256Int64(address);
/// <summary>
/// VPMOVSXWQ ymm, m64
/// The native signature does not exist. We provide this additional overload for completeness.
/// </summary>
public static unsafe Vector256<long> ConvertToVector256Int64(short* address) => ConvertToVector256Int64(address);
/// <summary>
/// VPMOVZXWQ ymm, m64
/// The native signature does not exist. We provide this additional overload for completeness.
/// </summary>
public static unsafe Vector256<long> ConvertToVector256Int64(ushort* address) => ConvertToVector256Int64(address);
/// <summary>
/// VPMOVSXDQ ymm, m128
/// The native signature does not exist. We provide this additional overload for completeness.
/// </summary>
public static unsafe Vector256<long> ConvertToVector256Int64(int* address) => ConvertToVector256Int64(address);
/// <summary>
/// VPMOVZXDQ ymm, m128
/// The native signature does not exist. We provide this additional overload for completeness.
/// </summary>
public static unsafe Vector256<long> ConvertToVector256Int64(uint* address) => ConvertToVector256Int64(address);
/// <summary>
/// __m128i _mm256_extracti128_si256 (__m256i a, const int imm8)
/// VEXTRACTI128 xmm, ymm, imm8
/// </summary>
public static new Vector128<sbyte> ExtractVector128(Vector256<sbyte> value, byte index) => ExtractVector128(value, index);
/// <summary>
/// __m128i _mm256_extracti128_si256 (__m256i a, const int imm8)
/// VEXTRACTI128 xmm, ymm, imm8
/// </summary>
public static new Vector128<byte> ExtractVector128(Vector256<byte> value, byte index) => ExtractVector128(value, index);
/// <summary>
/// __m128i _mm256_extracti128_si256 (__m256i a, const int imm8)
/// VEXTRACTI128 xmm, ymm, imm8
/// </summary>
public static new Vector128<short> ExtractVector128(Vector256<short> value, byte index) => ExtractVector128(value, index);
/// <summary>
/// __m128i _mm256_extracti128_si256 (__m256i a, const int imm8)
/// VEXTRACTI128 xmm, ymm, imm8
/// </summary>
public static new Vector128<ushort> ExtractVector128(Vector256<ushort> value, byte index) => ExtractVector128(value, index);
/// <summary>
/// __m128i _mm256_extracti128_si256 (__m256i a, const int imm8)
/// VEXTRACTI128 xmm, ymm, imm8
/// </summary>
public static new Vector128<int> ExtractVector128(Vector256<int> value, byte index) => ExtractVector128(value, index);
/// <summary>
/// __m128i _mm256_extracti128_si256 (__m256i a, const int imm8)
/// VEXTRACTI128 xmm, ymm, imm8
/// </summary>
public static new Vector128<uint> ExtractVector128(Vector256<uint> value, byte index) => ExtractVector128(value, index);
/// <summary>
/// __m128i _mm256_extracti128_si256 (__m256i a, const int imm8)
/// VEXTRACTI128 xmm, ymm, imm8
/// </summary>
public static new Vector128<long> ExtractVector128(Vector256<long> value, byte index) => ExtractVector128(value, index);
/// <summary>
/// __m128i _mm256_extracti128_si256 (__m256i a, const int imm8)
/// VEXTRACTI128 xmm, ymm, imm8
/// </summary>
public static new Vector128<ulong> ExtractVector128(Vector256<ulong> value, byte index) => ExtractVector128(value, index);
/// <summary>
/// __m128i _mm_i32gather_epi32 (int const* base_addr, __m128i vindex, const int scale)
/// VPGATHERDD xmm, vm32x, xmm
/// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
/// </summary>
public static unsafe Vector128<int> GatherVector128(int* baseAddress, Vector128<int> index, byte scale)
{
return scale switch
{
1 => GatherVector128(baseAddress, index, 1),
2 => GatherVector128(baseAddress, index, 2),
4 => GatherVector128(baseAddress, index, 4),
8 => GatherVector128(baseAddress, index, 8),
_ => throw new ArgumentOutOfRangeException(nameof(scale)),
};
}
/// <summary>
/// __m128i _mm_i32gather_epi32 (int const* base_addr, __m128i vindex, const int scale)
/// VPGATHERDD xmm, vm32x, xmm
/// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
/// </summary>
public static unsafe Vector128<uint> GatherVector128(uint* baseAddress, Vector128<int> index, byte scale)
{
return scale switch
{
1 => GatherVector128(baseAddress, index, 1),
2 => GatherVector128(baseAddress, index, 2),
4 => GatherVector128(baseAddress, index, 4),
8 => GatherVector128(baseAddress, index, 8),
_ => throw new ArgumentOutOfRangeException(nameof(scale)),
};
}
/// <summary>
/// __m128i _mm_i32gather_epi64 (__int64 const* base_addr, __m128i vindex, const int scale)
/// VPGATHERDQ xmm, vm32x, xmm
/// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
/// </summary>
public static unsafe Vector128<long> GatherVector128(long* baseAddress, Vector128<int> index, byte scale)
{
return scale switch
{
1 => GatherVector128(baseAddress, index, 1),
2 => GatherVector128(baseAddress, index, 2),
4 => GatherVector128(baseAddress, index, 4),
8 => GatherVector128(baseAddress, index, 8),
_ => throw new ArgumentOutOfRangeException(nameof(scale)),
};
}
/// <summary>
/// __m128i _mm_i32gather_epi64 (__int64 const* base_addr, __m128i vindex, const int scale)
/// VPGATHERDQ xmm, vm32x, xmm
/// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
/// </summary>
public static unsafe Vector128<ulong> GatherVector128(ulong* baseAddress, Vector128<int> index, byte scale)
{
return scale switch
{
1 => GatherVector128(baseAddress, index, 1),
2 => GatherVector128(baseAddress, index, 2),
4 => GatherVector128(baseAddress, index, 4),
8 => GatherVector128(baseAddress, index, 8),
_ => throw new ArgumentOutOfRangeException(nameof(scale)),
};
}
/// <summary>
/// __m128 _mm_i32gather_ps (float const* base_addr, __m128i vindex, const int scale)
/// VGATHERDPS xmm, vm32x, xmm
/// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
/// </summary>
public static unsafe Vector128<float> GatherVector128(float* baseAddress, Vector128<int> index, byte scale)
{
return scale switch
{
1 => GatherVector128(baseAddress, index, 1),
2 => GatherVector128(baseAddress, index, 2),
4 => GatherVector128(baseAddress, index, 4),
8 => GatherVector128(baseAddress, index, 8),
_ => throw new ArgumentOutOfRangeException(nameof(scale)),
};
}
/// <summary>
/// __m128d _mm_i32gather_pd (double const* base_addr, __m128i vindex, const int scale)
/// VGATHERDPD xmm, vm32x, xmm
/// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
/// </summary>
public static unsafe Vector128<double> GatherVector128(double* baseAddress, Vector128<int> index, byte scale)
{
return scale switch
{
1 => GatherVector128(baseAddress, index, 1),
2 => GatherVector128(baseAddress, index, 2),
4 => GatherVector128(baseAddress, index, 4),
8 => GatherVector128(baseAddress, index, 8),
_ => throw new ArgumentOutOfRangeException(nameof(scale)),
};
}
/// <summary>
/// __m128i _mm_i64gather_epi32 (int const* base_addr, __m128i vindex, const int scale)
/// VPGATHERQD xmm, vm64x, xmm
/// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
/// </summary>
public static unsafe Vector128<int> GatherVector128(int* baseAddress, Vector128<long> index, byte scale)
{
return scale switch
{
1 => GatherVector128(baseAddress, index, 1),
2 => GatherVector128(baseAddress, index, 2),
4 => GatherVector128(baseAddress, index, 4),
8 => GatherVector128(baseAddress, index, 8),
_ => throw new ArgumentOutOfRangeException(nameof(scale)),
};
}
/// <summary>
/// __m128i _mm_i64gather_epi32 (int const* base_addr, __m128i vindex, const int scale)
/// VPGATHERQD xmm, vm64x, xmm
/// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
/// </summary>
public static unsafe Vector128<uint> GatherVector128(uint* baseAddress, Vector128<long> index, byte scale)
{
return scale switch
{
1 => GatherVector128(baseAddress, index, 1),
2 => GatherVector128(baseAddress, index, 2),
4 => GatherVector128(baseAddress, index, 4),
8 => GatherVector128(baseAddress, index, 8),
_ => throw new ArgumentOutOfRangeException(nameof(scale)),
};
}
/// <summary>
/// __m128i _mm_i64gather_epi64 (__int64 const* base_addr, __m128i vindex, const int scale)
/// VPGATHERQQ xmm, vm64x, xmm
/// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
/// </summary>
public static unsafe Vector128<long> GatherVector128(long* baseAddress, Vector128<long> index, byte scale)
{
return scale switch
{
1 => GatherVector128(baseAddress, index, 1),
2 => GatherVector128(baseAddress, index, 2),
4 => GatherVector128(baseAddress, index, 4),
8 => GatherVector128(baseAddress, index, 8),
_ => throw new ArgumentOutOfRangeException(nameof(scale)),
};
}
/// <summary>
/// __m128i _mm_i64gather_epi64 (__int64 const* base_addr, __m128i vindex, const int scale)
/// VPGATHERQQ xmm, vm64x, xmm
/// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
/// </summary>
public static unsafe Vector128<ulong> GatherVector128(ulong* baseAddress, Vector128<long> index, byte scale)
{
return scale switch
{
1 => GatherVector128(baseAddress, index, 1),
2 => GatherVector128(baseAddress, index, 2),
4 => GatherVector128(baseAddress, index, 4),
8 => GatherVector128(baseAddress, index, 8),
_ => throw new ArgumentOutOfRangeException(nameof(scale)),
};