5 types derived from Avx2
System.Private.CoreLib (5)
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\X86\Avx10v1.cs (1)
12public abstract class Avx10v1 : Avx2
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\X86\Avx512F.cs (1)
12public abstract class Avx512F : Avx2
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\X86\AvxVnni.cs (1)
11public abstract class AvxVnni : Avx2
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\X86\AvxVnniInt16.cs (1)
11public abstract class AvxVnniInt16 : Avx2
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\X86\AvxVnniInt8.cs (1)
12public abstract class AvxVnniInt8 : Avx2
183 references to Avx2
GenerateDocumentationAndConfigFiles (2)
src\Compilers\Core\Portable\Hashing\XxHashShared.cs (2)
682Vector256<ulong> product = Avx2.IsSupported ? 683Avx2.Multiply(sourceKey, sourceKeyLow) :
Microsoft.CodeAnalysis (2)
Hashing\XxHashShared.cs (2)
682Vector256<ulong> product = Avx2.IsSupported ? 683Avx2.Multiply(sourceKey, sourceKeyLow) :
Microsoft.CodeAnalysis.Workspaces (2)
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 (2)
System\IO\Hashing\XxHashShared.cs (2)
673Vector256<ulong> product = Avx2.IsSupported ? 674Avx2.Multiply(sourceKey, sourceKeyLow) :
System.Numerics.Tensors (15)
System\Numerics\Tensors\netcore\TensorPrimitives.IndexOfMax.cs (7)
489if (Avx2.IsSupported) 491if (typeof(T) == typeof(float)) return Avx2.BlendVariable(left.AsSingle(), right.AsSingle(), (~mask).AsSingle()).As<float, T>(); 492if (typeof(T) == typeof(double)) return Avx2.BlendVariable(left.AsDouble(), right.AsDouble(), (~mask).AsDouble()).As<double, T>(); 494if (sizeof(T) == 1) return Avx2.BlendVariable(left.AsByte(), right.AsByte(), (~mask).AsByte()).As<byte, T>(); 495if (sizeof(T) == 2) return Avx2.BlendVariable(left.AsUInt16(), right.AsUInt16(), (~mask).AsUInt16()).As<ushort, T>(); 496if (sizeof(T) == 4) return Avx2.BlendVariable(left.AsUInt32(), right.AsUInt32(), (~mask).AsUInt32()).As<uint, T>(); 497if (sizeof(T) == 8) return Avx2.BlendVariable(left.AsUInt64(), right.AsUInt64(), (~mask).AsUInt64()).As<ulong, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.LeadingZeroCount.cs (8)
100Vector256<byte> highNibble = Avx2.ShiftRightLogical(x.AsInt32(), 4).AsByte() & nibbleMask; 101Vector256<byte> nibbleSelectMask = Avx2.CompareEqual(highNibble, Vector256<byte>.Zero); 102Vector256<byte> indexVector = Avx2.BlendVariable(highNibble, lowNibble, nibbleSelectMask) + 112Vector256<uint> x_bot16 = Avx2.Or(Avx2.ShiftLeftLogical(x.AsUInt32(), 16), lowHalf); 113Vector256<uint> x_top16 = Avx2.Or(x.AsUInt32(), lowHalf); 116Vector256<uint> lz_top16_shift = Avx2.ShiftLeftLogical(lz_top16, 16); 117return Avx2.Or(lz_bot16, lz_top16_shift).AsUInt16().As<ushort, T>();
System.Private.CoreLib (155)
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Helper\Base64DecoderHelper.cs (17)
64if (Avx2.IsSupported && (end >= src)) 717[CompExactlyDependsOn(typeof(Avx2))] 774Vector256<sbyte> hiNibbles = Avx2.And(Avx2.ShiftRightLogical(str.AsInt32(), 4).AsSByte(), maskSlashOrUnderscore); 787Vector256<short> merge_ab_and_bc = Avx2.MultiplyAddAdjacent(str.AsByte(), mergeConstant0); 793Vector256<int> output = Avx2.MultiplyAddAdjacent(merge_ab_and_bc, mergeConstant1); 800output = Avx2.Shuffle(output.AsSByte(), packBytesInLaneMask).AsInt32(); 807str = Avx2.PermuteVar8x32(output, packLanesControl).AsSByte(); 1316[CompExactlyDependsOn(typeof(Avx2))] 1328Vector256<sbyte> loNibbles = Avx2.And(str, maskSlashOrUnderscore); 1329Vector256<sbyte> hi = Avx2.Shuffle(lutHigh, hiNibbles); 1330Vector256<sbyte> lo = Avx2.Shuffle(lutLow, loNibbles); 1338Vector256<sbyte> eq2F = Avx2.CompareEqual(str, maskSlashOrUnderscore); 1339Vector256<sbyte> shift = Avx2.Shuffle(lutShift, Avx2.Add(eq2F, hiNibbles)); 1341result = Avx2.Add(str, shift); 1356[CompExactlyDependsOn(typeof(Avx2))]
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Helper\Base64EncoderHelper.cs (15)
53if (Avx2.IsSupported && (end >= src)) 213[CompExactlyDependsOn(typeof(Avx2))] 267str = Avx2.PermuteVar8x32(str.AsInt32(), Vector256.Create( 283str = Avx2.Shuffle(str, shuffleVec); 294Vector256<sbyte> t0 = Avx2.And(str, maskAC); 305Vector256<sbyte> t2 = Avx2.And(str, maskBB); 315Vector256<ushort> t1 = Avx2.MultiplyHigh(t0.AsUInt16(), shiftAC); 325Vector256<short> t3 = Avx2.MultiplyLow(t2.AsInt16(), shiftBB); 335str = Avx2.Or(t1.AsSByte(), t3.AsSByte()); 357Vector256<byte> indices = Avx2.SubtractSaturate(str.AsByte(), const51); 360Vector256<sbyte> mask = Avx2.CompareGreaterThan(str, const25); 363Vector256<sbyte> tmp = Avx2.Subtract(indices.AsSByte(), mask); 366str = Avx2.Add(str, Avx2.Shuffle(lut, tmp)); 738[CompExactlyDependsOn(typeof(Avx2))]
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Url\Base64UrlDecoder.cs (7)
534[CompExactlyDependsOn(typeof(Avx2))] 546Vector256<sbyte> lowerBound = Avx2.Shuffle(lutLow, hiNibbles); 547Vector256<sbyte> upperBound = Avx2.Shuffle(lutHigh, hiNibbles); 562Vector256<sbyte> shift = Avx2.Shuffle(lutShift, hiNibbles); 575[CompExactlyDependsOn(typeof(Avx2))] 656[CompExactlyDependsOn(typeof(Avx2))] 688[CompExactlyDependsOn(typeof(Avx2))]
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Url\Base64UrlEncoder.cs (1)
293[CompExactlyDependsOn(typeof(Avx2))]
src\libraries\System.Private.CoreLib\src\System\Collections\BitArray.cs (4)
765else if (Avx2.IsSupported && (uint)_bitLength >= Vector256<byte>.Count) 777Vector256<byte> shuffled = Avx2.Shuffle(scalar.AsByte(), shuffleMask); 778Vector256<byte> extracted = Avx2.And(shuffled, bitMask); 782Vector256<byte> normalized = Avx2.Min(extracted, ones);
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector128.cs (4)
387if (Avx2.IsSupported) 390lowerBits = Avx2.Blend(lowerBits, Create(0x43300000_00000000).AsInt32(), 0b1010); // Blend the 32 lowest significant bits of vector with the bit representation of double(2^52) 428if (Avx2.IsSupported) 431lowerBits = 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\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector256.cs (11)
422if (Avx2.IsSupported) 430lowerBits = Avx2.Blend(lowerBits, Create(0x43300000_00000000).AsInt32(), 0b10101010); // Blend the 32 lowest significant bits of vector with the bit representation of double(2^52) 432Vector256<long> upperBits = Avx2.ShiftRightLogical(vector, 32); // Extract the 32 most significant bits of vector 433upperBits = Avx2.Xor(upperBits, Create(0x45300000_80000000)); // Flip the msb of upperBits and blend with the bit representation of double(2^84 + 2^63) 455if (Avx2.IsSupported) 463lowerBits = Avx2.Blend(lowerBits, Create(0x43300000_00000000UL).AsUInt32(), 0b10101010); // Blend the 32 lowest significant bits of vector with the bit representation of double(2^52) */ 465Vector256<ulong> upperBits = Avx2.ShiftRightLogical(vector, 32); // Extract the 32 most significant bits of vector 466upperBits = Avx2.Xor(upperBits, Create(0x45300000_00000000UL)); // Blend upperBits with the bit representation of double(2^84) 553if (Avx2.IsSupported) 560Vector256<int> lowerBits = Avx2.And(vector, Create(0x0000FFFFU)).AsInt32(); 561Vector256<int> upperBits = Avx2.ShiftRightLogical(vector, 16).AsInt32();
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\X86\Avx10v1.cs (1)
3852public new abstract class X64 : Avx2.X64
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\X86\Avx512F.cs (1)
2247public new abstract class X64 : Avx2.X64
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\X86\AvxVnni.cs (1)
22public new abstract class X64 : Avx2.X64
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\X86\AvxVnniInt16.cs (1)
22public new abstract class X64 : Avx2.X64
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\X86\AvxVnniInt8.cs (1)
23public new abstract class X64 : Avx2.X64
src\libraries\System.Private.CoreLib\src\System\SearchValues\IndexOfAnyAsciiSearcher.cs (29)
312if (Avx2.IsSupported && searchSpaceLength > 2 * Vector128<short>.Count) 369if (!Avx2.IsSupported && searchSpaceLength > 2 * Vector128<short>.Count) 444if (Avx2.IsSupported && searchSpaceLength > 2 * Vector128<short>.Count) 500if (!Avx2.IsSupported && searchSpaceLength > 2 * Vector128<short>.Count) 597if (Avx2.IsSupported && searchSpaceLength > Vector128<byte>.Count) 651if (!Avx2.IsSupported && searchSpaceLength > Vector128<byte>.Count) 722if (Avx2.IsSupported && searchSpaceLength > Vector128<byte>.Count) 776if (!Avx2.IsSupported && searchSpaceLength > Vector128<byte>.Count) 868if (Avx2.IsSupported && searchSpaceLength > Vector128<byte>.Count) 925if (!Avx2.IsSupported && searchSpaceLength > Vector128<byte>.Count) 996if (Avx2.IsSupported && searchSpaceLength > Vector128<byte>.Count) 1053if (!Avx2.IsSupported && searchSpaceLength > Vector128<byte>.Count) 1170[CompExactlyDependsOn(typeof(Avx2))] 1184[CompExactlyDependsOn(typeof(Avx2))] 1191Vector256<byte> values = Avx2.Shuffle(bitmapLookup, source); 1197Vector256<byte> bitMask = Avx2.Shuffle(bitmapLookup, source); 1198Vector256<byte> bitPositions = Avx2.Shuffle(Vector256.Create(0x8040201008040201).AsByte(), highNibbles); 1229[CompExactlyDependsOn(typeof(Avx2))] 1238Vector256<byte> row0 = Avx2.Shuffle(bitmapLookup0, lowNibbles); 1239Vector256<byte> row1 = Avx2.Shuffle(bitmapLookup1, lowNibbles); 1241Vector256<byte> bitmask = Avx2.Shuffle(Vector256.Create(0x8040201008040201).AsByte(), highNibbles); 1276[CompExactlyDependsOn(typeof(Avx2))] 1292[CompExactlyDependsOn(typeof(Avx2))] 1388[CompExactlyDependsOn(typeof(Avx2))] 1392return Avx2.PackUnsignedSaturate( 1426[CompExactlyDependsOn(typeof(Avx2))] 1430return Avx2.PackUnsignedSaturate(lower.AsInt16(), upper.AsInt16()); 1476[CompExactlyDependsOn(typeof(Avx2))] 1505[CompExactlyDependsOn(typeof(Avx2))]
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)); 517if (Avx2.IsSupported && searchSpaceLength >= 32) 694if (Avx2.IsSupported && searchSpaceLength >= 32)
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\AsciiStringSearchValuesTeddyBase.cs (4)
162if (Avx2.IsSupported && span.Length >= CharsPerIterationAvx2 + MatchStartOffsetN2) 182if (Avx2.IsSupported && span.Length >= CharsPerIterationAvx2 + MatchStartOffsetN3) 247[CompExactlyDependsOn(typeof(Avx2))] 424[CompExactlyDependsOn(typeof(Avx2))]
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\Helpers\TeddyHelper.cs (13)
47[CompExactlyDependsOn(typeof(Avx2))] 161[CompExactlyDependsOn(typeof(Avx2))] 239[CompExactlyDependsOn(typeof(Avx2))] 245Vector256<byte> packed = Avx2.PackUnsignedSaturate(source0.AsInt16(), source1.AsInt16()); 313[CompExactlyDependsOn(typeof(Avx2))] 316return Avx2.Shuffle(maskLow, low) & Avx2.Shuffle(maskHigh, high); 381[CompExactlyDependsOn(typeof(Avx2))] 403Vector256<byte> leftShifted = Avx2.Permute2x128(left, right, (1 << 0) + (2 << 4)); 404return Avx2.AlignRight(right, leftShifted, 15); 408[CompExactlyDependsOn(typeof(Avx2))] 412Vector256<byte> leftShifted = Avx2.Permute2x128(left, right, (1 << 0) + (2 << 4)); 413return Avx2.AlignRight(right, leftShifted, 14);
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\libraries\System.Private.CoreLib\src\System\SpanHelpers.Char.cs (5)
929else if (Avx2.IsSupported && remainder >= (nint)(Vector256<ushort>.Count * 1.5)) 957tempFirst = Avx2.Shuffle(tempFirst, reverseMask); 958tempFirst = Avx2.Permute2x128(tempFirst, tempFirst, 0b00_01); 959tempLast = Avx2.Shuffle(tempLast, reverseMask); 960tempLast = Avx2.Permute2x128(tempLast, tempLast, 0b00_01);
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\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\libraries\System.Private.CoreLib\src\System\Text\Ascii.Utility.cs (2)
1693return Avx2.IsSupported 1694? PackedSpanHelpers.FixUpPackedVector256Result(Avx2.PackUnsignedSaturate(vectorFirst.AsInt16(), vectorSecond.AsInt16()))
System.Runtime.Intrinsics (1)
artifacts\obj\System.Runtime.Intrinsics\Debug\net10.0\System.Runtime.Intrinsics.Forwards.cs (1)
28[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.Intrinsics.X86.Avx2))]
Test.Utilities (2)
src\Compilers\Core\Portable\Hashing\XxHashShared.cs (2)
682Vector256<ulong> product = Avx2.IsSupported ? 683Avx2.Multiply(sourceKey, sourceKeyLow) :