56 references to AsUInt16
System.Net.Primitives (2)
System\Net\IPAddress.cs (2)
204Vector128<ushort> ushorts = Vector128.Create(address).AsUInt16(); 360Vector128<ushort> ushorts = Vector128.Create(numbers).AsUInt16();
System.Numerics.Tensors (19)
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IBooleanUnaryOperator.cs (2)
419TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)i)).AsUInt16(), 420TOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)(i + Vector128<T>.Count))).AsUInt16());
System\Numerics\Tensors\netcore\TensorPrimitives.BitDecrement.cs (2)
210Vector128<ushort> bits = x.AsUInt16(); 213Vector128<ushort> isNegative = Vector128.IsNegative(x).AsUInt16();
System\Numerics\Tensors\netcore\TensorPrimitives.BitIncrement.cs (2)
210Vector128<ushort> bits = x.AsUInt16(); 213Vector128<ushort> isNegative = Vector128.IsNegative(x).AsUInt16();
System\Numerics\Tensors\netcore\TensorPrimitives.IndexOfMax.cs (3)
110if (sizeof(T) == 2) return Sse41.BlendVariable(left.AsUInt16(), right.AsUInt16(), (~mask).AsUInt16()).As<ushort, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.LeadingZeroCount.cs (6)
69return (lz_bot16 | lz_top16_shift).AsUInt16().As<ushort, T>(); 86if (sizeof(T) == 2) return AdvSimd.LeadingZeroCount(x.AsUInt16()).As<ushort, T>(); 99v |= (v.AsUInt16() >> 1).AsByte() & Vector128.Create((byte)0x7F); 100v |= (v.AsUInt16() >> 2).AsByte() & Vector128.Create((byte)0x3F); 101v |= (v.AsUInt16() >> 4).AsByte() & Vector128.Create((byte)0x0F); 107Vector128<ushort> v = x.AsUInt16();
System\Numerics\Tensors\netcore\TensorPrimitives.PopCount.cs (4)
101tmp -= (x.AsUInt16() >> 1).AsByte() & c1; 102tmp = (tmp & c2) + ((tmp.AsUInt16() >> 2).AsByte() & c2); 103return ((tmp + (tmp.AsUInt16() >> 4).AsByte()) & c3).As<byte, T>(); 113Vector128<ushort> tmp = x.AsUInt16();
System.Private.CoreLib (35)
src\runtime\src\libraries\Common\src\System\HexConverter.cs (2)
349Vector128<ushort> vec1 = Vector128.LoadUnsafe(ref srcRef, offset).AsUInt16(); 350Vector128<ushort> vec2 = Vector128.LoadUnsafe(ref srcRef, offset + (nuint)Vector128<ushort>.Count).AsUInt16();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Helper\Base64DecoderHelper.cs (2)
1296Vector128<ushort> odds = AdvSimd.Arm64.TransposeOdd(str, Vector128<byte>.Zero).AsUInt16(); 1302Vector128<ushort> u = str.AsUInt16();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Helper\Base64EncoderHelper.cs (9)
462Vector128<ushort> shiftAC = Vector128.Create(0x04000040).AsUInt16(); 501t1 = Sse2.MultiplyHigh(t0.AsUInt16(), shiftAC); 505Vector128<ushort> odd = Vector128.ShiftRightLogical(AdvSimd.Arm64.UnzipOdd(t0.AsUInt16(), t0.AsUInt16()), 6); 506Vector128<ushort> even = Vector128.ShiftRightLogical(AdvSimd.Arm64.UnzipEven(t0.AsUInt16(), t0.AsUInt16()), 10); 512Vector128<ushort> shr6 = Vector128.ShiftRightLogical(t0.AsUInt16(), 6); 513Vector128<ushort> shr10 = Vector128.ShiftRightLogical(t0.AsUInt16(), 10); 514t1 = Vector128.ConditionalSelect(Vector128.Create(0x0000FFFFu).AsUInt16(), shr10, shr6);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector128.cs (1)
4317return AdvSimd.ShiftRightLogicalNarrowingLower(vector.AsUInt16(), 4).AsUInt64().ToScalar();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector64.cs (1)
4440return AdvSimd.ShiftRightLogicalNarrowingLower(vector.ToVector128().AsUInt16(), 4).AsUInt32().ToScalar();
src\runtime\src\libraries\System.Private.CoreLib\src\System\SearchValues\IndexOfAnyAsciiSearcher.cs (2)
1111Vector128<byte> source = TOptimizations.PackSources(source0.AsUInt16(), source1.AsUInt16());
src\runtime\src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\SingleStringSearchValuesThreeChars.cs (4)
259Vector128<ushort> cmpCh2 = Vector128.Equals(ch2, Vector128.LoadUnsafe(ref Unsafe.As<char, byte>(ref searchSpace), ch2ByteOffset).AsUInt16()); 260Vector128<ushort> cmpCh3 = Vector128.Equals(ch3, Vector128.LoadUnsafe(ref Unsafe.As<char, byte>(ref searchSpace), ch3ByteOffset).AsUInt16()); 272Vector128<ushort> cmpCh2 = Vector128.Equals(ch2, Vector128.LoadUnsafe(ref Unsafe.As<char, byte>(ref searchSpace), ch2ByteOffset).AsUInt16() & caseConversion); 273Vector128<ushort> cmpCh3 = Vector128.Equals(ch3, Vector128.LoadUnsafe(ref Unsafe.As<char, byte>(ref searchSpace), ch3ByteOffset).AsUInt16() & caseConversion);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Ascii.CaseConversion.cs (5)
356Vector128<ushort> blockAsVectorOfUInt16 = blockAsVectorOfUInt64.AsUInt16(); 416Vector128<ushort> blockAsVectorOfUInt16 = blockAsVectorOfUInt32.AsUInt16(); 417Vector128<ushort> narrowedBlock = Vector128.Narrow(blockAsVectorOfUInt16, blockAsVectorOfUInt16).AsUInt16(); 494Vector128<byte> narrow = ExtractAsciiVector(vector.AsUInt16(), vector.AsUInt16());
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Ascii.Equality.cs (1)
514return Sse2.UnpackLow(vec, Vector128<byte>.Zero).AsUInt16();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Ascii.Utility.cs (4)
1609: VectorContainsNonAsciiChar(vector.AsUInt16()); 1629AdvSimd.Arm64.IsSupported ? AllCharsInUInt64AreAscii(AdvSimd.Arm64.MaxPairwise(vector.AsUInt16(), vector.AsUInt16()).AsUInt64().ToScalar()) : 1630(vector.AsUInt16() & Vector128.Create((ushort)0xFF80)) == Vector128<ushort>.Zero;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Latin1Utility.cs (4)
806if ((Sse2.MoveMask(Sse2.AddSaturate(utf16VectorFirst.AsUInt16(), latin1MaskForAddSaturate).AsByte()) & NonLatin1DataSeenMask) != 0) 848if ((Sse2.MoveMask(Sse2.AddSaturate(utf16VectorFirst.AsUInt16(), latin1MaskForAddSaturate).AsByte()) & NonLatin1DataSeenMask) != 0) 889if ((Sse2.MoveMask(Sse2.AddSaturate(combinedVector.AsUInt16(), latin1MaskForAddSaturate).AsByte()) & NonLatin1DataSeenMask) != 0) 925if ((Sse2.MoveMask(Sse2.AddSaturate(utf16VectorFirst.AsUInt16(), latin1MaskForAddSaturate).AsByte()) & NonLatin1DataSeenMask) != 0)