Repository navigation
[API Proposal]: TensorPrimitives brought up to par with Math and generic math interfaces #96451
Copy link
Copy link
Closed
Labels
api-approvedAPI was approved in API review, it can be implementedAPI was approved in API review, it can be implementedarea-System.Numerics.Tensors
Milestone
Description
Background and motivation
As noted in #94553 (comment), for post-.NET 8, we're planning to augment TensorPrimitives in three ways:
- Generic versions of these methods in order to handle other numerical types beyond float
- Additional generic methods for all the operations on the generic math interfaces that aren't currently on TensorPrimitives
- Additional generic methods to have good coverage of further relevant operations ala BLAS / LAPACK
(1) was approved in #94553 and implemented in #94555.
This issue covers (2).
(3) still needs to be proposed subsequently.
API Proposal
namespace System.Numerics.Tensors
public static class TensorPrimitives
{
// Methods without existing overloads
+ public static void Acos<T>(ReadOnlySpan<T> x, Span<T> destination) where T : ITrigonometricFunctions<T>;
+ public static void AcosPi<T>(ReadOnlySpan<T> x, Span<T> destination) where T : ITrigonometricFunctions<T>;
+ public static void Acosh<T>(ReadOnlySpan<T> x, Span<T> destination) where T : IHyperbolicFunctions<T>;
+ public static void Asin<T>(ReadOnlySpan<T> x, Span<T> destination) where T : ITrigonometricFunctions<T>;
+ public static void AsinPi<T>(ReadOnlySpan<T> x, Span<T> destination) where T : ITrigonometricFunctions<T>;
+ public static void Asinh<T>(ReadOnlySpan<T> x, Span<T> destination) where T : IHyperbolicFunctions<T>;
+ public static void Atan<T>(ReadOnlySpan<T> x, Span<T> destination) where T : ITrigonometricFunctions<T>;
+ public static void AtanPi<T>(ReadOnlySpan<T> x, Span<T> destination) where T : ITrigonometricFunctions<T>;
+ public static void Atan2<T>(ReadOnlySpan<T> y, ReadOnlySpan<T> x, Span<T> destination) where T : IFloatingPointIeee754<T>;
+ public static void Atan2Pi<T>(ReadOnlySpan<T> y, ReadOnlySpan<T> x, Span<T> destination) where T : IFloatingPointIeee754<T>;
+ public static void Atanh<T>(ReadOnlySpan<T> x, Span<T> destination) where T : IHyperbolicFunctions<T>;
+ public static void BitwiseAnd<T>(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination) where T : IBitwiseOperators<T, T, T>;
+ public static void BitwiseAnd<T>(ReadOnlySpan<T> x, T y, Span<T> destination) where T : IBitwiseOperators<T, T, T>;
+ public static void BitwiseOr<T>(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination) where T : IBitwiseOperators<T, T, T>;
+ public static void BitwiseOr<T>(ReadOnlySpan<T> x, T y, Span<T> destination) where T : IBitwiseOperators<T, T, T>;
+ public static void Cbrt<T>(ReadOnlySpan<T> x, Span<T> destination) where T : IRootFunctions<T>;
+ public static void Ceiling<T>(ReadOnlySpan<T> x, Span<T> destination) where T : IFloatingPoint<T>;
+ public static void ConvertChecked<TFrom, TTo>(ReadOnlySpan<TFrom> source, Span<TTo> destination) where TFrom : INumberBase<TFrom> where TTo : INumberBase<TTo>;
+ public static void ConvertSaturating<TFrom, TTo>(ReadOnlySpan<TFrom> source, Span<TTo> destination) where TFrom : INumberBase<TFrom> where TTo : INumberBase<TTo>;
+ public static void ConvertTruncating<TFrom, TTo>(ReadOnlySpan<TFrom> source, Span<TTo> destination) where TFrom : INumberBase<TFrom> where TTo : INumberBase<TTo>;
+ public static void CopySign<T>(ReadOnlySpan<T> x, ReadOnlySpan<T> sign, Span<T> destination) where T : INumber<T>;
+ public static void CopySign<T>(ReadOnlySpan<T> x, T sign, Span<T> destination) where T : INumber<T>;
+ public static void Cos<T>(ReadOnlySpan<T> x, Span<T> destination) where T : ITrigonometricFunctions<T>;
+ public static void CosPi<T>(ReadOnlySpan<T> x, Span<T> destination) where T : ITrigonometricFunctions<T>;
+ public static void DegreesToRadians<T>(ReadOnlySpan<T> x, Span<T> destination) where T : ITrigonometricFunctions<T>;
+ public static void ExpM1<T>(ReadOnlySpan<T> x) where T : IExponentialFunctions<TSelf>;
+ public static void Exp2<T>(ReadOnlySpan<T> x) where T : IExponentialFunctions<TSelf>;
+ public static void Exp2M1<T>(ReadOnlySpan<T> x) where T : IExponentialFunctions<TSelf>;
+ public static void Exp10<T>(ReadOnlySpan<T> x) where T : IExponentialFunctions<TSelf>;
+ public static void Exp10M1<T>(ReadOnlySpan<T> x) where T : IExponentialFunctions<TSelf>;
+ public static void Floor<T>(ReadOnlySpan<T> x, Span<T> destination) where T : IFloatingPoint<T>;
+ public static void FusedMultiplyAdd<T>(ReadOnlySpan<T> x, ReadOnlySpan<T> y, ReadOnlySpan<T> addend, Span<T> destination) where T : IAdditionOperators<T, T, T>, IMultiplyOperators<T, T, T>;
+ public static void FusedMultiplyAdd<T>(ReadOnlySpan<T> x, ReadOnlySpan<T> y, T addend, Span<T> destination) where T : IAdditionOperators<T, T, T>, IMultiplyOperators<T, T, T>;
+ public static void FusedMultiplyAdd<T>(ReadOnlySpan<T> x, T y, ReadOnlySpan<T> addend, Span<T> destination) where T : IAdditionOperators<T, T, T>, IMultiplyOperators<T, T, T>;
+ public static void Hypot<T>(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination) where T : IRootFunctions<T>;
+ public static void Ieee754Remainder<T>(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination) where T : IFloatingPointIeee754<T>;
+ public static void Ieee754Remainder<T>(ReadOnlySpan<T> x, T y, Span<T> destination) where T : IFloatingPointIeee754<T>;
+ public static void Ieee754Remainder<T>(T x, ReadOnlySpan<T> y, Span<T> destination) where T : IFloatingPointIeee754<T>;
+ public static void LeadingZeroCount<T>(ReadOnlySpan<T> x, Span<T> destination) where T : IBinaryInteger<T>;
+ public static void ILogB<T>(ReadOnlySpan<T> x, Span<int> destination) where T : IFloatingPointIeee754<T>;
+ public static void Lerp<T>(ReadOnlySpan<T> x, ReadOnlySpan<T> y, ReadOnlySpan<T> amount, Span<T> destination) where T : IFloatingPointIeee754<T>;
+ public static void Lerp<T>(ReadOnlySpan<T> x, ReadOnlySpan<T> y, T amount, Span<T> destination) where T : IFloatingPointIeee754<T>;
+ public static void Lerp<T>(ReadOnlySpan<T> x, T y, ReadOnlySpan<T> amount, Span<T> destination) where T : IFloatingPointIeee754<T>;
+ public static void Log<T>(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination) where T : ILogarithmicFunctions<T>;
+ public static void Log<T>(ReadOnlySpan<T> x, T y, Span<T> destination) where T : ILogarithmicFunctions<T>;
+ public static void Log10<T>(ReadOnlySpan<T> x, Span<T> destination) where T : ILogarithmicFunctions<T>;
+ public static void LogP1<T>(ReadOnlySpan<T> x, Span<T> destination) where T : ILogarithmicFunctions<T>;
+ public static void Log2P1<T>(ReadOnlySpan<T> x, Span<T> destination) where T : ILogarithmicFunctions<T>;
+ public static void Log10P1<T>(ReadOnlySpan<T> x, Span<T> destination) where T : ILogarithmicFunctions<T>;
+ public static void OnesComplement<T>(ReadOnlySpan<T> x, Span<T> destination) where T : IBitwiseOperators<T, T, T>;
+ public static void PopCount<T>(ReadOnlySpan<T> x, Span<T> destination) where T : IBinaryInteger<T>;
+ public static void Pow<T>(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination) where T : IPowerFunctions<T>;
+ public static void Pow<T>(ReadOnlySpan<T> x, T y, Span<T> destination) where T : IPowerFunctions<T>;
+ public static void Pow<T>(T x, ReadOnlySpan<T> y, Span<T> destination) where T : IPowerFunctions<T>;
+ public static void RadiansToDegrees<T>(ReadOnlySpan<T> x, Span<T> destination) where T : ITrigonometricFunctions<T>;
+ public static void Reciprocal<T>(ReadOnlySpan<T> x, Span<T> destination) where T : IFloatingPoint<T>;
+ public static void ReciprocalEstimate<T>(ReadOnlySpan<T> x, Span<T> destination) where T : IFloatingPointIeee754<T>;
+ public static void ReciprocalSqrt<T>(ReadOnlySpan<T> x, Span<T> destination) where T : IFloatingPointIeee754<T>;
+ public static void ReciprocalSqrtEstimate<T>(ReadOnlySpan<T> x, Span<T> destination) where T : IFloatingPointIeee754<T>;
+ public static void RootN<T>(ReadOnlySpan<T> x, int n, Span<T> destination) where T : IRootFunctions<T>;
+ public static void RotateLeft<T>(ReadOnlySpan<T> x, int rotateAmount, Span<T> destination) where T : IBinaryInteger<T>;
+ public static void RotateRight<T>(ReadOnlySpan<T> x, int rotateAmount, Span<T> destination) where T : IBinaryInteger<T>;
+ public static void Round<T>(ReadOnlySpan<T> x, Span<T> destination) where T : IFloatingPoint<T>;
+ public static void Round<T>(ReadOnlySpan<T> x, MidpointRounding mode, Span<T> destination) where T : IFloatingPoint<T>;
+ public static void Round<T>(ReadOnlySpan<T> x, int digits, Span<T> destination) where T : IFloatingPoint<T>;
+ public static void Round<T>(ReadOnlySpan<T> x, int digits, MidpointRounding mode, Span<T> destination) where T : IFloatingPoint<T>;
+ public static void ScaleB<T>(ReadOnlySpan<T> x, int n, Span<T> destination) where T : IFloatingPointIeee754<T>;
+ public static void ShiftLeft<T>(ReadOnlySpan<T> x, int shiftAmount, Span<T> destination) where T : IBinaryInteger<T>;
+ public static void ShiftRightArithmetic<T>(ReadOnlySpan<T> x, int shiftAmount, Span<T> destination) where T : IBinaryInteger<T>;
+ public static void ShiftRightLogical<T>(ReadOnlySpan<T> x, int shiftAmount, Span<T> destination) where T : IBinaryInteger<T>;
+ public static void Sin<T>(ReadOnlySpan<T> x, Span<T> destination) where T : ITrigonometricFunctions<T>;
+ public static void SinCos<T>(ReadOnlySpan<T> x, Span<T> sinDestination, Span<T> cosDestination) where T : ITrigonometricFunctions<T>;
+ public static void SinCosPi<T>(ReadOnlySpan<T> x, Span<T> sinPiDestination, Span<T> cosPiDestination) where T : ITrigonometricFunctions<T>;
+ public static void SinPi<T>(ReadOnlySpan<T> x, Span<T> destination) where T : ITrigonometricFunctions<T>;
+ public static void Sqrt<T>(ReadOnlySpan<T> x, Span<T> destination) where T : IRootFunctions<T>;
+ public static void Tan<T>(ReadOnlySpan<T> x, Span<T> destination) where T : ITrigonometricFunctions<T>;
+ public static void TanPi<T>(ReadOnlySpan<T> x, Span<T> destination) where T : ITrigonometricFunctions<T>;
+ public static void TrailingZeroCount<T>(ReadOnlySpan<T> x, Span<T> destination) where T : IBinaryInteger<T>;
+ public static void Truncate<T>(ReadOnlySpan<T> x, Span<T> destination) where T : IFloatingPoint<T>;
+ public static void Xor<T>(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination) where T : IBitwiseOperators<T, T, T>;
+ public static void Xor<T>(ReadOnlySpan<T> x, T y, Span<T> destination) where T : IBitwiseOperators<T, T, T>;
// Overloads of existing methods
+ public static void Divide<T>(T x, ReadOnlySpan<T> y, Span<T> destination) where T : IDivisionOperators<T, T, T>;
+ public static void Max<T>(ReadOnlySpan<T> x, T y, Span<T> destination) where T : INumber<T>;
+ public static void MaxMagnitude<T>(ReadOnlySpan<T> x, T y, Span<T> destination) where T : INumber<T>;
+ public static void Min<T>(ReadOnlySpan<T> x, T y, Span<T> destination) where T : INumber<T>;
+ public static void MinMagnitude<T>(ReadOnlySpan<T> x, T y, Span<T> destination) where T : INumber<T>;
+ public static void Subtract<T>(T x, ReadOnlySpan<T> y, Span<T> destination) where T : ISubtractionOperators<T, T, T>;
}API Usage
float[] values = ...;
float[] destination = ...;
TensorPrimitives.Log10(values, destination);Alternative Designs
No response
Risks
No response
Metadata
Metadata
Assignees
Labels
api-approvedAPI was approved in API review, it can be implementedAPI was approved in API review, it can be implementedarea-System.Numerics.Tensors
Activity
stephentoub commentedon Jan 8, 2024
@tannergooding, any feedback on this or can this batch be marked as ready for review?
stephentoub commentedon Jan 14, 2024
@tannergooding, I've marked it as ready for review.
tannergooding commentedon Jan 16, 2024
Removed
IEEERemainderas that's the "old" name and was replaced byIeee754Remainderwith generic math.The notable APIs (which aren't comparisons) that are missing are:
FusedMultiplyAddis one we should consider addressing with an additionalMultiplyAddEstimateoverload.SinCosandSinCosPihave two outputs, but can save a lot of compute time.stephentoub commentedon Jan 16, 2024
Missing and important to add? If so:
1 remaining item
stephentoub commentedon Jan 17, 2024
I updated the proposal.
Two questions:
Span<T>, but I don't understand why PopCount returns the number of bits as aTbut a method likeRotateLeftaccepts a number of bits as anint. Should PopCount useSpan<int>as the destination here? Or we're really trying to accomodate numbers with more than 2 billion bits?tannergooding commentedon Jan 17, 2024
It matches how acceleration typically works.
PopCount,LeadingZeroCount, andTrailingZeroCounttypically returns a result as the same size it took as an input, which then allows its continued use as part of the general algorithm.On the other hand, shifting typically expects a constant (in which case it works best as an
intsince that's the natural type for literals) or it takes it as a small integer input (typically abyte), C# also had the historical limitation that the shift amount could only beint. At the time, we notably made a decision that2^31 - 1 bitswas enough for everyone (with regards to numbers). Both as that is a significantly huge value and because it simplified the handling of APIs dealing withSpan<T>as it ensured users didn't need to consider partial copies, huge shifts, etc. However, the underlyingIShiftOperatorsAPI was left open for users to define their own additional APIs that could take other types, if that made sense for their own scenarios.Sounds good to me. I had just written the names down as they appeared in the API docs (
op_ExclusiveOr) and didn't think beyond that 😆stephentoub commentedon Jan 17, 2024
Should BitwiseOnesComplement be BitwiseNot instead?
tannergooding commentedon Jan 17, 2024
For
Vector64/128/256/512<T>we matched the names given toVector<T>in 2014, which was:AndNotBitwiseAndOnesComplementBitwiseOrXorWhich overall aren't self-consistent, but its what was chosen for them. It might be convenient to match them here as well, particularly since they are effectively just wrappers over the Vector APIs in many cases.
stephentoub commentedon Jan 22, 2024
Implemented for P1 (the Convert* methods for P2), but needs API review and fixing up according to any changes from that.
bartonjs commentedon Feb 6, 2024
Video
Looks good as proposed.
namespace System.Numerics.Tensors public static class TensorPrimitives { // Methods without existing overloads + public static void Acos<T>(ReadOnlySpan<T> x, Span<T> destination) where T : ITrigonometricFunctions<T>; + public static void AcosPi<T>(ReadOnlySpan<T> x, Span<T> destination) where T : ITrigonometricFunctions<T>; + public static void Acosh<T>(ReadOnlySpan<T> x, Span<T> destination) where T : IHyperbolicFunctions<T>; + public static void Asin<T>(ReadOnlySpan<T> x, Span<T> destination) where T : ITrigonometricFunctions<T>; + public static void AsinPi<T>(ReadOnlySpan<T> x, Span<T> destination) where T : ITrigonometricFunctions<T>; + public static void Asinh<T>(ReadOnlySpan<T> x, Span<T> destination) where T : IHyperbolicFunctions<T>; + public static void Atan<T>(ReadOnlySpan<T> x, Span<T> destination) where T : ITrigonometricFunctions<T>; + public static void AtanPi<T>(ReadOnlySpan<T> x, Span<T> destination) where T : ITrigonometricFunctions<T>; + public static void Atan2<T>(ReadOnlySpan<T> y, ReadOnlySpan<T> x, Span<T> destination) where T : IFloatingPointIeee754<T>; + public static void Atan2Pi<T>(ReadOnlySpan<T> y, ReadOnlySpan<T> x, Span<T> destination) where T : IFloatingPointIeee754<T>; + public static void Atanh<T>(ReadOnlySpan<T> x, Span<T> destination) where T : IHyperbolicFunctions<T>; + public static void BitwiseAnd<T>(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination) where T : IBitwiseOperators<T, T, T>; + public static void BitwiseAnd<T>(ReadOnlySpan<T> x, T y, Span<T> destination) where T : IBitwiseOperators<T, T, T>; + public static void BitwiseOr<T>(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination) where T : IBitwiseOperators<T, T, T>; + public static void BitwiseOr<T>(ReadOnlySpan<T> x, T y, Span<T> destination) where T : IBitwiseOperators<T, T, T>; + public static void Cbrt<T>(ReadOnlySpan<T> x, Span<T> destination) where T : IRootFunctions<T>; + public static void Ceiling<T>(ReadOnlySpan<T> x, Span<T> destination) where T : IFloatingPoint<T>; + public static void ConvertChecked<TFrom, TTo>(ReadOnlySpan<TFrom> source, Span<TTo> destination) where TFrom : INumberBase<TFrom> where TTo : INumberBase<TTo>; + public static void ConvertSaturating<TFrom, TTo>(ReadOnlySpan<TFrom> source, Span<TTo> destination) where TFrom : INumberBase<TFrom> where TTo : INumberBase<TTo>; + public static void ConvertTruncating<TFrom, TTo>(ReadOnlySpan<TFrom> source, Span<TTo> destination) where TFrom : INumberBase<TFrom> where TTo : INumberBase<TTo>; + public static void CopySign<T>(ReadOnlySpan<T> x, ReadOnlySpan<T> sign, Span<T> destination) where T : INumber<T>; + public static void CopySign<T>(ReadOnlySpan<T> x, T sign, Span<T> destination) where T : INumber<T>; + public static void Cos<T>(ReadOnlySpan<T> x, Span<T> destination) where T : ITrigonometricFunctions<T>; + public static void CosPi<T>(ReadOnlySpan<T> x, Span<T> destination) where T : ITrigonometricFunctions<T>; + public static void DegreesToRadians<T>(ReadOnlySpan<T> x, Span<T> destination) where T : ITrigonometricFunctions<T>; + public static void ExpM1<T>(ReadOnlySpan<T> x) where T : IExponentialFunctions<TSelf>; + public static void Exp2<T>(ReadOnlySpan<T> x) where T : IExponentialFunctions<TSelf>; + public static void Exp2M1<T>(ReadOnlySpan<T> x) where T : IExponentialFunctions<TSelf>; + public static void Exp10<T>(ReadOnlySpan<T> x) where T : IExponentialFunctions<TSelf>; + public static void Exp10M1<T>(ReadOnlySpan<T> x) where T : IExponentialFunctions<TSelf>; + public static void Floor<T>(ReadOnlySpan<T> x, Span<T> destination) where T : IFloatingPoint<T>; + public static void FusedMultiplyAdd<T>(ReadOnlySpan<T> x, ReadOnlySpan<T> y, ReadOnlySpan<T> addend, Span<T> destination) where T : IAdditionOperators<T, T, T>, IMultiplyOperators<T, T, T>; + public static void FusedMultiplyAdd<T>(ReadOnlySpan<T> x, ReadOnlySpan<T> y, T addend, Span<T> destination) where T : IAdditionOperators<T, T, T>, IMultiplyOperators<T, T, T>; + public static void FusedMultiplyAdd<T>(ReadOnlySpan<T> x, T y, ReadOnlySpan<T> addend, Span<T> destination) where T : IAdditionOperators<T, T, T>, IMultiplyOperators<T, T, T>; + public static void Hypot<T>(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination) where T : IRootFunctions<T>; + public static void Ieee754Remainder<T>(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination) where T : IFloatingPointIeee754<T>; + public static void Ieee754Remainder<T>(ReadOnlySpan<T> x, T y, Span<T> destination) where T : IFloatingPointIeee754<T>; + public static void Ieee754Remainder<T>(T x, ReadOnlySpan<T> y, Span<T> destination) where T : IFloatingPointIeee754<T>; + public static void LeadingZeroCount<T>(ReadOnlySpan<T> x, Span<T> destination) where T : IBinaryInteger<T>; + public static void ILogB<T>(ReadOnlySpan<T> x, Span<int> destination) where T : IFloatingPointIeee754<T>; + public static void Lerp<T>(ReadOnlySpan<T> x, ReadOnlySpan<T> y, ReadOnlySpan<T> amount, Span<T> destination) where T : IFloatingPointIeee754<T>; + public static void Lerp<T>(ReadOnlySpan<T> x, ReadOnlySpan<T> y, T amount, Span<T> destination) where T : IFloatingPointIeee754<T>; + public static void Lerp<T>(ReadOnlySpan<T> x, T y, ReadOnlySpan<T> amount, Span<T> destination) where T : IFloatingPointIeee754<T>; + public static void Log<T>(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination) where T : ILogarithmicFunctions<T>; + public static void Log<T>(ReadOnlySpan<T> x, T y, Span<T> destination) where T : ILogarithmicFunctions<T>; + public static void Log10<T>(ReadOnlySpan<T> x, Span<T> destination) where T : ILogarithmicFunctions<T>; + public static void LogP1<T>(ReadOnlySpan<T> x, Span<T> destination) where T : ILogarithmicFunctions<T>; + public static void Log2P1<T>(ReadOnlySpan<T> x, Span<T> destination) where T : ILogarithmicFunctions<T>; + public static void Log10P1<T>(ReadOnlySpan<T> x, Span<T> destination) where T : ILogarithmicFunctions<T>; + public static void OnesComplement<T>(ReadOnlySpan<T> x, Span<T> destination) where T : IBitwiseOperators<T, T, T>; + public static void PopCount<T>(ReadOnlySpan<T> x, Span<T> destination) where T : IBinaryInteger<T>; + public static void Pow<T>(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination) where T : IPowerFunctions<T>; + public static void Pow<T>(ReadOnlySpan<T> x, T y, Span<T> destination) where T : IPowerFunctions<T>; + public static void Pow<T>(T x, ReadOnlySpan<T> y, Span<T> destination) where T : IPowerFunctions<T>; + public static void RadiansToDegrees<T>(ReadOnlySpan<T> x, Span<T> destination) where T : ITrigonometricFunctions<T>; + public static void Reciprocal<T>(ReadOnlySpan<T> x, Span<T> destination) where T : IFloatingPoint<T>; + public static void ReciprocalEstimate<T>(ReadOnlySpan<T> x, Span<T> destination) where T : IFloatingPointIeee754<T>; + public static void ReciprocalSqrt<T>(ReadOnlySpan<T> x, Span<T> destination) where T : IFloatingPointIeee754<T>; + public static void ReciprocalSqrtEstimate<T>(ReadOnlySpan<T> x, Span<T> destination) where T : IFloatingPointIeee754<T>; + public static void RootN<T>(ReadOnlySpan<T> x, int n, Span<T> destination) where T : IRootFunctions<T>; + public static void RotateLeft<T>(ReadOnlySpan<T> x, int rotateAmount, Span<T> destination) where T : IBinaryInteger<T>; + public static void RotateRight<T>(ReadOnlySpan<T> x, int rotateAmount, Span<T> destination) where T : IBinaryInteger<T>; + public static void Round<T>(ReadOnlySpan<T> x, Span<T> destination) where T : IFloatingPoint<T>; + public static void Round<T>(ReadOnlySpan<T> x, MidpointRounding mode, Span<T> destination) where T : IFloatingPoint<T>; + public static void Round<T>(ReadOnlySpan<T> x, int digits, Span<T> destination) where T : IFloatingPoint<T>; + public static void Round<T>(ReadOnlySpan<T> x, int digits, MidpointRounding mode, Span<T> destination) where T : IFloatingPoint<T>; + public static void ScaleB<T>(ReadOnlySpan<T> x, int n, Span<T> destination) where T : IFloatingPointIeee754<T>; + public static void ShiftLeft<T>(ReadOnlySpan<T> x, int shiftAmount, Span<T> destination) where T : IBinaryInteger<T>; + public static void ShiftRightArithmetic<T>(ReadOnlySpan<T> x, int shiftAmount, Span<T> destination) where T : IBinaryInteger<T>; + public static void ShiftRightLogical<T>(ReadOnlySpan<T> x, int shiftAmount, Span<T> destination) where T : IBinaryInteger<T>; + public static void Sin<T>(ReadOnlySpan<T> x, Span<T> destination) where T : ITrigonometricFunctions<T>; + public static void SinCos<T>(ReadOnlySpan<T> x, Span<T> sinDestination, Span<T> cosDestination) where T : ITrigonometricFunctions<T>; + public static void SinCosPi<T>(ReadOnlySpan<T> x, Span<T> sinPiDestination, Span<T> cosPiDestination) where T : ITrigonometricFunctions<T>; + public static void SinPi<T>(ReadOnlySpan<T> x, Span<T> destination) where T : ITrigonometricFunctions<T>; + public static void Sqrt<T>(ReadOnlySpan<T> x, Span<T> destination) where T : IRootFunctions<T>; + public static void Tan<T>(ReadOnlySpan<T> x, Span<T> destination) where T : ITrigonometricFunctions<T>; + public static void TanPi<T>(ReadOnlySpan<T> x, Span<T> destination) where T : ITrigonometricFunctions<T>; + public static void TrailingZeroCount<T>(ReadOnlySpan<T> x, Span<T> destination) where T : IBinaryInteger<T>; + public static void Truncate<T>(ReadOnlySpan<T> x, Span<T> destination) where T : IFloatingPoint<T>; + public static void Xor<T>(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination) where T : IBitwiseOperators<T, T, T>; + public static void Xor<T>(ReadOnlySpan<T> x, T y, Span<T> destination) where T : IBitwiseOperators<T, T, T>; // Overloads of existing methods + public static void Divide<T>(T x, ReadOnlySpan<T> y, Span<T> destination) where T : IDivisionOperators<T, T, T>; + public static void Max<T>(ReadOnlySpan<T> x, T y, Span<T> destination) where T : INumber<T>; + public static void MaxMagnitude<T>(ReadOnlySpan<T> x, T y, Span<T> destination) where T : INumber<T>; + public static void Min<T>(ReadOnlySpan<T> x, T y, Span<T> destination) where T : INumber<T>; + public static void MinMagnitude<T>(ReadOnlySpan<T> x, T y, Span<T> destination) where T : INumber<T>; + public static void Subtract<T>(T x, ReadOnlySpan<T> y, Span<T> destination) where T : ISubtractionOperators<T, T, T>; }stephentoub commentedon Feb 6, 2024
This was implemented.