59 references to AsSingle
Microsoft.ML.CpuMath (1)
SseIntrinsics.cs (1)
67
Vector128.Create(0x7FFFFFFF).
AsSingle
() :
System.Numerics.Tensors (56)
System\Numerics\Tensors\netcore\TensorPrimitives.Cbrt.cs (1)
37
return ExpOperator<float>.Invoke(LogOperator<float>.Invoke(x.
AsSingle
()) / Vector128.Create(3f)).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Ceiling.cs (1)
35
return Vector128.Ceiling(x.
AsSingle
()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.ConvertHelpers.cs (5)
439
Vector128<uint> absoluteValue = (bitValueInProcess.
AsSingle
() - maskedExponentLowerBound.
AsSingle
()).AsUInt32();
442
return (absoluteValue | sign).
AsSingle
();
598
Vector128<uint> exponentOffset0 = Vector128.Max(value, Vector128.Create(MinExp).
AsSingle
()).AsUInt32();
607
value += exponentOffset0.
AsSingle
();
System\Numerics\Tensors\netcore\TensorPrimitives.ConvertToInteger.cs (2)
44
if (typeof(TTo) == typeof(int)) return Vector128.ConvertToInt32(x.
AsSingle
()).As<int, TTo>();
45
if (typeof(TTo) == typeof(uint)) return Vector128.ConvertToUInt32(x.
AsSingle
()).As<uint, TTo>();
System\Numerics\Tensors\netcore\TensorPrimitives.ConvertToIntegerNative.cs (2)
44
if (typeof(TTo) == typeof(int)) return Vector128.ConvertToInt32Native(x.
AsSingle
()).As<int, TTo>();
45
if (typeof(TTo) == typeof(uint)) return Vector128.ConvertToUInt32Native(x.
AsSingle
()).As<uint, TTo>();
System\Numerics\Tensors\netcore\TensorPrimitives.Cos.cs (1)
78
return Vector128.Cos(x.
AsSingle
()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Cosh.cs (1)
77
Vector128<float> x = t.
AsSingle
();
System\Numerics\Tensors\netcore\TensorPrimitives.CosPi.cs (1)
49
return ApplyScalar<CosPiOperator<float>>(x.
AsSingle
()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.DegreesToRadians.cs (1)
42
return Vector128.DegreesToRadians(x.
AsSingle
()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Exp.cs (1)
52
return Vector128.Exp(x.
AsSingle
()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Floor.cs (1)
35
return Vector128.Floor(x.
AsSingle
()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.FusedMultiplyAdd.cs (3)
111
return Vector128.FusedMultiplyAdd(x.
AsSingle
(), y.
AsSingle
(), z.
AsSingle
()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Hypot.cs (2)
46
return Vector128.Hypot(x.
AsSingle
(), y.
AsSingle
()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.IndexOfMax.cs (3)
474
if (typeof(T) == typeof(float)) return Sse41.BlendVariable(left.
AsSingle
(), right.
AsSingle
(), (~mask).
AsSingle
()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Lerp.cs (3)
90
return Vector128.Lerp(x.
AsSingle
(), y.
AsSingle
(), amount.
AsSingle
()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Log.cs (1)
94
return Vector128.Log(x.
AsSingle
()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Log2.cs (1)
54
return Vector128.Log2(x.
AsSingle
()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.MultiplyAddEstimate.cs (3)
133
return Vector128.MultiplyAddEstimate(x.
AsSingle
(), y.
AsSingle
(), z.
AsSingle
()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Pow.cs (2)
70
return ExpOperator<float>.Invoke(y.
AsSingle
() * LogOperator<float>.Invoke(x.
AsSingle
())).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.RadiansToDegrees.cs (1)
42
return Vector128.RadiansToDegrees(x.
AsSingle
()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Reciprocal.cs (6)
101
if (typeof(T) == typeof(float)) return Avx512F.VL.Reciprocal14(x.
AsSingle
()).As<float, T>();
108
if (typeof(T) == typeof(float)) return Sse.Reciprocal(x.
AsSingle
()).As<float, T>();
113
if (typeof(T) == typeof(float)) return AdvSimd.ReciprocalEstimate(x.
AsSingle
()).As<float, T>();
167
if (typeof(T) == typeof(float)) return Avx512F.VL.ReciprocalSqrt14(x.
AsSingle
()).As<float, T>();
174
if (typeof(T) == typeof(float)) return Sse.ReciprocalSqrt(x.
AsSingle
()).As<float, T>();
179
if (typeof(T) == typeof(float)) return AdvSimd.ReciprocalSquareRootEstimate(x.
AsSingle
()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Remainder.cs (1)
77
typeof(T) == typeof(float) ? x - (TruncateOperator<float>.Invoke((x / y).
AsSingle
()).As<float, T>() * y) :
System\Numerics\Tensors\netcore\TensorPrimitives.RootN.cs (1)
39
return ExpOperator<float>.Invoke(LogOperator<float>.Invoke(x.
AsSingle
()) / Vector128.Create((float)_n)).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Round.cs (4)
189
return Vector128.Round(x.
AsSingle
()).As<float, T>();
250
return AdvSimd.RoundAwayFromZero(x.
AsSingle
()).As<float, T>();
253
return TruncateOperator<float>.Invoke(x.
AsSingle
() + CopySignOperator<float>.Invoke(Vector128.Create(0.49999997f), x.
AsSingle
())).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Sin.cs (1)
68
return Vector128.Sin(x.
AsSingle
()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Sinh.cs (1)
59
Vector128<float> x = t.
AsSingle
();
System\Numerics\Tensors\netcore\TensorPrimitives.SinPi.cs (1)
49
return ApplyScalar<SinPiOperator<float>>(x.
AsSingle
()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Tan.cs (3)
65
return TanOperatorSingle.Invoke(x.
AsSingle
()).As<float, T>();
150
Vector128<float> result = (poly.AsUInt32() ^ (x.AsUInt32() & Vector128.Create(~SignMask))).
AsSingle
();
151
return Vector128.ConditionalSelect(Vector128.Equals(odd, Vector128<uint>.Zero).
AsSingle
(),
System\Numerics\Tensors\netcore\TensorPrimitives.Tanh.cs (1)
67
Vector128<float> x = t.
AsSingle
();
System\Numerics\Tensors\netcore\TensorPrimitives.Truncate.cs (1)
43
return Vector128.Truncate(x.
AsSingle
()).As<float, T>();
System.Private.CoreLib (2)
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector128.cs (2)
1859
return VectorMath.IsEvenIntegerSingle<Vector128<float>, Vector128<uint>>(vector.
AsSingle
()).As<float, T>();
1986
return VectorMath.IsOddIntegerSingle<Vector128<float>, Vector128<uint>>(vector.
AsSingle
()).As<float, T>();