55 references to AsSingle
System.Numerics.Tensors (53)
System\Numerics\Tensors\netcore\TensorPrimitives.Cbrt.cs (1)
50
return ExpOperator<float>.Invoke(LogOperator<float>.Invoke(x.
AsSingle
()) / Vector256.Create(3f)).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Ceiling.cs (1)
55
return Vector256.Ceiling(x.
AsSingle
()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.ConvertHelpers.cs (5)
491
Vector256<uint> absoluteValue = (bitValueInProcess.
AsSingle
() - maskedExponentLowerBound.
AsSingle
()).AsUInt32();
494
return (absoluteValue | sign).
AsSingle
();
662
Vector256<uint> exponentOffset0 = Vector256.Max(value, Vector256.Create(MinExp).
AsSingle
()).AsUInt32();
671
value += exponentOffset0.
AsSingle
();
System\Numerics\Tensors\netcore\TensorPrimitives.ConvertToInteger.cs (2)
62
Vector256.ConvertToInt32(x.
AsSingle
()).As<int, TTo>() :
63
Vector256.ConvertToUInt32(x.
AsSingle
()).As<uint, TTo>();
System\Numerics\Tensors\netcore\TensorPrimitives.ConvertToIntegerNative.cs (2)
61
Vector256.ConvertToInt32Native(x.
AsSingle
()).As<int, TTo>() :
62
Vector256.ConvertToUInt32Native(x.
AsSingle
()).As<uint, TTo>();
System\Numerics\Tensors\netcore\TensorPrimitives.Cos.cs (1)
111
return Vector256.Cos(x.
AsSingle
()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Cosh.cs (1)
105
Vector256<float> x = t.
AsSingle
();
System\Numerics\Tensors\netcore\TensorPrimitives.CosPi.cs (1)
79
return ApplyScalar<CosPiOperator<float>>(x.
AsSingle
()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.DegreesToRadians.cs (1)
66
return Vector256.DegreesToRadians(x.
AsSingle
()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Exp.cs (1)
84
return Vector256.Exp(x.
AsSingle
()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Floor.cs (1)
55
return Vector256.Floor(x.
AsSingle
()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.FusedMultiplyAdd.cs (3)
187
return Vector256.FusedMultiplyAdd(x.
AsSingle
(), y.
AsSingle
(), z.
AsSingle
()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Hypot.cs (2)
70
return Vector256.Hypot(x.
AsSingle
(), y.
AsSingle
()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.IndexOfMax.cs (3)
491
if (typeof(T) == typeof(float)) return Avx2.BlendVariable(left.
AsSingle
(), right.
AsSingle
(), (~mask).
AsSingle
()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Lerp.cs (3)
130
return Vector256.Lerp(x.
AsSingle
(), y.
AsSingle
(), amount.
AsSingle
()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Log.cs (1)
140
return Vector256.Log(x.
AsSingle
()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Log2.cs (1)
86
return Vector256.Log2(x.
AsSingle
()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.MultiplyAddEstimate.cs (3)
189
return Vector256.MultiplyAddEstimate(x.
AsSingle
(), y.
AsSingle
(), z.
AsSingle
()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Pow.cs (2)
83
return ExpOperator<float>.Invoke(y.
AsSingle
() * LogOperator<float>.Invoke(x.
AsSingle
())).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.RadiansToDegrees.cs (1)
59
return Vector256.RadiansToDegrees(x.
AsSingle
()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Reciprocal.cs (4)
157
if (typeof(T) == typeof(float)) return Avx512F.VL.Reciprocal14(x.
AsSingle
()).As<float, T>();
164
if (typeof(T) == typeof(float)) return Avx.Reciprocal(x.
AsSingle
()).As<float, T>();
223
if (typeof(T) == typeof(float)) return Avx512F.VL.ReciprocalSqrt14(x.
AsSingle
()).As<float, T>();
230
if (typeof(T) == typeof(float)) return Avx.ReciprocalSqrt(x.
AsSingle
()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Remainder.cs (1)
103
typeof(T) == typeof(float) ? x - (TruncateOperator<float>.Invoke((x / y).
AsSingle
()).As<float, T>() * y) :
System\Numerics\Tensors\netcore\TensorPrimitives.RootN.cs (1)
52
return ExpOperator<float>.Invoke(LogOperator<float>.Invoke(x.
AsSingle
()) / Vector256.Create((float)_n)).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Round.cs (3)
220
return Vector256.Round(x.
AsSingle
()).As<float, T>();
283
return TruncateOperator<float>.Invoke(x.
AsSingle
() + CopySignOperator<float>.Invoke(Vector256.Create(0.49999997f), x.
AsSingle
())).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Sin.cs (1)
100
return Vector256.Sin(x.
AsSingle
()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Sinh.cs (1)
91
Vector256<float> x = t.
AsSingle
();
System\Numerics\Tensors\netcore\TensorPrimitives.SinPi.cs (1)
79
return ApplyScalar<SinPiOperator<float>>(x.
AsSingle
()).As<float, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Tan.cs (3)
85
return TanOperatorSingle.Invoke(x.
AsSingle
()).As<float, T>();
192
Vector256<float> result = (poly.AsUInt32() ^ (x.AsUInt32() & Vector256.Create(~SignMask))).
AsSingle
();
193
return Vector256.ConditionalSelect(Vector256.Equals(odd, Vector256<uint>.Zero).
AsSingle
(),
System\Numerics\Tensors\netcore\TensorPrimitives.Tanh.cs (1)
96
Vector256<float> x = t.
AsSingle
();
System\Numerics\Tensors\netcore\TensorPrimitives.Truncate.cs (1)
86
return Vector256.Truncate(x.
AsSingle
()).As<float, T>();
System.Private.CoreLib (2)
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector256.cs (2)
1975
return VectorMath.IsEvenIntegerSingle<Vector256<float>, Vector256<uint>>(vector.
AsSingle
()).As<float, T>();
2102
return VectorMath.IsOddIntegerSingle<Vector256<float>, Vector256<uint>>(vector.
AsSingle
()).As<float, T>();