14 references to TruncateOperator
System.Numerics.Tensors (14)
System\Numerics\Tensors\netcore\TensorPrimitives.Remainder.cs (6)
98typeof(T) == typeof(float) ? x - (TruncateOperator<float>.Invoke((x / y).AsSingle()).As<float, T>() * y) : 99typeof(T) == typeof(double) ? x - (TruncateOperator<double>.Invoke((x / y).AsDouble()).As<double, T>() * y) : 103typeof(T) == typeof(float) ? x - (TruncateOperator<float>.Invoke((x / y).AsSingle()).As<float, T>() * y) : 104typeof(T) == typeof(double) ? x - (TruncateOperator<double>.Invoke((x / y).AsDouble()).As<double, T>() * y) : 108typeof(T) == typeof(float) ? x - (TruncateOperator<float>.Invoke((x / y).AsSingle()).As<float, T>() * y) : 109typeof(T) == typeof(double) ? x - (TruncateOperator<double>.Invoke((x / y).AsDouble()).As<double, T>() * y) :
System\Numerics\Tensors\netcore\TensorPrimitives.Round.cs (6)
202return TruncateOperator<float>.Invoke(x.AsSingle() + CopySignOperator<float>.Invoke(Vector128.Create(0.49999997f), x.AsSingle())).As<float, T>(); 212return TruncateOperator<double>.Invoke(x.AsDouble() + CopySignOperator<double>.Invoke(Vector128.Create(0.49999999999999994), x.AsDouble())).As<double, T>(); 220return TruncateOperator<float>.Invoke(x.AsSingle() + CopySignOperator<float>.Invoke(Vector256.Create(0.49999997f), x.AsSingle())).As<float, T>(); 225return TruncateOperator<double>.Invoke(x.AsDouble() + CopySignOperator<double>.Invoke(Vector256.Create(0.49999999999999994), x.AsDouble())).As<double, T>(); 233return TruncateOperator<float>.Invoke(x.AsSingle() + CopySignOperator<float>.Invoke(Vector512.Create(0.49999997f), x.AsSingle())).As<float, T>(); 238return TruncateOperator<double>.Invoke(x.AsDouble() + CopySignOperator<double>.Invoke(Vector512.Create(0.49999999999999994), x.AsDouble())).As<double, T>();
System\Numerics\Tensors\netcore\TensorPrimitives.Truncate.cs (2)
26if (typeof(T) == typeof(Half) && TryUnaryInvokeHalfAsInt16<T, TruncateOperator<float>>(x, destination)) 31InvokeSpanIntoSpan<T, TruncateOperator<T>>(x, destination);