46 references to AsByte
System.Collections (3)
System\Collections\BitArray.cs (3)
8430x06060606_06060606, 0x07070707_07070707).AsByte(); 868Vector256<byte> bitMask = Vector256.Create(0x80402010_08040201).AsByte(); 878Vector256<byte> shuffled = Avx2.Shuffle(scalar.AsByte(), shuffleMask);
System.Numerics.Tensors (11)
System\Numerics\Tensors\netcore\TensorPrimitives.IndexOfMax.cs (5)
457Vector256.LessThan(indices1.AsByte(), indices2.AsByte()).As<byte, T>(); 494if (sizeof(T) == 1) return Avx2.BlendVariable(left.AsByte(), right.AsByte(), (~mask).AsByte()).As<byte, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.LeadingZeroCount.cs (2)
99Vector256<byte> lowNibble = x.AsByte() & nibbleMask; 100Vector256<byte> highNibble = Avx2.ShiftRightLogical(x.AsInt32(), 4).AsByte() & nibbleMask;
System\Numerics\Tensors\netcore\TensorPrimitives.PopCount.cs (4)
148Vector256<byte> tmp = x.AsByte(); 149tmp -= (x.AsUInt16() >> 1).AsByte() & c1; 150tmp = (tmp & c2) + ((tmp.AsUInt16() >> 2).AsByte() & c2); 151return ((tmp + (tmp.AsUInt16() >> 4).AsByte()) & c3).As<byte, T>();
System.Private.CoreLib (32)
src\libraries\System.Private.CoreLib\src\System\Buffers\Binary\BinaryPrimitives.ReverseEndianness.cs (2)
268Vector256.Shuffle(vector.AsByte(), Vector256.Create((byte)3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12, 19, 18, 17, 16, 23, 22, 21, 20, 27, 26, 25, 24, 31, 30, 29, 28)).AsInt32(); 282Vector256.Shuffle(vector.AsByte(), Vector256.Create((byte)7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8, 23, 22, 21, 20, 19, 18, 17, 16, 31, 30, 29, 28, 27, 26, 25, 24)).AsInt64();
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Helper\Base64DecoderHelper.cs (2)
787Vector256<short> merge_ab_and_bc = Avx2.MultiplyAddAdjacent(str.AsByte(), mergeConstant0); 810Avx.Store(dest, str.AsByte());
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Helper\Base64EncoderHelper.cs (3)
357Vector256<byte> indices = Avx2.SubtractSaturate(str.AsByte(), const51); 368encoder.StoreVector256ToDestination(dest, destStart, destLength, str.AsByte()); 743Avx.Store(dest, str.AsByte());
src\libraries\System.Private.CoreLib\src\System\Globalization\Ordinal.cs (1)
472Vector256<byte> cmpAnd = (cmpCh1 & cmpCh2).AsByte();
src\libraries\System.Private.CoreLib\src\System\SearchValues\IndexOfAnyAsciiSearcher.cs (3)
1198Vector256<byte> bitPositions = Avx2.Shuffle(Vector256.Create(0x8040201008040201).AsByte(), highNibbles); 1241Vector256<byte> bitmask = Avx2.Shuffle(Vector256.Create(0x8040201008040201).AsByte(), highNibbles); 1243Vector256<byte> mask = Vector256.GreaterThan(highNibbles.AsSByte(), Vector256.Create((sbyte)0x7)).AsByte();
src\libraries\System.Private.CoreLib\src\System\SearchValues\ProbabilisticMap.cs (6)
148Vector256<byte> sourceLower = Avx512Vbmi.VL.PermuteVar32x8x2(source0.AsByte(), Vector256.CreateSequence<byte>(0, 2), source1.AsByte()); 149Vector256<byte> sourceUpper = Avx512Vbmi.VL.PermuteVar32x8x2(source0.AsByte(), Vector256.CreateSequence<byte>(1, 2), source1.AsByte()); 167Vector256<byte> bitPositions = Avx512Vbmi.VL.PermuteVar32x8(Vector256.Create(0x8040201008040201).AsByte(), shifted); 203Vector256<byte> bitPositions = Avx2.Shuffle(Vector256.Create(0x8040201008040201).AsByte(), shifted);
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\Helpers\StringSearchValuesHelper.cs (1)
358Vector256<byte> matches = Vector256.LessThan((input - subtraction).AsSByte(), comparison.AsSByte()).AsByte();
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\SingleStringSearchValuesThreeChars.cs (2)
290return (cmpCh1 & cmpCh2 & cmpCh3).AsByte(); 299return (cmpCh1 & cmpCh2 & cmpCh3).AsByte();
src\libraries\System.Private.CoreLib\src\System\SpanHelpers.Byte.cs (2)
150Vector256<byte> cmpAnd = (cmpCh1 & cmpCh2).AsByte(); 363Vector256<byte> cmpAnd = (cmpCh1 & cmpCh2).AsByte();
src\libraries\System.Private.CoreLib\src\System\SpanHelpers.Char.cs (5)
160Vector256<byte> cmpAnd = (cmpCh1 & cmpCh2).AsByte(); 382Vector256<byte> cmpAnd = (cmpCh1 & cmpCh2).AsByte(); 628uint matches = Vector256.Equals(Vector256<ushort>.Zero, search).AsByte().ExtractMostSignificantBits(); 680uint matches = Vector256.Equals(Vector256<ushort>.Zero, search).AsByte().ExtractMostSignificantBits(); 766uint matches = Vector256.Equals(Vector256<ushort>.Zero, search).AsByte().ExtractMostSignificantBits();
src\libraries\System.Private.CoreLib\src\System\SpanHelpers.Packed.cs (2)
1162return Avx2.PackUnsignedSaturate(source0, source1).AsByte(); 1308return Avx2.Permute4x64(result.AsInt64(), 0b_11_01_10_00).AsByte();
src\libraries\System.Private.CoreLib\src\System\String.Manipulation.cs (1)
2084Vector256<byte> cmp = (v1Eq | v2Eq | v3Eq).AsByte();
src\libraries\System.Private.CoreLib\src\System\Text\Ascii.Utility.cs (2)
1640Avx.IsSupported ? (vector.AsByte() & Vector256.Create((byte)0x80)) == Vector256<byte>.Zero: 1641vector.AsByte().ExtractMostSignificantBits() == 0;