New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[API Proposal]: Add missing Min/MaxNumber generic math APIs on TensorPrimitives #98862
Labels
Milestone
Comments
stephentoub
added
area-System.Numerics.Tensors
api-ready-for-review
API is ready for review, it is NOT ready for implementation
labels
Feb 23, 2024
Tagging subscribers to this area: @dotnet/area-system-numerics-tensors Issue DetailsBackground and motivationThese slipped through when aiming for parity. API Proposalnamespace System.Numerics.Tensors;
public static class TensorPrimitives
{
// Same surface area as Min/Max{Magnitude}, but for Min/Max{Magnitude}Number
+ public static int IndexOfMaxNumber<T>(System.ReadOnlySpan<T> x) where T : INumber<T>;
+ public static int IndexOfMinNumber<T>(System.ReadOnlySpan<T> x) where T : INumber<T>;
+ public static int IndexOfMaxMagnitudeNumber<T>(System.ReadOnlySpan<T> x) where T : INumber<T>;
+ public static int IndexOfMinMagnitudeNumber<T>(System.ReadOnlySpan<T> x) where T : INumber<T>;
+ public static T MaxMagnitudeNumber<T>(System.ReadOnlySpan<T> x) where T : INumberBase<T>;
+ public static void MaxMagnitudeNumber<T>(System.ReadOnlySpan<T> x, System.ReadOnlySpan<T> y, System.Span<T> destination) where T : INumberBase<T>;
+ public static void MaxMagnitudeNumber<T>(System.ReadOnlySpan<T> x, T y, System.Span<T> destination) where T : INumberBase<T>;
+ public static T MaxNumber<T>(System.ReadOnlySpan<T> x) where T : INumber<T>;
+ public static void MaxNumber<T>(System.ReadOnlySpan<T> x, System.ReadOnlySpan<T> y, System.Span<T> destination) where T : INumber<T>;
+ public static void MaxNumber<T>(System.ReadOnlySpan<T> x, T y, System.Span<T> destination) where T : INumber<T>;
+ public static T MinMagnitudeNumber<T>(System.ReadOnlySpan<T> x) where T : INumberBase<T>;
+ public static void MinMagnitudeNumber<T>(System.ReadOnlySpan<T> x, System.ReadOnlySpan<T> y, System.Span<T> destination) where T : INumberBase<T>;
+ public static void MinMagnitudeNumber<T>(System.ReadOnlySpan<T> x, T y, System.Span<T> destination) where T : INumberBase<T>;
+ public static T MinNumber<T>(System.ReadOnlySpan<T> x) where T : INumber<T>;
+ public static void MinNumber<T>(System.ReadOnlySpan<T> x, System.ReadOnlySpan<T> y, System.Span<T> destination) where T : INumber<T>;
+ public static void MinNumber<T>(System.ReadOnlySpan<T> x, T y, System.Span<T> destination) where T : INumber<T>;
} API UsageTensorPrimitives.MaxMagnitude(x, y, dest); Alternative DesignsNo response RisksNo response
|
stephentoub
removed
the
untriaged
New issue has not been triaged by the area owner
label
Feb 23, 2024
The |
namespace System.Numerics.Tensors;
public static class TensorPrimitives
{
// Same surface area as Min/Max{Magnitude}, but for Min/Max{Magnitude}Number
public static int IndexOfMaxNumber<T>(ReadOnlySpan<T> x) where T : INumber<T>;
public static int IndexOfMinNumber<T>(ReadOnlySpan<T> x) where T : INumber<T>;
public static int IndexOfMaxMagnitudeNumber<T>(ReadOnlySpan<T> x) where T : INumber<T>;
public static int IndexOfMinMagnitudeNumber<T>(ReadOnlySpan<T> x) where T : INumber<T>;
public static T MaxMagnitudeNumber<T>(ReadOnlySpan<T> x) where T : INumberBase<T>;
public static void MaxMagnitudeNumber<T>(ReadOnlySpan<T> x, ReadOnlySpan<T> y, System.Span<T> destination) where T : INumberBase<T>;
public static void MaxMagnitudeNumber<T>(ReadOnlySpan<T> x, T y, Span<T> destination) where T : INumberBase<T>;
public static T MaxNumber<T>(ReadOnlySpan<T> x) where T : INumber<T>;
public static void MaxNumber<T>(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination) where T : INumber<T>;
public static void MaxNumber<T>(ReadOnlySpan<T> x, T y, Span<T> destination) where T : INumber<T>;
public static T MinMagnitudeNumber<T>(ReadOnlySpan<T> x) where T : INumberBase<T>;
public static void MinMagnitudeNumber<T>(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination) where T : INumberBase<T>;
public static void MinMagnitudeNumber<T>(ReadOnlySpan<T> x, T y, Span<T> destination) where T : INumberBase<T>;
public static T MinNumber<T>(ReadOnlySpan<T> x) where T : INumber<T>;
public static void MinNumber<T>(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination) where T : INumber<T>;
public static void MinNumber<T>(ReadOnlySpan<T> x, T y, Span<T> destination) where T : INumber<T>;
} |
bartonjs
added
api-approved
API was approved in API review, it can be implemented
and removed
api-ready-for-review
API is ready for review, it is NOT ready for implementation
labels
Apr 11, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Background and motivation
These slipped through when aiming for parity.
API Proposal
API Usage
Alternative Designs
No response
Risks
No response
The text was updated successfully, but these errors were encountered: