From: Fei Peng Date: Thu, 9 Aug 2018 21:57:22 +0000 (-0700) Subject: Add managed non-const fall-back for AVX2 gather intrinsic X-Git-Tag: submit/tizen/20210909.063632~11030^2~3983 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=76bea704f07a83434e073d6c0f7ab3bc13d639aa;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Add managed non-const fall-back for AVX2 gather intrinsic Commit migrated from https://github.com/dotnet/coreclr/commit/d59b1af3429809e8c2af86f818ebb387948e313e --- diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Avx2.PlatformNotSupported.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Avx2.PlatformNotSupported.cs index ee07f09..a4b5680 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Avx2.PlatformNotSupported.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Avx2.PlatformNotSupported.cs @@ -539,242 +539,290 @@ namespace System.Runtime.Intrinsics.X86 /// /// __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. /// public static unsafe Vector128 GatherVector128(int* baseAddress, Vector128 index, byte scale) { throw new PlatformNotSupportedException(); } /// /// __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. /// public static unsafe Vector128 GatherVector128(uint* baseAddress, Vector128 index, byte scale) { throw new PlatformNotSupportedException(); } /// /// __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. /// public static unsafe Vector128 GatherVector128(long* baseAddress, Vector128 index, byte scale) { throw new PlatformNotSupportedException(); } /// /// __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. /// public static unsafe Vector128 GatherVector128(ulong* baseAddress, Vector128 index, byte scale) { throw new PlatformNotSupportedException(); } /// /// __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. /// public static unsafe Vector128 GatherVector128(float* baseAddress, Vector128 index, byte scale) { throw new PlatformNotSupportedException(); } /// /// __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. /// public static unsafe Vector128 GatherVector128(double* baseAddress, Vector128 index, byte scale) { throw new PlatformNotSupportedException(); } /// /// __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. /// public static unsafe Vector128 GatherVector128(int* baseAddress, Vector128 index, byte scale) { throw new PlatformNotSupportedException(); } /// /// __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. /// public static unsafe Vector128 GatherVector128(uint* baseAddress, Vector128 index, byte scale) { throw new PlatformNotSupportedException(); } /// /// __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. /// public static unsafe Vector128 GatherVector128(long* baseAddress, Vector128 index, byte scale) { throw new PlatformNotSupportedException(); } /// /// __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. /// public static unsafe Vector128 GatherVector128(ulong* baseAddress, Vector128 index, byte scale) { throw new PlatformNotSupportedException(); } /// /// __m128 _mm_i64gather_ps (float const* base_addr, __m128i vindex, const int scale) /// VGATHERQPS xmm, vm64x, xmm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// public static unsafe Vector128 GatherVector128(float* baseAddress, Vector128 index, byte scale) { throw new PlatformNotSupportedException(); } /// /// __m128d _mm_i64gather_pd (double const* base_addr, __m128i vindex, const int scale) /// VGATHERQPD xmm, vm64x, xmm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// public static unsafe Vector128 GatherVector128(double* baseAddress, Vector128 index, byte scale) { throw new PlatformNotSupportedException(); } /// /// __m256i _mm256_i32gather_epi32 (int const* base_addr, __m256i vindex, const int scale) /// VPGATHERDD ymm, vm32y, ymm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// public static unsafe Vector256 GatherVector256(int* baseAddress, Vector256 index, byte scale) { throw new PlatformNotSupportedException(); } /// /// __m256i _mm256_i32gather_epi32 (int const* base_addr, __m256i vindex, const int scale) /// VPGATHERDD ymm, vm32y, ymm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// public static unsafe Vector256 GatherVector256(uint* baseAddress, Vector256 index, byte scale) { throw new PlatformNotSupportedException(); } /// /// __m256i _mm256_i32gather_epi64 (__int64 const* base_addr, __m128i vindex, const int scale) /// VPGATHERDQ ymm, vm32y, ymm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// public static unsafe Vector256 GatherVector256(long* baseAddress, Vector128 index, byte scale) { throw new PlatformNotSupportedException(); } /// /// __m256i _mm256_i32gather_epi64 (__int64 const* base_addr, __m128i vindex, const int scale) /// VPGATHERDQ ymm, vm32y, ymm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// public static unsafe Vector256 GatherVector256(ulong* baseAddress, Vector128 index, byte scale) { throw new PlatformNotSupportedException(); } /// /// __m256 _mm256_i32gather_ps (float const* base_addr, __m256i vindex, const int scale) /// VGATHERDPS ymm, vm32y, ymm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// public static unsafe Vector256 GatherVector256(float* baseAddress, Vector256 index, byte scale) { throw new PlatformNotSupportedException(); } /// /// __m256d _mm256_i32gather_pd (double const* base_addr, __m128i vindex, const int scale) /// VGATHERDPD ymm, vm32y, ymm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// public static unsafe Vector256 GatherVector256(double* baseAddress, Vector128 index, byte scale) { throw new PlatformNotSupportedException(); } /// /// __m128i _mm256_i64gather_epi32 (int const* base_addr, __m256i vindex, const int scale) - /// VPGATHERQD ymm, vm64y, ymm + /// VPGATHERQD xmm, vm64y, xmm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// public static unsafe Vector128 GatherVector128(int* baseAddress, Vector256 index, byte scale) { throw new PlatformNotSupportedException(); } /// /// __m128i _mm256_i64gather_epi32 (int const* base_addr, __m256i vindex, const int scale) - /// VPGATHERQD ymm, vm64y, ymm + /// VPGATHERQD xmm, vm64y, xmm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// public static unsafe Vector128 GatherVector128(uint* baseAddress, Vector256 index, byte scale) { throw new PlatformNotSupportedException(); } /// /// __m256i _mm256_i64gather_epi64 (__int64 const* base_addr, __m256i vindex, const int scale) /// VPGATHERQQ ymm, vm64y, ymm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// public static unsafe Vector256 GatherVector256(long* baseAddress, Vector256 index, byte scale) { throw new PlatformNotSupportedException(); } /// /// __m256i _mm256_i64gather_epi64 (__int64 const* base_addr, __m256i vindex, const int scale) /// VPGATHERQQ ymm, vm64y, ymm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// public static unsafe Vector256 GatherVector256(ulong* baseAddress, Vector256 index, byte scale) { throw new PlatformNotSupportedException(); } /// /// __m128 _mm256_i64gather_ps (float const* base_addr, __m256i vindex, const int scale) - /// VGATHERQPS ymm, vm64y, ymm + /// VGATHERQPS xmm, vm64y, xmm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// public static unsafe Vector128 GatherVector128(float* baseAddress, Vector256 index, byte scale) { throw new PlatformNotSupportedException(); } /// /// __m256d _mm256_i64gather_pd (double const* base_addr, __m256i vindex, const int scale) /// VGATHERQPD ymm, vm64y, ymm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// public static unsafe Vector256 GatherVector256(double* baseAddress, Vector256 index, byte scale) { throw new PlatformNotSupportedException(); } /// /// __m128i _mm_mask_i32gather_epi32 (__m128i src, int const* base_addr, __m128i vindex, __m128i mask, const int scale) /// VPGATHERDD xmm, vm32x, xmm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// public static unsafe Vector128 GatherMaskVector128(Vector128 source, int* baseAddress, Vector128 index, Vector128 mask, byte scale) { throw new PlatformNotSupportedException(); } /// /// __m128i _mm_mask_i32gather_epi32 (__m128i src, int const* base_addr, __m128i vindex, __m128i mask, const int scale) /// VPGATHERDD xmm, vm32x, xmm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// public static unsafe Vector128 GatherMaskVector128(Vector128 source, uint* baseAddress, Vector128 index, Vector128 mask, byte scale) { throw new PlatformNotSupportedException(); } /// /// __m128i _mm_mask_i32gather_epi64 (__m128i src, __int64 const* base_addr, __m128i vindex, __m128i mask, const int scale) /// VPGATHERDQ xmm, vm32x, xmm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// public static unsafe Vector128 GatherMaskVector128(Vector128 source, long* baseAddress, Vector128 index, Vector128 mask, byte scale) { throw new PlatformNotSupportedException(); } /// /// __m128i _mm_mask_i32gather_epi64 (__m128i src, __int64 const* base_addr, __m128i vindex, __m128i mask, const int scale) /// VPGATHERDQ xmm, vm32x, xmm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// public static unsafe Vector128 GatherMaskVector128(Vector128 source, ulong* baseAddress, Vector128 index, Vector128 mask, byte scale) { throw new PlatformNotSupportedException(); } /// /// __m128 _mm_mask_i32gather_ps (__m128 src, float const* base_addr, __m128i vindex, __m128 mask, const int scale) /// VGATHERDPS xmm, vm32x, xmm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// public static unsafe Vector128 GatherMaskVector128(Vector128 source, float* baseAddress, Vector128 index, Vector128 mask, byte scale) { throw new PlatformNotSupportedException(); } /// /// __m128d _mm_mask_i32gather_pd (__m128d src, double const* base_addr, __m128i vindex, __m128d mask, const int scale) /// VGATHERDPD xmm, vm32x, xmm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// public static unsafe Vector128 GatherMaskVector128(Vector128 source, double* baseAddress, Vector128 index, Vector128 mask, byte scale) { throw new PlatformNotSupportedException(); } /// /// __m128i _mm_mask_i64gather_epi32 (__m128i src, int const* base_addr, __m128i vindex, __m128i mask, const int scale) /// VPGATHERQD xmm, vm64x, xmm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// public static unsafe Vector128 GatherMaskVector128(Vector128 source, int* baseAddress, Vector128 index, Vector128 mask, byte scale) { throw new PlatformNotSupportedException(); } /// /// __m128i _mm_mask_i64gather_epi32 (__m128i src, int const* base_addr, __m128i vindex, __m128i mask, const int scale) /// VPGATHERQD xmm, vm64x, xmm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// public static unsafe Vector128 GatherMaskVector128(Vector128 source, uint* baseAddress, Vector128 index, Vector128 mask, byte scale) { throw new PlatformNotSupportedException(); } /// /// __m128i _mm_mask_i64gather_epi64 (__m128i src, __int64 const* base_addr, __m128i vindex, __m128i mask, const int scale) /// VPGATHERQQ xmm, vm64x, xmm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// public static unsafe Vector128 GatherMaskVector128(Vector128 source, long* baseAddress, Vector128 index, Vector128 mask, byte scale) { throw new PlatformNotSupportedException(); } /// /// __m128i _mm_mask_i64gather_epi64 (__m128i src, __int64 const* base_addr, __m128i vindex, __m128i mask, const int scale) /// VPGATHERQQ xmm, vm64x, xmm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// public static unsafe Vector128 GatherMaskVector128(Vector128 source, ulong* baseAddress, Vector128 index, Vector128 mask, byte scale) { throw new PlatformNotSupportedException(); } /// /// __m128 _mm_mask_i64gather_ps (__m128 src, float const* base_addr, __m128i vindex, __m128 mask, const int scale) - /// VPGATHERQPS xmm, vm64x, xmm + /// VGATHERQPS xmm, vm64x, xmm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// public static unsafe Vector128 GatherMaskVector128(Vector128 source, float* baseAddress, Vector128 index, Vector128 mask, byte scale) { throw new PlatformNotSupportedException(); } /// /// __m128d _mm_mask_i64gather_pd (__m128d src, double const* base_addr, __m128i vindex, __m128d mask, const int scale) - /// VPGATHERQPD xmm, vm64x, xmm + /// VGATHERQPD xmm, vm64x, xmm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// public static unsafe Vector128 GatherMaskVector128(Vector128 source, double* baseAddress, Vector128 index, Vector128 mask, byte scale) { throw new PlatformNotSupportedException(); } /// /// __m256i _mm256_mask_i32gather_epi32 (__m256i src, int const* base_addr, __m256i vindex, __m256i mask, const int scale) /// VPGATHERDD ymm, vm32y, ymm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// public static unsafe Vector256 GatherMaskVector256(Vector256 source, int* baseAddress, Vector256 index, Vector256 mask, byte scale) { throw new PlatformNotSupportedException(); } /// /// __m256i _mm256_mask_i32gather_epi32 (__m256i src, int const* base_addr, __m256i vindex, __m256i mask, const int scale) /// VPGATHERDD ymm, vm32y, ymm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// public static unsafe Vector256 GatherMaskVector256(Vector256 source, uint* baseAddress, Vector256 index, Vector256 mask, byte scale) { throw new PlatformNotSupportedException(); } /// /// __m256i _mm256_mask_i32gather_epi64 (__m256i src, __int64 const* base_addr, __m128i vindex, __m256i mask, const int scale) /// VPGATHERDQ ymm, vm32y, ymm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// public static unsafe Vector256 GatherMaskVector256(Vector256 source, long* baseAddress, Vector128 index, Vector256 mask, byte scale) { throw new PlatformNotSupportedException(); } /// /// __m256i _mm256_mask_i32gather_epi64 (__m256i src, __int64 const* base_addr, __m128i vindex, __m256i mask, const int scale) /// VPGATHERDQ ymm, vm32y, ymm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// public static unsafe Vector256 GatherMaskVector256(Vector256 source, ulong* baseAddress, Vector128 index, Vector256 mask, byte scale) { throw new PlatformNotSupportedException(); } /// /// __m256 _mm256_mask_i32gather_ps (__m256 src, float const* base_addr, __m256i vindex, __m256 mask, const int scale) /// VPGATHERDPS ymm, vm32y, ymm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// public static unsafe Vector256 GatherMaskVector256(Vector256 source, float* baseAddress, Vector256 index, Vector256 mask, byte scale) { throw new PlatformNotSupportedException(); } /// /// __m256d _mm256_mask_i32gather_pd (__m256d src, double const* base_addr, __m128i vindex, __m256d mask, const int scale) /// VPGATHERDPD ymm, vm32y, ymm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// public static unsafe Vector256 GatherMaskVector256(Vector256 source, double* baseAddress, Vector128 index, Vector256 mask, byte scale) { throw new PlatformNotSupportedException(); } /// /// __m128i _mm256_mask_i64gather_epi32 (__m128i src, int const* base_addr, __m256i vindex, __m128i mask, const int scale) - /// VPGATHERQD ymm, vm32y, ymm + /// VPGATHERQD xmm, vm32y, xmm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// public static unsafe Vector128 GatherMaskVector128(Vector128 source, int* baseAddress, Vector256 index, Vector128 mask, byte scale) { throw new PlatformNotSupportedException(); } /// /// __m128i _mm256_mask_i64gather_epi32 (__m128i src, int const* base_addr, __m256i vindex, __m128i mask, const int scale) - /// VPGATHERQD ymm, vm32y, ymm + /// VPGATHERQD xmm, vm32y, xmm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// public static unsafe Vector128 GatherMaskVector128(Vector128 source, uint* baseAddress, Vector256 index, Vector128 mask, byte scale) { throw new PlatformNotSupportedException(); } /// /// __m256i _mm256_mask_i64gather_epi64 (__m256i src, __int64 const* base_addr, __m256i vindex, __m256i mask, const int scale) /// VPGATHERQQ ymm, vm32y, ymm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// public static unsafe Vector256 GatherMaskVector256(Vector256 source, long* baseAddress, Vector256 index, Vector256 mask, byte scale) { throw new PlatformNotSupportedException(); } /// /// __m256i _mm256_mask_i64gather_epi64 (__m256i src, __int64 const* base_addr, __m256i vindex, __m256i mask, const int scale) /// VPGATHERQQ ymm, vm32y, ymm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// public static unsafe Vector256 GatherMaskVector256(Vector256 source, ulong* baseAddress, Vector256 index, Vector256 mask, byte scale) { throw new PlatformNotSupportedException(); } /// /// __m128 _mm256_mask_i64gather_ps (__m128 src, float const* base_addr, __m256i vindex, __m128 mask, const int scale) - /// VPGATHERQPS ymm, vm32y, ymm + /// VGATHERQPS xmm, vm32y, xmm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// public static unsafe Vector128 GatherMaskVector128(Vector128 source, float* baseAddress, Vector256 index, Vector128 mask, byte scale) { throw new PlatformNotSupportedException(); } /// /// __m256d _mm256_mask_i64gather_pd (__m256d src, double const* base_addr, __m256i vindex, __m256d mask, const int scale) - /// VPGATHERQPD ymm, vm32y, ymm + /// VGATHERQPD ymm, vm32y, ymm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// public static unsafe Vector256 GatherMaskVector256(Vector256 source, double* baseAddress, Vector256 index, Vector256 mask, byte scale) { throw new PlatformNotSupportedException(); } diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Avx2.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Avx2.cs index 1f92cbf..2e949dc 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Avx2.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Avx2.cs @@ -545,244 +545,1012 @@ namespace System.Runtime.Intrinsics.X86 /// /// __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. /// - public static unsafe Vector128 GatherVector128(int* baseAddress, Vector128 index, byte scale) => GatherVector128(baseAddress, index, scale); + public static unsafe Vector128 GatherVector128(int* baseAddress, Vector128 index, byte scale) + { + switch (scale) + { + case 1: + return GatherVector128(baseAddress, index, 1); + case 2: + return GatherVector128(baseAddress, index, 2); + case 4: + return GatherVector128(baseAddress, index, 4); + case 8: + return GatherVector128(baseAddress, index, 8); + default: + throw new ArgumentOutOfRangeException(nameof(scale)); + } + } /// /// __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. /// - public static unsafe Vector128 GatherVector128(uint* baseAddress, Vector128 index, byte scale) => GatherVector128(baseAddress, index, scale); + public static unsafe Vector128 GatherVector128(uint* baseAddress, Vector128 index, byte scale) + { + switch (scale) + { + case 1: + return GatherVector128(baseAddress, index, 1); + case 2: + return GatherVector128(baseAddress, index, 2); + case 4: + return GatherVector128(baseAddress, index, 4); + case 8: + return GatherVector128(baseAddress, index, 8); + default: + throw new ArgumentOutOfRangeException(nameof(scale)); + } + } /// /// __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. /// - public static unsafe Vector128 GatherVector128(long* baseAddress, Vector128 index, byte scale) => GatherVector128(baseAddress, index, scale); + public static unsafe Vector128 GatherVector128(long* baseAddress, Vector128 index, byte scale) + { + switch (scale) + { + case 1: + return GatherVector128(baseAddress, index, 1); + case 2: + return GatherVector128(baseAddress, index, 2); + case 4: + return GatherVector128(baseAddress, index, 4); + case 8: + return GatherVector128(baseAddress, index, 8); + default: + throw new ArgumentOutOfRangeException(nameof(scale)); + } + } /// /// __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. /// - public static unsafe Vector128 GatherVector128(ulong* baseAddress, Vector128 index, byte scale) => GatherVector128(baseAddress, index, scale); + public static unsafe Vector128 GatherVector128(ulong* baseAddress, Vector128 index, byte scale) + { + switch (scale) + { + case 1: + return GatherVector128(baseAddress, index, 1); + case 2: + return GatherVector128(baseAddress, index, 2); + case 4: + return GatherVector128(baseAddress, index, 4); + case 8: + return GatherVector128(baseAddress, index, 8); + default: + throw new ArgumentOutOfRangeException(nameof(scale)); + } + } /// /// __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. /// - public static unsafe Vector128 GatherVector128(float* baseAddress, Vector128 index, byte scale) => GatherVector128(baseAddress, index, scale); + public static unsafe Vector128 GatherVector128(float* baseAddress, Vector128 index, byte scale) + { + switch (scale) + { + case 1: + return GatherVector128(baseAddress, index, 1); + case 2: + return GatherVector128(baseAddress, index, 2); + case 4: + return GatherVector128(baseAddress, index, 4); + case 8: + return GatherVector128(baseAddress, index, 8); + default: + throw new ArgumentOutOfRangeException(nameof(scale)); + } + } /// /// __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. /// - public static unsafe Vector128 GatherVector128(double* baseAddress, Vector128 index, byte scale) => GatherVector128(baseAddress, index, scale); + public static unsafe Vector128 GatherVector128(double* baseAddress, Vector128 index, byte scale) + { + switch (scale) + { + case 1: + return GatherVector128(baseAddress, index, 1); + case 2: + return GatherVector128(baseAddress, index, 2); + case 4: + return GatherVector128(baseAddress, index, 4); + case 8: + return GatherVector128(baseAddress, index, 8); + default: + throw new ArgumentOutOfRangeException(nameof(scale)); + } + } /// /// __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. /// - public static unsafe Vector128 GatherVector128(int* baseAddress, Vector128 index, byte scale) => GatherVector128(baseAddress, index, scale); + public static unsafe Vector128 GatherVector128(int* baseAddress, Vector128 index, byte scale) + { + switch (scale) + { + case 1: + return GatherVector128(baseAddress, index, 1); + case 2: + return GatherVector128(baseAddress, index, 2); + case 4: + return GatherVector128(baseAddress, index, 4); + case 8: + return GatherVector128(baseAddress, index, 8); + default: + throw new ArgumentOutOfRangeException(nameof(scale)); + } + } /// /// __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. /// - public static unsafe Vector128 GatherVector128(uint* baseAddress, Vector128 index, byte scale) => GatherVector128(baseAddress, index, scale); + public static unsafe Vector128 GatherVector128(uint* baseAddress, Vector128 index, byte scale) + { + switch (scale) + { + case 1: + return GatherVector128(baseAddress, index, 1); + case 2: + return GatherVector128(baseAddress, index, 2); + case 4: + return GatherVector128(baseAddress, index, 4); + case 8: + return GatherVector128(baseAddress, index, 8); + default: + throw new ArgumentOutOfRangeException(nameof(scale)); + } + } /// /// __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. /// - public static unsafe Vector128 GatherVector128(long* baseAddress, Vector128 index, byte scale) => GatherVector128(baseAddress, index, scale); + public static unsafe Vector128 GatherVector128(long* baseAddress, Vector128 index, byte scale) + { + switch (scale) + { + case 1: + return GatherVector128(baseAddress, index, 1); + case 2: + return GatherVector128(baseAddress, index, 2); + case 4: + return GatherVector128(baseAddress, index, 4); + case 8: + return GatherVector128(baseAddress, index, 8); + default: + throw new ArgumentOutOfRangeException(nameof(scale)); + } + } /// /// __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. /// - public static unsafe Vector128 GatherVector128(ulong* baseAddress, Vector128 index, byte scale) => GatherVector128(baseAddress, index, scale); + public static unsafe Vector128 GatherVector128(ulong* baseAddress, Vector128 index, byte scale) + { + switch (scale) + { + case 1: + return GatherVector128(baseAddress, index, 1); + case 2: + return GatherVector128(baseAddress, index, 2); + case 4: + return GatherVector128(baseAddress, index, 4); + case 8: + return GatherVector128(baseAddress, index, 8); + default: + throw new ArgumentOutOfRangeException(nameof(scale)); + } + } /// /// __m128 _mm_i64gather_ps (float const* base_addr, __m128i vindex, const int scale) /// VGATHERQPS xmm, vm64x, xmm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// - public static unsafe Vector128 GatherVector128(float* baseAddress, Vector128 index, byte scale) => GatherVector128(baseAddress, index, scale); + public static unsafe Vector128 GatherVector128(float* baseAddress, Vector128 index, byte scale) + { + switch (scale) + { + case 1: + return GatherVector128(baseAddress, index, 1); + case 2: + return GatherVector128(baseAddress, index, 2); + case 4: + return GatherVector128(baseAddress, index, 4); + case 8: + return GatherVector128(baseAddress, index, 8); + default: + throw new ArgumentOutOfRangeException(nameof(scale)); + } + } /// /// __m128d _mm_i64gather_pd (double const* base_addr, __m128i vindex, const int scale) /// VGATHERQPD xmm, vm64x, xmm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// - public static unsafe Vector128 GatherVector128(double* baseAddress, Vector128 index, byte scale) => GatherVector128(baseAddress, index, scale); + public static unsafe Vector128 GatherVector128(double* baseAddress, Vector128 index, byte scale) + { + switch (scale) + { + case 1: + return GatherVector128(baseAddress, index, 1); + case 2: + return GatherVector128(baseAddress, index, 2); + case 4: + return GatherVector128(baseAddress, index, 4); + case 8: + return GatherVector128(baseAddress, index, 8); + default: + throw new ArgumentOutOfRangeException(nameof(scale)); + } + } /// /// __m256i _mm256_i32gather_epi32 (int const* base_addr, __m256i vindex, const int scale) /// VPGATHERDD ymm, vm32y, ymm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// - public static unsafe Vector256 GatherVector256(int* baseAddress, Vector256 index, byte scale) => GatherVector256(baseAddress, index, scale); + public static unsafe Vector256 GatherVector256(int* baseAddress, Vector256 index, byte scale) + { + switch (scale) + { + case 1: + return GatherVector256(baseAddress, index, 1); + case 2: + return GatherVector256(baseAddress, index, 2); + case 4: + return GatherVector256(baseAddress, index, 4); + case 8: + return GatherVector256(baseAddress, index, 8); + default: + throw new ArgumentOutOfRangeException(nameof(scale)); + } + } /// /// __m256i _mm256_i32gather_epi32 (int const* base_addr, __m256i vindex, const int scale) /// VPGATHERDD ymm, vm32y, ymm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// - public static unsafe Vector256 GatherVector256(uint* baseAddress, Vector256 index, byte scale) => GatherVector256(baseAddress, index, scale); + public static unsafe Vector256 GatherVector256(uint* baseAddress, Vector256 index, byte scale) + { + switch (scale) + { + case 1: + return GatherVector256(baseAddress, index, 1); + case 2: + return GatherVector256(baseAddress, index, 2); + case 4: + return GatherVector256(baseAddress, index, 4); + case 8: + return GatherVector256(baseAddress, index, 8); + default: + throw new ArgumentOutOfRangeException(nameof(scale)); + } + } /// /// __m256i _mm256_i32gather_epi64 (__int64 const* base_addr, __m128i vindex, const int scale) /// VPGATHERDQ ymm, vm32y, ymm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// - public static unsafe Vector256 GatherVector256(long* baseAddress, Vector128 index, byte scale) => GatherVector256(baseAddress, index, scale); + public static unsafe Vector256 GatherVector256(long* baseAddress, Vector128 index, byte scale) + { + switch (scale) + { + case 1: + return GatherVector256(baseAddress, index, 1); + case 2: + return GatherVector256(baseAddress, index, 2); + case 4: + return GatherVector256(baseAddress, index, 4); + case 8: + return GatherVector256(baseAddress, index, 8); + default: + throw new ArgumentOutOfRangeException(nameof(scale)); + } + } /// /// __m256i _mm256_i32gather_epi64 (__int64 const* base_addr, __m128i vindex, const int scale) /// VPGATHERDQ ymm, vm32y, ymm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// - public static unsafe Vector256 GatherVector256(ulong* baseAddress, Vector128 index, byte scale) => GatherVector256(baseAddress, index, scale); + public static unsafe Vector256 GatherVector256(ulong* baseAddress, Vector128 index, byte scale) + { + switch (scale) + { + case 1: + return GatherVector256(baseAddress, index, 1); + case 2: + return GatherVector256(baseAddress, index, 2); + case 4: + return GatherVector256(baseAddress, index, 4); + case 8: + return GatherVector256(baseAddress, index, 8); + default: + throw new ArgumentOutOfRangeException(nameof(scale)); + } + } /// /// __m256 _mm256_i32gather_ps (float const* base_addr, __m256i vindex, const int scale) /// VGATHERDPS ymm, vm32y, ymm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// - public static unsafe Vector256 GatherVector256(float* baseAddress, Vector256 index, byte scale) => GatherVector256(baseAddress, index, scale); + public static unsafe Vector256 GatherVector256(float* baseAddress, Vector256 index, byte scale) + { + switch (scale) + { + case 1: + return GatherVector256(baseAddress, index, 1); + case 2: + return GatherVector256(baseAddress, index, 2); + case 4: + return GatherVector256(baseAddress, index, 4); + case 8: + return GatherVector256(baseAddress, index, 8); + default: + throw new ArgumentOutOfRangeException(nameof(scale)); + } + } /// /// __m256d _mm256_i32gather_pd (double const* base_addr, __m128i vindex, const int scale) /// VGATHERDPD ymm, vm32y, ymm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// - public static unsafe Vector256 GatherVector256(double* baseAddress, Vector128 index, byte scale) => GatherVector256(baseAddress, index, scale); + public static unsafe Vector256 GatherVector256(double* baseAddress, Vector128 index, byte scale) + { + switch (scale) + { + case 1: + return GatherVector256(baseAddress, index, 1); + case 2: + return GatherVector256(baseAddress, index, 2); + case 4: + return GatherVector256(baseAddress, index, 4); + case 8: + return GatherVector256(baseAddress, index, 8); + default: + throw new ArgumentOutOfRangeException(nameof(scale)); + } + } /// /// __m128i _mm256_i64gather_epi32 (int const* base_addr, __m256i vindex, const int scale) - /// VPGATHERQD ymm, vm64y, ymm + /// VPGATHERQD xmm, vm64y, xmm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// - public static unsafe Vector128 GatherVector128(int* baseAddress, Vector256 index, byte scale) => GatherVector128(baseAddress, index, scale); + public static unsafe Vector128 GatherVector128(int* baseAddress, Vector256 index, byte scale) + { + switch (scale) + { + case 1: + return GatherVector128(baseAddress, index, 1); + case 2: + return GatherVector128(baseAddress, index, 2); + case 4: + return GatherVector128(baseAddress, index, 4); + case 8: + return GatherVector128(baseAddress, index, 8); + default: + throw new ArgumentOutOfRangeException(nameof(scale)); + } + } /// /// __m128i _mm256_i64gather_epi32 (int const* base_addr, __m256i vindex, const int scale) - /// VPGATHERQD ymm, vm64y, ymm + /// VPGATHERQD xmm, vm64y, xmm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// - public static unsafe Vector128 GatherVector128(uint* baseAddress, Vector256 index, byte scale) => GatherVector128(baseAddress, index, scale); + public static unsafe Vector128 GatherVector128(uint* baseAddress, Vector256 index, byte scale) + { + switch (scale) + { + case 1: + return GatherVector128(baseAddress, index, 1); + case 2: + return GatherVector128(baseAddress, index, 2); + case 4: + return GatherVector128(baseAddress, index, 4); + case 8: + return GatherVector128(baseAddress, index, 8); + default: + throw new ArgumentOutOfRangeException(nameof(scale)); + } + } /// /// __m256i _mm256_i64gather_epi64 (__int64 const* base_addr, __m256i vindex, const int scale) /// VPGATHERQQ ymm, vm64y, ymm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// - public static unsafe Vector256 GatherVector256(long* baseAddress, Vector256 index, byte scale) => GatherVector256(baseAddress, index, scale); + public static unsafe Vector256 GatherVector256(long* baseAddress, Vector256 index, byte scale) + { + switch (scale) + { + case 1: + return GatherVector256(baseAddress, index, 1); + case 2: + return GatherVector256(baseAddress, index, 2); + case 4: + return GatherVector256(baseAddress, index, 4); + case 8: + return GatherVector256(baseAddress, index, 8); + default: + throw new ArgumentOutOfRangeException(nameof(scale)); + } + } /// /// __m256i _mm256_i64gather_epi64 (__int64 const* base_addr, __m256i vindex, const int scale) /// VPGATHERQQ ymm, vm64y, ymm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// - public static unsafe Vector256 GatherVector256(ulong* baseAddress, Vector256 index, byte scale) => GatherVector256(baseAddress, index, scale); + public static unsafe Vector256 GatherVector256(ulong* baseAddress, Vector256 index, byte scale) + { + switch (scale) + { + case 1: + return GatherVector256(baseAddress, index, 1); + case 2: + return GatherVector256(baseAddress, index, 2); + case 4: + return GatherVector256(baseAddress, index, 4); + case 8: + return GatherVector256(baseAddress, index, 8); + default: + throw new ArgumentOutOfRangeException(nameof(scale)); + } + } /// /// __m128 _mm256_i64gather_ps (float const* base_addr, __m256i vindex, const int scale) - /// VGATHERQPS ymm, vm64y, ymm + /// VGATHERQPS xmm, vm64y, xmm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// - public static unsafe Vector128 GatherVector128(float* baseAddress, Vector256 index, byte scale) => GatherVector128(baseAddress, index, scale); + public static unsafe Vector128 GatherVector128(float* baseAddress, Vector256 index, byte scale) + { + switch (scale) + { + case 1: + return GatherVector128(baseAddress, index, 1); + case 2: + return GatherVector128(baseAddress, index, 2); + case 4: + return GatherVector128(baseAddress, index, 4); + case 8: + return GatherVector128(baseAddress, index, 8); + default: + throw new ArgumentOutOfRangeException(nameof(scale)); + } + } /// /// __m256d _mm256_i64gather_pd (double const* base_addr, __m256i vindex, const int scale) /// VGATHERQPD ymm, vm64y, ymm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// - public static unsafe Vector256 GatherVector256(double* baseAddress, Vector256 index, byte scale) => GatherVector256(baseAddress, index, scale); + public static unsafe Vector256 GatherVector256(double* baseAddress, Vector256 index, byte scale) + { + switch (scale) + { + case 1: + return GatherVector256(baseAddress, index, 1); + case 2: + return GatherVector256(baseAddress, index, 2); + case 4: + return GatherVector256(baseAddress, index, 4); + case 8: + return GatherVector256(baseAddress, index, 8); + default: + throw new ArgumentOutOfRangeException(nameof(scale)); + } + } /// /// __m128i _mm_mask_i32gather_epi32 (__m128i src, int const* base_addr, __m128i vindex, __m128i mask, const int scale) /// VPGATHERDD xmm, vm32x, xmm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// - public static unsafe Vector128 GatherMaskVector128(Vector128 source, int* baseAddress, Vector128 index, Vector128 mask, byte scale) => GatherMaskVector128(source, baseAddress, index, mask, scale); + public static unsafe Vector128 GatherMaskVector128(Vector128 source, int* baseAddress, Vector128 index, Vector128 mask, byte scale) + { + switch (scale) + { + case 1: + return GatherMaskVector128(source, baseAddress, index, mask, 1); + case 2: + return GatherMaskVector128(source, baseAddress, index, mask, 2); + case 4: + return GatherMaskVector128(source, baseAddress, index, mask, 4); + case 8: + return GatherMaskVector128(source, baseAddress, index, mask, 8); + default: + throw new ArgumentOutOfRangeException(nameof(scale)); + } + } /// /// __m128i _mm_mask_i32gather_epi32 (__m128i src, int const* base_addr, __m128i vindex, __m128i mask, const int scale) /// VPGATHERDD xmm, vm32x, xmm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// - public static unsafe Vector128 GatherMaskVector128(Vector128 source, uint* baseAddress, Vector128 index, Vector128 mask, byte scale) => GatherMaskVector128(source, baseAddress, index, mask, scale); + public static unsafe Vector128 GatherMaskVector128(Vector128 source, uint* baseAddress, Vector128 index, Vector128 mask, byte scale) + { + switch (scale) + { + case 1: + return GatherMaskVector128(source, baseAddress, index, mask, 1); + case 2: + return GatherMaskVector128(source, baseAddress, index, mask, 2); + case 4: + return GatherMaskVector128(source, baseAddress, index, mask, 4); + case 8: + return GatherMaskVector128(source, baseAddress, index, mask, 8); + default: + throw new ArgumentOutOfRangeException(nameof(scale)); + } + } /// /// __m128i _mm_mask_i32gather_epi64 (__m128i src, __int64 const* base_addr, __m128i vindex, __m128i mask, const int scale) /// VPGATHERDQ xmm, vm32x, xmm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// - public static unsafe Vector128 GatherMaskVector128(Vector128 source, long* baseAddress, Vector128 index, Vector128 mask, byte scale) => GatherMaskVector128(source, baseAddress, index, mask, scale); + public static unsafe Vector128 GatherMaskVector128(Vector128 source, long* baseAddress, Vector128 index, Vector128 mask, byte scale) + { + switch (scale) + { + case 1: + return GatherMaskVector128(source, baseAddress, index, mask, 1); + case 2: + return GatherMaskVector128(source, baseAddress, index, mask, 2); + case 4: + return GatherMaskVector128(source, baseAddress, index, mask, 4); + case 8: + return GatherMaskVector128(source, baseAddress, index, mask, 8); + default: + throw new ArgumentOutOfRangeException(nameof(scale)); + } + } /// /// __m128i _mm_mask_i32gather_epi64 (__m128i src, __int64 const* base_addr, __m128i vindex, __m128i mask, const int scale) /// VPGATHERDQ xmm, vm32x, xmm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// - public static unsafe Vector128 GatherMaskVector128(Vector128 source, ulong* baseAddress, Vector128 index, Vector128 mask, byte scale) => GatherMaskVector128(source, baseAddress, index, mask, scale); + public static unsafe Vector128 GatherMaskVector128(Vector128 source, ulong* baseAddress, Vector128 index, Vector128 mask, byte scale) + { + switch (scale) + { + case 1: + return GatherMaskVector128(source, baseAddress, index, mask, 1); + case 2: + return GatherMaskVector128(source, baseAddress, index, mask, 2); + case 4: + return GatherMaskVector128(source, baseAddress, index, mask, 4); + case 8: + return GatherMaskVector128(source, baseAddress, index, mask, 8); + default: + throw new ArgumentOutOfRangeException(nameof(scale)); + } + } /// /// __m128 _mm_mask_i32gather_ps (__m128 src, float const* base_addr, __m128i vindex, __m128 mask, const int scale) /// VGATHERDPS xmm, vm32x, xmm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// - public static unsafe Vector128 GatherMaskVector128(Vector128 source, float* baseAddress, Vector128 index, Vector128 mask, byte scale) => GatherMaskVector128(source, baseAddress, index, mask, scale); + public static unsafe Vector128 GatherMaskVector128(Vector128 source, float* baseAddress, Vector128 index, Vector128 mask, byte scale) + { + switch (scale) + { + case 1: + return GatherMaskVector128(source, baseAddress, index, mask, 1); + case 2: + return GatherMaskVector128(source, baseAddress, index, mask, 2); + case 4: + return GatherMaskVector128(source, baseAddress, index, mask, 4); + case 8: + return GatherMaskVector128(source, baseAddress, index, mask, 8); + default: + throw new ArgumentOutOfRangeException(nameof(scale)); + } + } /// /// __m128d _mm_mask_i32gather_pd (__m128d src, double const* base_addr, __m128i vindex, __m128d mask, const int scale) /// VGATHERDPD xmm, vm32x, xmm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// - public static unsafe Vector128 GatherMaskVector128(Vector128 source, double* baseAddress, Vector128 index, Vector128 mask, byte scale) => GatherMaskVector128(source, baseAddress, index, mask, scale); + public static unsafe Vector128 GatherMaskVector128(Vector128 source, double* baseAddress, Vector128 index, Vector128 mask, byte scale) + { + switch (scale) + { + case 1: + return GatherMaskVector128(source, baseAddress, index, mask, 1); + case 2: + return GatherMaskVector128(source, baseAddress, index, mask, 2); + case 4: + return GatherMaskVector128(source, baseAddress, index, mask, 4); + case 8: + return GatherMaskVector128(source, baseAddress, index, mask, 8); + default: + throw new ArgumentOutOfRangeException(nameof(scale)); + } + } /// /// __m128i _mm_mask_i64gather_epi32 (__m128i src, int const* base_addr, __m128i vindex, __m128i mask, const int scale) /// VPGATHERQD xmm, vm64x, xmm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// - public static unsafe Vector128 GatherMaskVector128(Vector128 source, int* baseAddress, Vector128 index, Vector128 mask, byte scale) => GatherMaskVector128(source, baseAddress, index, mask, scale); + public static unsafe Vector128 GatherMaskVector128(Vector128 source, int* baseAddress, Vector128 index, Vector128 mask, byte scale) + { + switch (scale) + { + case 1: + return GatherMaskVector128(source, baseAddress, index, mask, 1); + case 2: + return GatherMaskVector128(source, baseAddress, index, mask, 2); + case 4: + return GatherMaskVector128(source, baseAddress, index, mask, 4); + case 8: + return GatherMaskVector128(source, baseAddress, index, mask, 8); + default: + throw new ArgumentOutOfRangeException(nameof(scale)); + } + } /// /// __m128i _mm_mask_i64gather_epi32 (__m128i src, int const* base_addr, __m128i vindex, __m128i mask, const int scale) /// VPGATHERQD xmm, vm64x, xmm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// - public static unsafe Vector128 GatherMaskVector128(Vector128 source, uint* baseAddress, Vector128 index, Vector128 mask, byte scale) => GatherMaskVector128(source, baseAddress, index, mask, scale); + public static unsafe Vector128 GatherMaskVector128(Vector128 source, uint* baseAddress, Vector128 index, Vector128 mask, byte scale) + { + switch (scale) + { + case 1: + return GatherMaskVector128(source, baseAddress, index, mask, 1); + case 2: + return GatherMaskVector128(source, baseAddress, index, mask, 2); + case 4: + return GatherMaskVector128(source, baseAddress, index, mask, 4); + case 8: + return GatherMaskVector128(source, baseAddress, index, mask, 8); + default: + throw new ArgumentOutOfRangeException(nameof(scale)); + } + } /// /// __m128i _mm_mask_i64gather_epi64 (__m128i src, __int64 const* base_addr, __m128i vindex, __m128i mask, const int scale) /// VPGATHERQQ xmm, vm64x, xmm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// - public static unsafe Vector128 GatherMaskVector128(Vector128 source, long* baseAddress, Vector128 index, Vector128 mask, byte scale) => GatherMaskVector128(source, baseAddress, index, mask, scale); + public static unsafe Vector128 GatherMaskVector128(Vector128 source, long* baseAddress, Vector128 index, Vector128 mask, byte scale) + { + switch (scale) + { + case 1: + return GatherMaskVector128(source, baseAddress, index, mask, 1); + case 2: + return GatherMaskVector128(source, baseAddress, index, mask, 2); + case 4: + return GatherMaskVector128(source, baseAddress, index, mask, 4); + case 8: + return GatherMaskVector128(source, baseAddress, index, mask, 8); + default: + throw new ArgumentOutOfRangeException(nameof(scale)); + } + } /// /// __m128i _mm_mask_i64gather_epi64 (__m128i src, __int64 const* base_addr, __m128i vindex, __m128i mask, const int scale) /// VPGATHERQQ xmm, vm64x, xmm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// - public static unsafe Vector128 GatherMaskVector128(Vector128 source, ulong* baseAddress, Vector128 index, Vector128 mask, byte scale) => GatherMaskVector128(source, baseAddress, index, mask, scale); + public static unsafe Vector128 GatherMaskVector128(Vector128 source, ulong* baseAddress, Vector128 index, Vector128 mask, byte scale) + { + switch (scale) + { + case 1: + return GatherMaskVector128(source, baseAddress, index, mask, 1); + case 2: + return GatherMaskVector128(source, baseAddress, index, mask, 2); + case 4: + return GatherMaskVector128(source, baseAddress, index, mask, 4); + case 8: + return GatherMaskVector128(source, baseAddress, index, mask, 8); + default: + throw new ArgumentOutOfRangeException(nameof(scale)); + } + } /// /// __m128 _mm_mask_i64gather_ps (__m128 src, float const* base_addr, __m128i vindex, __m128 mask, const int scale) - /// VPGATHERQPS xmm, vm64x, xmm + /// VGATHERQPS xmm, vm64x, xmm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// - public static unsafe Vector128 GatherMaskVector128(Vector128 source, float* baseAddress, Vector128 index, Vector128 mask, byte scale) => GatherMaskVector128(source, baseAddress, index, mask, scale); + public static unsafe Vector128 GatherMaskVector128(Vector128 source, float* baseAddress, Vector128 index, Vector128 mask, byte scale) + { + switch (scale) + { + case 1: + return GatherMaskVector128(source, baseAddress, index, mask, 1); + case 2: + return GatherMaskVector128(source, baseAddress, index, mask, 2); + case 4: + return GatherMaskVector128(source, baseAddress, index, mask, 4); + case 8: + return GatherMaskVector128(source, baseAddress, index, mask, 8); + default: + throw new ArgumentOutOfRangeException(nameof(scale)); + } + } /// /// __m128d _mm_mask_i64gather_pd (__m128d src, double const* base_addr, __m128i vindex, __m128d mask, const int scale) - /// VPGATHERQPD xmm, vm64x, xmm + /// VGATHERQPD xmm, vm64x, xmm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// - public static unsafe Vector128 GatherMaskVector128(Vector128 source, double* baseAddress, Vector128 index, Vector128 mask, byte scale) => GatherMaskVector128(source, baseAddress, index, mask, scale); + public static unsafe Vector128 GatherMaskVector128(Vector128 source, double* baseAddress, Vector128 index, Vector128 mask, byte scale) + { + switch (scale) + { + case 1: + return GatherMaskVector128(source, baseAddress, index, mask, 1); + case 2: + return GatherMaskVector128(source, baseAddress, index, mask, 2); + case 4: + return GatherMaskVector128(source, baseAddress, index, mask, 4); + case 8: + return GatherMaskVector128(source, baseAddress, index, mask, 8); + default: + throw new ArgumentOutOfRangeException(nameof(scale)); + } + } /// /// __m256i _mm256_mask_i32gather_epi32 (__m256i src, int const* base_addr, __m256i vindex, __m256i mask, const int scale) /// VPGATHERDD ymm, vm32y, ymm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// - public static unsafe Vector256 GatherMaskVector256(Vector256 source, int* baseAddress, Vector256 index, Vector256 mask, byte scale) => GatherMaskVector256(source, baseAddress, index, mask, scale); + public static unsafe Vector256 GatherMaskVector256(Vector256 source, int* baseAddress, Vector256 index, Vector256 mask, byte scale) + { + switch (scale) + { + case 1: + return GatherMaskVector256(source, baseAddress, index, mask, 1); + case 2: + return GatherMaskVector256(source, baseAddress, index, mask, 2); + case 4: + return GatherMaskVector256(source, baseAddress, index, mask, 4); + case 8: + return GatherMaskVector256(source, baseAddress, index, mask, 8); + default: + throw new ArgumentOutOfRangeException(nameof(scale)); + } + } /// /// __m256i _mm256_mask_i32gather_epi32 (__m256i src, int const* base_addr, __m256i vindex, __m256i mask, const int scale) /// VPGATHERDD ymm, vm32y, ymm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// - public static unsafe Vector256 GatherMaskVector256(Vector256 source, uint* baseAddress, Vector256 index, Vector256 mask, byte scale) => GatherMaskVector256(source, baseAddress, index, mask, scale); + public static unsafe Vector256 GatherMaskVector256(Vector256 source, uint* baseAddress, Vector256 index, Vector256 mask, byte scale) + { + switch (scale) + { + case 1: + return GatherMaskVector256(source, baseAddress, index, mask, 1); + case 2: + return GatherMaskVector256(source, baseAddress, index, mask, 2); + case 4: + return GatherMaskVector256(source, baseAddress, index, mask, 4); + case 8: + return GatherMaskVector256(source, baseAddress, index, mask, 8); + default: + throw new ArgumentOutOfRangeException(nameof(scale)); + } + } /// /// __m256i _mm256_mask_i32gather_epi64 (__m256i src, __int64 const* base_addr, __m128i vindex, __m256i mask, const int scale) /// VPGATHERDQ ymm, vm32y, ymm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// - public static unsafe Vector256 GatherMaskVector256(Vector256 source, long* baseAddress, Vector128 index, Vector256 mask, byte scale) => GatherMaskVector256(source, baseAddress, index, mask, scale); + public static unsafe Vector256 GatherMaskVector256(Vector256 source, long* baseAddress, Vector128 index, Vector256 mask, byte scale) + { + switch (scale) + { + case 1: + return GatherMaskVector256(source, baseAddress, index, mask, 1); + case 2: + return GatherMaskVector256(source, baseAddress, index, mask, 2); + case 4: + return GatherMaskVector256(source, baseAddress, index, mask, 4); + case 8: + return GatherMaskVector256(source, baseAddress, index, mask, 8); + default: + throw new ArgumentOutOfRangeException(nameof(scale)); + } + } /// /// __m256i _mm256_mask_i32gather_epi64 (__m256i src, __int64 const* base_addr, __m128i vindex, __m256i mask, const int scale) /// VPGATHERDQ ymm, vm32y, ymm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// - public static unsafe Vector256 GatherMaskVector256(Vector256 source, ulong* baseAddress, Vector128 index, Vector256 mask, byte scale) => GatherMaskVector256(source, baseAddress, index, mask, scale); + public static unsafe Vector256 GatherMaskVector256(Vector256 source, ulong* baseAddress, Vector128 index, Vector256 mask, byte scale) + { + switch (scale) + { + case 1: + return GatherMaskVector256(source, baseAddress, index, mask, 1); + case 2: + return GatherMaskVector256(source, baseAddress, index, mask, 2); + case 4: + return GatherMaskVector256(source, baseAddress, index, mask, 4); + case 8: + return GatherMaskVector256(source, baseAddress, index, mask, 8); + default: + throw new ArgumentOutOfRangeException(nameof(scale)); + } + } /// /// __m256 _mm256_mask_i32gather_ps (__m256 src, float const* base_addr, __m256i vindex, __m256 mask, const int scale) /// VPGATHERDPS ymm, vm32y, ymm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// - public static unsafe Vector256 GatherMaskVector256(Vector256 source, float* baseAddress, Vector256 index, Vector256 mask, byte scale) => GatherMaskVector256(source, baseAddress, index, mask, scale); + public static unsafe Vector256 GatherMaskVector256(Vector256 source, float* baseAddress, Vector256 index, Vector256 mask, byte scale) + { + switch (scale) + { + case 1: + return GatherMaskVector256(source, baseAddress, index, mask, 1); + case 2: + return GatherMaskVector256(source, baseAddress, index, mask, 2); + case 4: + return GatherMaskVector256(source, baseAddress, index, mask, 4); + case 8: + return GatherMaskVector256(source, baseAddress, index, mask, 8); + default: + throw new ArgumentOutOfRangeException(nameof(scale)); + } + } /// /// __m256d _mm256_mask_i32gather_pd (__m256d src, double const* base_addr, __m128i vindex, __m256d mask, const int scale) /// VPGATHERDPD ymm, vm32y, ymm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// - public static unsafe Vector256 GatherMaskVector256(Vector256 source, double* baseAddress, Vector128 index, Vector256 mask, byte scale) => GatherMaskVector256(source, baseAddress, index, mask, scale); + public static unsafe Vector256 GatherMaskVector256(Vector256 source, double* baseAddress, Vector128 index, Vector256 mask, byte scale) + { + switch (scale) + { + case 1: + return GatherMaskVector256(source, baseAddress, index, mask, 1); + case 2: + return GatherMaskVector256(source, baseAddress, index, mask, 2); + case 4: + return GatherMaskVector256(source, baseAddress, index, mask, 4); + case 8: + return GatherMaskVector256(source, baseAddress, index, mask, 8); + default: + throw new ArgumentOutOfRangeException(nameof(scale)); + } + } /// /// __m128i _mm256_mask_i64gather_epi32 (__m128i src, int const* base_addr, __m256i vindex, __m128i mask, const int scale) - /// VPGATHERQD ymm, vm32y, ymm + /// VPGATHERQD xmm, vm32y, xmm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// - public static unsafe Vector128 GatherMaskVector128(Vector128 source, int* baseAddress, Vector256 index, Vector128 mask, byte scale) => GatherMaskVector128(source, baseAddress, index, mask, scale); + public static unsafe Vector128 GatherMaskVector128(Vector128 source, int* baseAddress, Vector256 index, Vector128 mask, byte scale) + { + switch (scale) + { + case 1: + return GatherMaskVector128(source, baseAddress, index, mask, 1); + case 2: + return GatherMaskVector128(source, baseAddress, index, mask, 2); + case 4: + return GatherMaskVector128(source, baseAddress, index, mask, 4); + case 8: + return GatherMaskVector128(source, baseAddress, index, mask, 8); + default: + throw new ArgumentOutOfRangeException(nameof(scale)); + } + } /// /// __m128i _mm256_mask_i64gather_epi32 (__m128i src, int const* base_addr, __m256i vindex, __m128i mask, const int scale) - /// VPGATHERQD ymm, vm32y, ymm + /// VPGATHERQD xmm, vm32y, xmm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// - public static unsafe Vector128 GatherMaskVector128(Vector128 source, uint* baseAddress, Vector256 index, Vector128 mask, byte scale) => GatherMaskVector128(source, baseAddress, index, mask, scale); + public static unsafe Vector128 GatherMaskVector128(Vector128 source, uint* baseAddress, Vector256 index, Vector128 mask, byte scale) + { + switch (scale) + { + case 1: + return GatherMaskVector128(source, baseAddress, index, mask, 1); + case 2: + return GatherMaskVector128(source, baseAddress, index, mask, 2); + case 4: + return GatherMaskVector128(source, baseAddress, index, mask, 4); + case 8: + return GatherMaskVector128(source, baseAddress, index, mask, 8); + default: + throw new ArgumentOutOfRangeException(nameof(scale)); + } + } /// /// __m256i _mm256_mask_i64gather_epi64 (__m256i src, __int64 const* base_addr, __m256i vindex, __m256i mask, const int scale) /// VPGATHERQQ ymm, vm32y, ymm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// - public static unsafe Vector256 GatherMaskVector256(Vector256 source, long* baseAddress, Vector256 index, Vector256 mask, byte scale) => GatherMaskVector256(source, baseAddress, index, mask, scale); + public static unsafe Vector256 GatherMaskVector256(Vector256 source, long* baseAddress, Vector256 index, Vector256 mask, byte scale) + { + switch (scale) + { + case 1: + return GatherMaskVector256(source, baseAddress, index, mask, 1); + case 2: + return GatherMaskVector256(source, baseAddress, index, mask, 2); + case 4: + return GatherMaskVector256(source, baseAddress, index, mask, 4); + case 8: + return GatherMaskVector256(source, baseAddress, index, mask, 8); + default: + throw new ArgumentOutOfRangeException(nameof(scale)); + } + } /// /// __m256i _mm256_mask_i64gather_epi64 (__m256i src, __int64 const* base_addr, __m256i vindex, __m256i mask, const int scale) /// VPGATHERQQ ymm, vm32y, ymm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// - public static unsafe Vector256 GatherMaskVector256(Vector256 source, ulong* baseAddress, Vector256 index, Vector256 mask, byte scale) => GatherMaskVector256(source, baseAddress, index, mask, scale); + public static unsafe Vector256 GatherMaskVector256(Vector256 source, ulong* baseAddress, Vector256 index, Vector256 mask, byte scale) + { + switch (scale) + { + case 1: + return GatherMaskVector256(source, baseAddress, index, mask, 1); + case 2: + return GatherMaskVector256(source, baseAddress, index, mask, 2); + case 4: + return GatherMaskVector256(source, baseAddress, index, mask, 4); + case 8: + return GatherMaskVector256(source, baseAddress, index, mask, 8); + default: + throw new ArgumentOutOfRangeException(nameof(scale)); + } + } /// /// __m128 _mm256_mask_i64gather_ps (__m128 src, float const* base_addr, __m256i vindex, __m128 mask, const int scale) - /// VPGATHERQPS ymm, vm32y, ymm + /// VGATHERQPS xmm, vm32y, xmm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// - public static unsafe Vector128 GatherMaskVector128(Vector128 source, float* baseAddress, Vector256 index, Vector128 mask, byte scale) => GatherMaskVector128(source, baseAddress, index, mask, scale); + public static unsafe Vector128 GatherMaskVector128(Vector128 source, float* baseAddress, Vector256 index, Vector128 mask, byte scale) + { + switch (scale) + { + case 1: + return GatherMaskVector128(source, baseAddress, index, mask, 1); + case 2: + return GatherMaskVector128(source, baseAddress, index, mask, 2); + case 4: + return GatherMaskVector128(source, baseAddress, index, mask, 4); + case 8: + return GatherMaskVector128(source, baseAddress, index, mask, 8); + default: + throw new ArgumentOutOfRangeException(nameof(scale)); + } + } /// /// __m256d _mm256_mask_i64gather_pd (__m256d src, double const* base_addr, __m256i vindex, __m256d mask, const int scale) - /// VPGATHERQPD ymm, vm32y, ymm + /// VGATHERQPD ymm, vm32y, ymm + /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown. /// - public static unsafe Vector256 GatherMaskVector256(Vector256 source, double* baseAddress, Vector256 index, Vector256 mask, byte scale) => GatherMaskVector256(source, baseAddress, index, mask, scale); + public static unsafe Vector256 GatherMaskVector256(Vector256 source, double* baseAddress, Vector256 index, Vector256 mask, byte scale) + { + switch (scale) + { + case 1: + return GatherMaskVector256(source, baseAddress, index, mask, 1); + case 2: + return GatherMaskVector256(source, baseAddress, index, mask, 2); + case 4: + return GatherMaskVector256(source, baseAddress, index, mask, 4); + case 8: + return GatherMaskVector256(source, baseAddress, index, mask, 8); + default: + throw new ArgumentOutOfRangeException(nameof(scale)); + } + } /// /// __m256i _mm256_hadd_epi16 (__m256i a, __m256i b)