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