Skip to content

Commit 069b961

Browse files
FeiPengInteljkotas
authored andcommitted
Add all integer overloads for Avx2/SSE4.1 BlendVariable
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
1 parent eca3f8d commit 069b961

File tree

4 files changed

+150
-0
lines changed

4 files changed

+150
-0
lines changed

src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Avx2.PlatformNotSupported.cs

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,45 @@ internal Avx2() { }
236236
/// </summary>
237237
public static Vector256<byte> BlendVariable(Vector256<byte> left, Vector256<byte> right, Vector256<byte> mask) { throw new PlatformNotSupportedException(); }
238238

239+
/// <summary>
240+
/// __m256i _mm256_blendv_epi8 (__m256i a, __m256i b, __m256i mask)
241+
/// VPBLENDVB ymm, ymm, ymm/m256, ymm
242+
/// This intrinsic generates VPBLENDVB that needs a BYTE mask-vector, so users should correctly set each mask byte for the selected elements.
243+
/// </summary>
244+
public static Vector256<short> BlendVariable(Vector256<short> left, Vector256<short> right, Vector256<short> mask) { throw new PlatformNotSupportedException(); }
245+
/// <summary>
246+
/// __m256i _mm256_blendv_epi8 (__m256i a, __m256i b, __m256i mask)
247+
/// VPBLENDVB ymm, ymm, ymm/m256, ymm
248+
/// This intrinsic generates VPBLENDVB that needs a BYTE mask-vector, so users should correctly set each mask byte for the selected elements.
249+
/// </summary>
250+
public static Vector256<ushort> BlendVariable(Vector256<ushort> left, Vector256<ushort> right, Vector256<ushort> mask) { throw new PlatformNotSupportedException(); }
251+
252+
/// <summary>
253+
/// __m256i _mm256_blendv_epi8 (__m256i a, __m256i b, __m256i mask)
254+
/// VPBLENDVB ymm, ymm, ymm/m256, ymm
255+
/// This intrinsic generates VPBLENDVB that needs a BYTE mask-vector, so users should correctly set each mask byte for the selected elements.
256+
/// </summary>
257+
public static Vector256<int> BlendVariable(Vector256<int> left, Vector256<int> right, Vector256<int> mask) { throw new PlatformNotSupportedException(); }
258+
/// <summary>
259+
/// __m256i _mm256_blendv_epi8 (__m256i a, __m256i b, __m256i mask)
260+
/// VPBLENDVB ymm, ymm, ymm/m256, ymm
261+
/// This intrinsic generates VPBLENDVB that needs a BYTE mask-vector, so users should correctly set each mask byte for the selected elements.
262+
/// </summary>
263+
public static Vector256<uint> BlendVariable(Vector256<uint> left, Vector256<uint> right, Vector256<uint> mask) { throw new PlatformNotSupportedException(); }
264+
265+
/// <summary>
266+
/// __m256i _mm256_blendv_epi8 (__m256i a, __m256i b, __m256i mask)
267+
/// VPBLENDVB ymm, ymm, ymm/m256, ymm
268+
/// This intrinsic generates VPBLENDVB that needs a BYTE mask-vector, so users should correctly set each mask byte for the selected elements.
269+
/// </summary>
270+
public static Vector256<long> BlendVariable(Vector256<long> left, Vector256<long> right, Vector256<long> mask) { throw new PlatformNotSupportedException(); }
271+
/// <summary>
272+
/// __m256i _mm256_blendv_epi8 (__m256i a, __m256i b, __m256i mask)
273+
/// VPBLENDVB ymm, ymm, ymm/m256, ymm
274+
/// This intrinsic generates VPBLENDVB that needs a BYTE mask-vector, so users should correctly set each mask byte for the selected elements.
275+
/// </summary>
276+
public static Vector256<ulong> BlendVariable(Vector256<ulong> left, Vector256<ulong> right, Vector256<ulong> mask) { throw new PlatformNotSupportedException(); }
277+
239278
/// <summary>
240279
/// __m128i _mm_broadcastb_epi8 (__m128i a)
241280
/// VPBROADCASTB xmm, xmm

src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Avx2.cs

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,45 @@ internal Avx2() { }
236236
/// </summary>
237237
public static Vector256<byte> BlendVariable(Vector256<byte> left, Vector256<byte> right, Vector256<byte> mask) => BlendVariable(left, right, mask);
238238

239+
/// <summary>
240+
/// __m256i _mm256_blendv_epi8 (__m256i a, __m256i b, __m256i mask)
241+
/// VPBLENDVB ymm, ymm, ymm/m256, ymm
242+
/// This intrinsic generates VPBLENDVB that needs a BYTE mask-vector, so users should correctly set each mask byte for the selected elements.
243+
/// </summary>
244+
public static Vector256<short> BlendVariable(Vector256<short> left, Vector256<short> right, Vector256<short> mask) => BlendVariable(left, right, mask);
245+
/// <summary>
246+
/// __m256i _mm256_blendv_epi8 (__m256i a, __m256i b, __m256i mask)
247+
/// VPBLENDVB ymm, ymm, ymm/m256, ymm
248+
/// This intrinsic generates VPBLENDVB that needs a BYTE mask-vector, so users should correctly set each mask byte for the selected elements.
249+
/// </summary>
250+
public static Vector256<ushort> BlendVariable(Vector256<ushort> left, Vector256<ushort> right, Vector256<ushort> mask) => BlendVariable(left, right, mask);
251+
252+
/// <summary>
253+
/// __m256i _mm256_blendv_epi8 (__m256i a, __m256i b, __m256i mask)
254+
/// VPBLENDVB ymm, ymm, ymm/m256, ymm
255+
/// This intrinsic generates VPBLENDVB that needs a BYTE mask-vector, so users should correctly set each mask byte for the selected elements.
256+
/// </summary>
257+
public static Vector256<int> BlendVariable(Vector256<int> left, Vector256<int> right, Vector256<int> mask) => BlendVariable(left, right, mask);
258+
/// <summary>
259+
/// __m256i _mm256_blendv_epi8 (__m256i a, __m256i b, __m256i mask)
260+
/// VPBLENDVB ymm, ymm, ymm/m256, ymm
261+
/// This intrinsic generates VPBLENDVB that needs a BYTE mask-vector, so users should correctly set each mask byte for the selected elements.
262+
/// </summary>
263+
public static Vector256<uint> BlendVariable(Vector256<uint> left, Vector256<uint> right, Vector256<uint> mask) => BlendVariable(left, right, mask);
264+
265+
/// <summary>
266+
/// __m256i _mm256_blendv_epi8 (__m256i a, __m256i b, __m256i mask)
267+
/// VPBLENDVB ymm, ymm, ymm/m256, ymm
268+
/// This intrinsic generates VPBLENDVB that needs a BYTE mask-vector, so users should correctly set each mask byte for the selected elements.
269+
/// </summary>
270+
public static Vector256<long> BlendVariable(Vector256<long> left, Vector256<long> right, Vector256<long> mask) => BlendVariable(left, right, mask);
271+
/// <summary>
272+
/// __m256i _mm256_blendv_epi8 (__m256i a, __m256i b, __m256i mask)
273+
/// VPBLENDVB ymm, ymm, ymm/m256, ymm
274+
/// This intrinsic generates VPBLENDVB that needs a BYTE mask-vector, so users should correctly set each mask byte for the selected elements.
275+
/// </summary>
276+
public static Vector256<ulong> BlendVariable(Vector256<ulong> left, Vector256<ulong> right, Vector256<ulong> mask) => BlendVariable(left, right, mask);
277+
239278
/// <summary>
240279
/// __m128i _mm_broadcastb_epi8 (__m128i a)
241280
/// VPBROADCASTB xmm, xmm

src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Sse41.PlatformNotSupported.cs

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,42 @@ internal Sse41() { }
5252
/// </summary>
5353
public static Vector128<byte> BlendVariable(Vector128<byte> left, Vector128<byte> right, Vector128<byte> mask) { throw new PlatformNotSupportedException(); }
5454
/// <summary>
55+
/// __m128i _mm_blendv_epi8 (__m128i a, __m128i b, __m128i mask)
56+
/// PBLENDVB xmm, xmm/m128, xmm
57+
/// This intrinsic generates PBLENDVB that needs a BYTE mask-vector, so users should correctly set each mask byte for the selected elements.
58+
/// </summary>
59+
public static Vector128<short> BlendVariable(Vector128<short> left, Vector128<short> right, Vector128<short> mask) { throw new PlatformNotSupportedException(); }
60+
/// <summary>
61+
/// __m128i _mm_blendv_epi8 (__m128i a, __m128i b, __m128i mask)
62+
/// PBLENDVB xmm, xmm/m128, xmm
63+
/// This intrinsic generates PBLENDVB that needs a BYTE mask-vector, so users should correctly set each mask byte for the selected elements.
64+
/// </summary>
65+
public static Vector128<ushort> BlendVariable(Vector128<ushort> left, Vector128<ushort> right, Vector128<ushort> mask) { throw new PlatformNotSupportedException(); }
66+
/// <summary>
67+
/// __m128i _mm_blendv_epi8 (__m128i a, __m128i b, __m128i mask)
68+
/// PBLENDVB xmm, xmm/m128, xmm
69+
/// This intrinsic generates PBLENDVB that needs a BYTE mask-vector, so users should correctly set each mask byte for the selected elements.
70+
/// </summary>
71+
public static Vector128<int> BlendVariable(Vector128<int> left, Vector128<int> right, Vector128<int> mask) { throw new PlatformNotSupportedException(); }
72+
/// <summary>
73+
/// __m128i _mm_blendv_epi8 (__m128i a, __m128i b, __m128i mask)
74+
/// PBLENDVB xmm, xmm/m128, xmm
75+
/// This intrinsic generates PBLENDVB that needs a BYTE mask-vector, so users should correctly set each mask byte for the selected elements.
76+
/// </summary>
77+
public static Vector128<uint> BlendVariable(Vector128<uint> left, Vector128<uint> right, Vector128<uint> mask) { throw new PlatformNotSupportedException(); }
78+
/// <summary>
79+
/// __m128i _mm_blendv_epi8 (__m128i a, __m128i b, __m128i mask)
80+
/// PBLENDVB xmm, xmm/m128, xmm
81+
/// This intrinsic generates PBLENDVB that needs a BYTE mask-vector, so users should correctly set each mask byte for the selected elements.
82+
/// </summary>
83+
public static Vector128<long> BlendVariable(Vector128<long> left, Vector128<long> right, Vector128<long> mask) { throw new PlatformNotSupportedException(); }
84+
/// <summary>
85+
/// __m128i _mm_blendv_epi8 (__m128i a, __m128i b, __m128i mask)
86+
/// PBLENDVB xmm, xmm/m128, xmm
87+
/// This intrinsic generates PBLENDVB that needs a BYTE mask-vector, so users should correctly set each mask byte for the selected elements.
88+
/// </summary>
89+
public static Vector128<ulong> BlendVariable(Vector128<ulong> left, Vector128<ulong> right, Vector128<ulong> mask) { throw new PlatformNotSupportedException(); }
90+
/// <summary>
5591
/// __m128 _mm_blendv_ps (__m128 a, __m128 b, __m128 mask)
5692
/// BLENDVPS xmm, xmm/m128, xmm0
5793
/// </summary>

src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Sse41.cs

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,42 @@ internal Sse41() { }
5252
/// </summary>
5353
public static Vector128<byte> BlendVariable(Vector128<byte> left, Vector128<byte> right, Vector128<byte> mask) => BlendVariable(left, right, mask);
5454
/// <summary>
55+
/// __m128i _mm_blendv_epi8 (__m128i a, __m128i b, __m128i mask)
56+
/// PBLENDVB xmm, xmm/m128, xmm
57+
/// This intrinsic generates PBLENDVB that needs a BYTE mask-vector, so users should correctly set each mask byte for the selected elements.
58+
/// </summary>
59+
public static Vector128<short> BlendVariable(Vector128<short> left, Vector128<short> right, Vector128<short> mask) => BlendVariable(left, right, mask);
60+
/// <summary>
61+
/// __m128i _mm_blendv_epi8 (__m128i a, __m128i b, __m128i mask)
62+
/// PBLENDVB xmm, xmm/m128, xmm
63+
/// This intrinsic generates PBLENDVB that needs a BYTE mask-vector, so users should correctly set each mask byte for the selected elements.
64+
/// </summary>
65+
public static Vector128<ushort> BlendVariable(Vector128<ushort> left, Vector128<ushort> right, Vector128<ushort> mask) => BlendVariable(left, right, mask);
66+
/// <summary>
67+
/// __m128i _mm_blendv_epi8 (__m128i a, __m128i b, __m128i mask)
68+
/// PBLENDVB xmm, xmm/m128, xmm
69+
/// This intrinsic generates PBLENDVB that needs a BYTE mask-vector, so users should correctly set each mask byte for the selected elements.
70+
/// </summary>
71+
public static Vector128<int> BlendVariable(Vector128<int> left, Vector128<int> right, Vector128<int> mask) => BlendVariable(left, right, mask);
72+
/// <summary>
73+
/// __m128i _mm_blendv_epi8 (__m128i a, __m128i b, __m128i mask)
74+
/// PBLENDVB xmm, xmm/m128, xmm
75+
/// This intrinsic generates PBLENDVB that needs a BYTE mask-vector, so users should correctly set each mask byte for the selected elements.
76+
/// </summary>
77+
public static Vector128<uint> BlendVariable(Vector128<uint> left, Vector128<uint> right, Vector128<uint> mask) => BlendVariable(left, right, mask);
78+
/// <summary>
79+
/// __m128i _mm_blendv_epi8 (__m128i a, __m128i b, __m128i mask)
80+
/// PBLENDVB xmm, xmm/m128, xmm
81+
/// This intrinsic generates PBLENDVB that needs a BYTE mask-vector, so users should correctly set each mask byte for the selected elements.
82+
/// </summary>
83+
public static Vector128<long> BlendVariable(Vector128<long> left, Vector128<long> right, Vector128<long> mask) => BlendVariable(left, right, mask);
84+
/// <summary>
85+
/// __m128i _mm_blendv_epi8 (__m128i a, __m128i b, __m128i mask)
86+
/// PBLENDVB xmm, xmm/m128, xmm
87+
/// This intrinsic generates PBLENDVB that needs a BYTE mask-vector, so users should correctly set each mask byte for the selected elements.
88+
/// </summary>
89+
public static Vector128<ulong> BlendVariable(Vector128<ulong> left, Vector128<ulong> right, Vector128<ulong> mask) => BlendVariable(left, right, mask);
90+
/// <summary>
5591
/// __m128 _mm_blendv_ps (__m128 a, __m128 b, __m128 mask)
5692
/// BLENDVPS xmm, xmm/m128, xmm0
5793
/// </summary>

0 commit comments

Comments
 (0)