49 references to ToScalar
Microsoft.ML.CpuMath (20)
AvxIntrinsics.cs (10)
1058return Sse.AddScalar(result.GetLower(), GetHigh(result)).ToScalar(); 1102return Sse.AddScalar(result128, resultPadded).ToScalar(); 1150return Sse.AddScalar(result128, resultPadded).ToScalar(); 1194return Sse.AddScalar(result128, resultPadded).ToScalar(); 1243return Sse.AddScalar(result128, resultPadded).ToScalar(); 1287return Sse.MaxScalar(result128, resultPadded).ToScalar(); 1336return Sse.MaxScalar(result128, resultPadded).ToScalar(); 1390return Sse.AddScalar(result128, resultPadded).ToScalar(); 1447return Sse.AddScalar(result128, resultPadded).ToScalar(); 1491float norm = Sse.AddScalar(sqDistanceVector128, sqDistanceVectorPadded).ToScalar();
SseIntrinsics.cs (10)
875return result.ToScalar(); 906return result.ToScalar(); 940return result.ToScalar(); 971return result.ToScalar(); 1005return result.ToScalar(); 1036return result.ToScalar(); 1070return result.ToScalar(); 1111return result.ToScalar(); 1155return result.ToScalar(); 1185float norm = sqDistanceVector.ToScalar();
System.Numerics.Tensors (5)
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IBinaryOperator.cs (1)
2765return x.ToScalar();
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IIndexOfOperator.cs (4)
35return (int)resultIndex.As<T, long>().ToScalar(); 51return resultIndex.As<T, int>().ToScalar(); 72return resultIndex.As<T, short>().ToScalar(); 98return resultIndex.As<T, byte>().ToScalar();
System.Private.CoreLib (24)
src\libraries\Common\src\System\HexConverter.cs (1)
334Unsafe.WriteUnaligned(ref Unsafe.Add(ref destRef, offset / 2), output.AsUInt64().ToScalar());
src\libraries\System.Private.CoreLib\src\System\Math.cs (1)
356return Vector128.ConditionalSelect(Vector128.CreateScalarUnsafe(-0.0), Vector128.CreateScalarUnsafe(y), Vector128.CreateScalarUnsafe(x)).ToScalar();
src\libraries\System.Private.CoreLib\src\System\MathF.cs (1)
121return Vector128.ConditionalSelect(Vector128.CreateScalarUnsafe(-0.0f), Vector128.CreateScalarUnsafe(y), Vector128.CreateScalarUnsafe(x)).ToScalar();
src\libraries\System.Private.CoreLib\src\System\Numerics\Vector2.cs (1)
447return (mul - Vector128.Shuffle(mul, Vector128.Create(1, 0, 1, 0))).ToScalar();
src\libraries\System.Private.CoreLib\src\System\Numerics\Vector2.Extensions.cs (1)
102public static float ToScalar(this Vector2 vector) => vector.AsVector128Unsafe().ToScalar();
src\libraries\System.Private.CoreLib\src\System\Numerics\Vector3.Extensions.cs (1)
97public static float ToScalar(this Vector3 vector) => vector.AsVector128Unsafe().ToScalar();
src\libraries\System.Private.CoreLib\src\System\Numerics\Vector4.Extensions.cs (2)
77/// <inheritdoc cref="Vector128.ToScalar{T}(Vector128{T})" /> 79public static float ToScalar(this Vector4 vector) => vector.AsVector128().ToScalar();
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector128.cs (1)
3856Unsafe.WriteUnaligned(ref address, source.AsDouble().ToScalar());
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector128_1.cs (1)
864static T ISimdVector<Vector128<T>, T>.ToScalar(Vector128<T> vector) => vector.ToScalar();
src\libraries\System.Private.CoreLib\src\System\Text\Ascii.CaseConversion.cs (3)
357Unsafe.WriteUnaligned(&pDest[i], narrowedBlock.ToScalar()); 411Unsafe.WriteUnaligned(&pDest[i], widenedBlock.ToScalar()); 417Unsafe.WriteUnaligned(&pDest[i], narrowedBlock.ToScalar());
src\libraries\System.Private.CoreLib\src\System\Text\Ascii.Utility.cs (8)
79ulong mask = extractedBits.AsUInt64().ToScalar(); 1151ulong asciiCompareMask = AdvSimd.Arm64.UnzipOdd(compareResult, compareResult).AsUInt64().ToScalar(); 1536return (maxBytes.AsUInt64().ToScalar() & 0x8080808080808080) != 0; 1568return (maxChars.AsUInt64().ToScalar() & 0xFF80FF80FF80FF80) != 0; 1619AdvSimd.Arm64.IsSupported ? AllBytesInUInt64AreAscii(AdvSimd.Arm64.MaxPairwise(vector.AsByte(), vector.AsByte()).AsUInt64().ToScalar()) : 1625AdvSimd.Arm64.IsSupported ? AllCharsInUInt64AreAscii(AdvSimd.Arm64.MaxPairwise(vector.AsUInt16(), vector.AsUInt16()).AsUInt64().ToScalar()) : 2282Unsafe.WriteUnaligned(ref Unsafe.As<char, byte>(ref outputBuffer), vecWide.ToScalar()); 2288Unsafe.WriteUnaligned(ref Unsafe.As<char, byte>(ref outputBuffer), vecWide.ToScalar());
src\libraries\System.Private.CoreLib\src\System\Text\Unicode\Utf8Utility.Transcoding.cs (2)
964bool hasNonAsciiDataInVector = AdvSimd.Arm64.MinPairwise(isUtf16DataNonAscii, isUtf16DataNonAscii).AsUInt64().ToScalar() != 0; 1040possibleNonAsciiQWord = utf16Data.AsUInt64().ToScalar();
src\libraries\System.Private.CoreLib\src\System\Text\Unicode\Utf8Utility.Validation.cs (1)
763return extractedBits.AsUInt64().ToScalar();