5 types derived from Avx2
System.Private.CoreLib (5)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\X86\Avx10v1.cs (1)
12
public abstract class Avx10v1 :
Avx2
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\X86\Avx512F.cs (1)
12
public abstract class Avx512F :
Avx2
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\X86\AvxVnni.cs (1)
11
public abstract class AvxVnni :
Avx2
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\X86\AvxVnniInt16.cs (1)
11
public abstract class AvxVnniInt16 :
Avx2
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\X86\AvxVnniInt8.cs (1)
12
public abstract class AvxVnniInt8 :
Avx2
190 references to Avx2
GenerateDocumentationAndConfigFiles (2)
src\roslyn\src\Compilers\Core\Portable\Hashing\XxHashShared.cs (2)
682
Vector256<ulong> product =
Avx2
.IsSupported ?
683
Avx2
.Multiply(sourceKey, sourceKeyLow) :
Microsoft.AspNetCore.Razor.Utilities.Shared (2)
Utilities\Hashing\XxHashShared.cs (2)
681
Vector256<ulong> product =
Avx2
.IsSupported ?
682
Avx2
.Multiply(sourceKey, sourceKeyLow) :
Microsoft.CodeAnalysis (2)
Hashing\XxHashShared.cs (2)
682
Vector256<ulong> product =
Avx2
.IsSupported ?
683
Avx2
.Multiply(sourceKey, sourceKeyLow) :
Microsoft.CodeAnalysis.Workspaces (2)
src\roslyn\src\Compilers\Core\Portable\Hashing\XxHashShared.cs (2)
682
Vector256<ulong> product =
Avx2
.IsSupported ?
683
Avx2
.Multiply(sourceKey, sourceKeyLow) :
Microsoft.ML.CpuMath (2)
AvxIntrinsics.cs (2)
78
if (
Avx2
.IsSupported)
81
return
Avx2
.GatherVector256(src, idx256, 4);
System.IO.Hashing (7)
System\IO\Hashing\Adler32.cs (5)
205
if (Vector256.IsHardwareAccelerated &&
Avx2
.IsSupported && source.Length >= Vector256<byte>.Count)
394
vs1 +=
Avx2
.SumAbsoluteDifferences(data, Vector256<byte>.Zero).AsUInt32();
397
Vector256<short> mad =
Avx2
.MultiplyAddAdjacent(data, weights);
398
vs2 +=
Avx2
.MultiplyAddAdjacent(mad, Vector256<short>.One).AsUInt32();
459
Vector256<uint> sumLo =
Avx2
.SumAbsoluteDifferences(data.GetLower(), Vector256<byte>.Zero).AsUInt32();
System\IO\Hashing\XxHashShared.cs (2)
674
Vector256<ulong> product =
Avx2
.IsSupported ?
675
Avx2
.Multiply(sourceKey, sourceKeyLow) :
System.Numerics.Tensors (9)
System\Numerics\Tensors\netcore\TensorPrimitives.IndexOfMax.cs (7)
121
if (
Avx2
.IsSupported)
123
if (typeof(T) == typeof(float)) return
Avx2
.BlendVariable(left.AsSingle(), right.AsSingle(), (~mask).AsSingle()).As<float, T>();
124
if (typeof(T) == typeof(double)) return
Avx2
.BlendVariable(left.AsDouble(), right.AsDouble(), (~mask).AsDouble()).As<double, T>();
126
if (sizeof(T) == 1) return
Avx2
.BlendVariable(left.AsByte(), right.AsByte(), (~mask).AsByte()).As<byte, T>();
127
if (sizeof(T) == 2) return
Avx2
.BlendVariable(left.AsUInt16(), right.AsUInt16(), (~mask).AsUInt16()).As<ushort, T>();
128
if (sizeof(T) == 4) return
Avx2
.BlendVariable(left.AsUInt32(), right.AsUInt32(), (~mask).AsUInt32()).As<uint, T>();
129
if (sizeof(T) == 8) return
Avx2
.BlendVariable(left.AsUInt64(), right.AsUInt64(), (~mask).AsUInt64()).As<ulong, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.LeadingZeroCount.cs (2)
127
Vector256<byte> nibbleSelectMask =
Avx2
.CompareEqual(highNibble, Vector256<byte>.Zero);
128
Vector256<byte> indexVector =
Avx2
.BlendVariable(highNibble, lowNibble, nibbleSelectMask) +
System.Private.CoreLib (163)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Helper\Base64DecoderHelper.cs (15)
70
if (
Avx2
.IsSupported && (end >= src))
378
if (
Avx2
.IsSupported && (end >= src))
905
[CompExactlyDependsOn(typeof(
Avx2
))]
974
Vector256<short> merge_ab_and_bc =
Avx2
.MultiplyAddAdjacent(str.AsByte(), mergeConstant0);
980
Vector256<int> output =
Avx2
.MultiplyAddAdjacent(merge_ab_and_bc, mergeConstant1);
987
output =
Avx2
.Shuffle(output.AsSByte(), packBytesInLaneMask).AsInt32();
994
str =
Avx2
.PermuteVar8x32(output, packLanesControl).AsSByte();
1517
[CompExactlyDependsOn(typeof(
Avx2
))]
1529
Vector256<sbyte> hi =
Avx2
.Shuffle(lutHigh, hiNibbles);
1530
Vector256<sbyte> lo =
Avx2
.Shuffle(lutLow, loNibbles);
1538
Vector256<sbyte> eq2F =
Avx2
.CompareEqual(str, maskSlashOrUnderscore);
1539
Vector256<sbyte> shift =
Avx2
.Shuffle(lutShift, eq2F + hiNibbles);
1555
[CompExactlyDependsOn(typeof(
Avx2
))]
1711
[CompExactlyDependsOn(typeof(
Avx2
))]
1733
[CompExactlyDependsOn(typeof(
Avx2
))]
src\runtime\src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Helper\Base64EncoderHelper.cs (9)
57
if (
Avx2
.IsSupported && (end >= src))
212
[CompExactlyDependsOn(typeof(
Avx2
))]
265
str =
Avx2
.PermuteVar8x32(str.AsInt32(), Vector256.Create(
281
str =
Avx2
.Shuffle(str, shuffleVec);
313
Vector256<ushort> t1 =
Avx2
.MultiplyHigh(t0.AsUInt16(), shiftAC);
355
Vector256<byte> indices =
Avx2
.SubtractSaturate(str.AsByte(), const51);
358
Vector256<sbyte> mask =
Avx2
.CompareGreaterThan(str, const25);
364
str +=
Avx2
.Shuffle(lut, tmp);
784
[CompExactlyDependsOn(typeof(
Avx2
))]
src\runtime\src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Url\Base64UrlDecoder.cs (7)
413
[CompExactlyDependsOn(typeof(
Avx2
))]
424
Vector256<sbyte> lowerBound =
Avx2
.Shuffle(lutLow, hiNibbles);
425
Vector256<sbyte> upperBound =
Avx2
.Shuffle(lutHigh, hiNibbles);
440
Vector256<sbyte> shift =
Avx2
.Shuffle(lutShift, hiNibbles);
452
[CompExactlyDependsOn(typeof(
Avx2
))]
527
[CompExactlyDependsOn(typeof(
Avx2
))]
537
[CompExactlyDependsOn(typeof(
Avx2
))]
src\runtime\src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Url\Base64UrlEncoder.cs (1)
293
[CompExactlyDependsOn(typeof(
Avx2
))]
src\runtime\src\libraries\System.Private.CoreLib\src\System\Half.cs (3)
163
if (
Avx2
.IsSupported || ArmBase.Arm64.IsSupported)
199
if (
Avx2
.IsSupported || ArmBase.Arm64.IsSupported)
460
if (
Avx2
.IsSupported || ArmBase.Arm64.IsSupported)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector128.cs (4)
472
if (
Avx2
.IsSupported)
475
lowerBits =
Avx2
.Blend(lowerBits, Create(0x43300000_00000000).AsInt32(), 0b1010); // Blend the 32 lowest significant bits of vector with the bit representation of double(2^52)
513
if (
Avx2
.IsSupported)
516
lowerBits =
Avx2
.Blend(lowerBits, Create(0x43300000_00000000UL).AsUInt32(), 0b1010); // Blend the 32 lowest significant bits of vector with the bit representation of double(2^52)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector256.cs (23)
497
if (
Avx2
.IsSupported)
505
lowerBits =
Avx2
.Blend(lowerBits, Create(0x43300000_00000000).AsInt32(), 0b10101010); // Blend the 32 lowest significant bits of vector with the bit representation of double(2^52)
507
Vector256<long> upperBits =
Avx2
.ShiftRightLogical(vector, 32); // Extract the 32 most significant bits of vector
508
upperBits =
Avx2
.Xor(upperBits, Create(0x45300000_80000000)); // Flip the msb of upperBits and blend with the bit representation of double(2^84 + 2^63)
530
if (
Avx2
.IsSupported)
538
lowerBits =
Avx2
.Blend(lowerBits, Create(0x43300000_00000000UL).AsUInt32(), 0b10101010); // Blend the 32 lowest significant bits of vector with the bit representation of double(2^52) */
540
Vector256<ulong> upperBits =
Avx2
.ShiftRightLogical(vector, 32); // Extract the 32 most significant bits of vector
541
upperBits =
Avx2
.Xor(upperBits, Create(0x45300000_00000000UL)); // Blend upperBits with the bit representation of double(2^84)
628
if (
Avx2
.IsSupported)
635
Vector256<int> lowerBits =
Avx2
.And(vector, Create(0x0000FFFFU)).AsInt32();
636
Vector256<int> upperBits =
Avx2
.ShiftRightLogical(vector, 16).AsInt32();
1766
if (
Avx2
.IsSupported && ((typeof(T) == typeof(int)) || (typeof(T) == typeof(uint))))
1768
Vector256<int> lower =
Avx2
.UnpackLow(left.AsInt32(), right.AsInt32());
1769
Vector256<int> upper =
Avx2
.UnpackHigh(left.AsInt32(), right.AsInt32());
1772
Avx2
.Permute2x128(lower, upper, 0x20).As<int, T>(),
1773
Avx2
.Permute2x128(lower, upper, 0x31).As<int, T>()
1801
if (
Avx2
.IsSupported && ((typeof(T) == typeof(int)) || (typeof(T) == typeof(uint))))
1803
Vector256<int> leftUnzip =
Avx2
.Shuffle(left.AsInt32(), 0xD8);
1804
leftUnzip =
Avx2
.Permute4x64(leftUnzip.AsInt64(), 0xD8).AsInt32();
1806
Vector256<int> rightUnzip =
Avx2
.Shuffle(right.AsInt32(), 0xD8);
1807
rightUnzip =
Avx2
.Permute4x64(rightUnzip.AsInt64(), 0xD8).AsInt32();
1810
Avx2
.Permute2x128(leftUnzip, rightUnzip, 0x20).As<int, T>(),
1811
Avx2
.Permute2x128(leftUnzip, rightUnzip, 0x31).As<int, T>()
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\X86\Avx10v1.cs (1)
3944
public new abstract class X64 :
Avx2
.X64
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\X86\Avx512F.cs (1)
2307
public new abstract class X64 :
Avx2
.X64
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\X86\AvxVnni.cs (1)
22
public new abstract class X64 :
Avx2
.X64
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\X86\AvxVnniInt16.cs (1)
22
public new abstract class X64 :
Avx2
.X64
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\X86\AvxVnniInt8.cs (1)
23
public new abstract class X64 :
Avx2
.X64
src\runtime\src\libraries\System.Private.CoreLib\src\System\SearchValues\IndexOfAnyAsciiSearcher.cs (29)
313
if (
Avx2
.IsSupported && searchSpaceLength > 2 * Vector128<short>.Count)
370
if (!
Avx2
.IsSupported && searchSpaceLength > 2 * Vector128<short>.Count)
445
if (
Avx2
.IsSupported && searchSpaceLength > 2 * Vector128<short>.Count)
501
if (!
Avx2
.IsSupported && searchSpaceLength > 2 * Vector128<short>.Count)
598
if (
Avx2
.IsSupported && searchSpaceLength > Vector128<byte>.Count)
652
if (!
Avx2
.IsSupported && searchSpaceLength > Vector128<byte>.Count)
723
if (
Avx2
.IsSupported && searchSpaceLength > Vector128<byte>.Count)
777
if (!
Avx2
.IsSupported && searchSpaceLength > Vector128<byte>.Count)
869
if (
Avx2
.IsSupported && searchSpaceLength > Vector128<byte>.Count)
926
if (!
Avx2
.IsSupported && searchSpaceLength > Vector128<byte>.Count)
997
if (
Avx2
.IsSupported && searchSpaceLength > Vector128<byte>.Count)
1054
if (!
Avx2
.IsSupported && searchSpaceLength > Vector128<byte>.Count)
1171
[CompExactlyDependsOn(typeof(
Avx2
))]
1185
[CompExactlyDependsOn(typeof(
Avx2
))]
1192
Vector256<byte> values =
Avx2
.Shuffle(bitmapLookup, source);
1198
Vector256<byte> bitMask =
Avx2
.Shuffle(bitmapLookup, source);
1199
Vector256<byte> bitPositions =
Avx2
.Shuffle(Vector256.Create(0x8040201008040201).AsByte(), highNibbles);
1230
[CompExactlyDependsOn(typeof(
Avx2
))]
1239
Vector256<byte> row0 =
Avx2
.Shuffle(bitmapLookup0, lowNibbles);
1240
Vector256<byte> row1 =
Avx2
.Shuffle(bitmapLookup1, lowNibbles);
1242
Vector256<byte> bitmask =
Avx2
.Shuffle(Vector256.Create(0x8040201008040201).AsByte(), highNibbles);
1276
[CompExactlyDependsOn(typeof(
Avx2
))]
1290
[CompExactlyDependsOn(typeof(
Avx2
))]
1413
[CompExactlyDependsOn(typeof(
Avx2
))]
1417
return
Avx2
.PackUnsignedSaturate(
1451
[CompExactlyDependsOn(typeof(
Avx2
))]
1455
return
Avx2
.PackUnsignedSaturate(lower.AsInt16(), upper.AsInt16());
1500
[CompExactlyDependsOn(typeof(
Avx2
))]
1527
[CompExactlyDependsOn(typeof(
Avx2
))]
src\runtime\src\libraries\System.Private.CoreLib\src\System\SearchValues\ProbabilisticMap.cs (9)
183
[CompExactlyDependsOn(typeof(
Avx2
))]
189
Vector256<byte> sourceLower =
Avx2
.PackUnsignedSaturate(
193
Vector256<byte> sourceUpper =
Avx2
.PackUnsignedSaturate(
204
[CompExactlyDependsOn(typeof(
Avx2
))]
209
Vector256<byte> bitPositions =
Avx2
.Shuffle(Vector256.Create(0x8040201008040201).AsByte(), shifted);
212
Vector256<byte> bitMaskLower =
Avx2
.Shuffle(charMapLower, index);
213
Vector256<byte> bitMaskUpper =
Avx2
.Shuffle(charMapUpper, index - Vector256.Create((byte)16));
524
if (
Avx2
.IsSupported && searchSpaceLength >= 32)
702
if (
Avx2
.IsSupported && searchSpaceLength >= 32)
src\runtime\src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\AsciiStringSearchValuesTeddyBase.cs (4)
164
if (
Avx2
.IsSupported && span.Length >= CharsPerIterationAvx2 + MatchStartOffsetN2)
185
if (
Avx2
.IsSupported && span.Length >= CharsPerIterationAvx2 + MatchStartOffsetN3)
251
[CompExactlyDependsOn(typeof(
Avx2
))]
429
[CompExactlyDependsOn(typeof(
Avx2
))]
src\runtime\src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\Helpers\TeddyHelper.cs (13)
49
[CompExactlyDependsOn(typeof(
Avx2
))]
164
[CompExactlyDependsOn(typeof(
Avx2
))]
255
[CompExactlyDependsOn(typeof(
Avx2
))]
261
Vector256<byte> packed =
Avx2
.PackUnsignedSaturate(source0.AsInt16(), source1.AsInt16());
337
[CompExactlyDependsOn(typeof(
Avx2
))]
340
return
Avx2
.Shuffle(maskLow, low) &
Avx2
.Shuffle(maskHigh, high);
427
[CompExactlyDependsOn(typeof(
Avx2
))]
449
Vector256<byte> leftShifted =
Avx2
.Permute2x128(left, right, (1 << 0) + (2 << 4));
450
return
Avx2
.AlignRight(right, leftShifted, 15);
454
[CompExactlyDependsOn(typeof(
Avx2
))]
458
Vector256<byte> leftShifted =
Avx2
.Permute2x128(left, right, (1 << 0) + (2 << 4));
459
return
Avx2
.AlignRight(right, leftShifted, 14);
src\runtime\src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\SingleStringSearchValuesPackedThreeChars.cs (4)
138
else if (Vector256.IsHardwareAccelerated &&
Avx2
.IsSupported && searchSpaceMinusValueTailLength - Vector256<byte>.Count >= 0)
281
[CompExactlyDependsOn(typeof(
Avx2
))]
404
[CompExactlyDependsOn(typeof(
Avx2
))]
406
Avx2
.PackUnsignedSaturate(
src\runtime\src\libraries\System.Private.CoreLib\src\System\SpanHelpers.Byte.cs (5)
1344
else if (
Avx2
.IsSupported && remainder >= (nint)(Vector256<byte>.Count * 1.5))
1376
tempFirst =
Avx2
.Shuffle(tempFirst, reverseMask);
1377
tempFirst =
Avx2
.Permute2x128(tempFirst, tempFirst, 0b00_01);
1378
tempLast =
Avx2
.Shuffle(tempLast, reverseMask);
1379
tempLast =
Avx2
.Permute2x128(tempLast, tempLast, 0b00_01);
src\runtime\src\libraries\System.Private.CoreLib\src\System\SpanHelpers.Char.cs (5)
930
else if (
Avx2
.IsSupported && remainder >= (nint)(Vector256<ushort>.Count * 1.5))
958
tempFirst =
Avx2
.Shuffle(tempFirst, reverseMask);
959
tempFirst =
Avx2
.Permute2x128(tempFirst, tempFirst, 0b00_01);
960
tempLast =
Avx2
.Shuffle(tempLast, reverseMask);
961
tempLast =
Avx2
.Permute2x128(tempLast, tempLast, 0b00_01);
src\runtime\src\libraries\System.Private.CoreLib\src\System\SpanHelpers.cs (6)
125
else if (
Avx2
.IsSupported && remainder >= Vector256<int>.Count * 2)
142
tempFirst =
Avx2
.PermuteVar8x32(tempFirst, Vector256.Create(7, 6, 5, 4, 3, 2, 1, 0));
143
tempLast =
Avx2
.PermuteVar8x32(tempLast, Vector256.Create(7, 6, 5, 4, 3, 2, 1, 0));
230
else if (
Avx2
.IsSupported && remainder >= Vector256<long>.Count * 2)
247
tempFirst =
Avx2
.Permute4x64(tempFirst, 0b00_01_10_11);
248
tempLast =
Avx2
.Permute4x64(tempLast, 0b00_01_10_11);
src\runtime\src\libraries\System.Private.CoreLib\src\System\SpanHelpers.Packed.cs (18)
198
else if (
Avx2
.IsSupported && length > Vector256<short>.Count)
259
if (!
Avx2
.IsSupported && length > 2 * Vector128<short>.Count)
397
else if (
Avx2
.IsSupported && length > Vector256<short>.Count)
460
if (!
Avx2
.IsSupported && length > 2 * Vector128<short>.Count)
609
else if (
Avx2
.IsSupported && length > Vector256<short>.Count)
674
if (!
Avx2
.IsSupported && length > 2 * Vector128<short>.Count)
825
else if (
Avx2
.IsSupported && length > Vector256<short>.Count)
892
if (!
Avx2
.IsSupported && length > 2 * Vector128<short>.Count)
1022
else if (
Avx2
.IsSupported && length > Vector256<short>.Count)
1087
if (!
Avx2
.IsSupported && length > 2 * Vector128<short>.Count)
1154
[CompExactlyDependsOn(typeof(
Avx2
))]
1157
Debug.Assert(
Avx2
.IsSupported);
1162
return
Avx2
.PackUnsignedSaturate(source0, source1).AsByte();
1238
[CompExactlyDependsOn(typeof(
Avx2
))]
1270
[CompExactlyDependsOn(typeof(
Avx2
))]
1300
[CompExactlyDependsOn(typeof(
Avx2
))]
1303
Debug.Assert(
Avx2
.IsSupported);
1308
return
Avx2
.Permute4x64(result.AsInt64(), 0b_11_01_10_00).AsByte();
src\runtime\src\libraries\System.Private.CoreLib\src\System\String.Manipulation.cs (1)
2228
if (
Avx2
.IsSupported && PackedSpanHelpers.CanUsePackedIndexOf(c) && PackedSpanHelpers.CanUsePackedIndexOf(c2) && PackedSpanHelpers.CanUsePackedIndexOf(c3))
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Ascii.Utility.cs (2)
1698
return
Avx2
.IsSupported
1699
? PackedSpanHelpers.FixUpPackedVector256Result(
Avx2
.PackUnsignedSaturate(vectorFirst.AsInt16(), vectorSecond.AsInt16()))
System.Runtime.Intrinsics (1)
src\runtime\artifacts\obj\System.Runtime.Intrinsics\Release\net11.0\System.Runtime.Intrinsics.Forwards.cs (1)
32
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.Intrinsics.X86.
Avx2
))]