-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Add approved TensorPrimitives surface area #112933
Conversation
Note regarding the
|
Note regarding the
|
src/libraries/System.Numerics.Tensors/ref/System.Numerics.Tensors.netcore.cs
Show resolved
Hide resolved
Tagging subscribers to this area: @dotnet/area-system-numerics-tensors |
src/libraries/System.Numerics.Tensors/ref/System.Numerics.Tensors.netcore.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Overview
This PR adds the approved surface area for TensorPrimitives by introducing a variety of new element‐wise operations (e.g. average, is complex, is finite, bitwise and arithmetic increments/decrements, division with remainder, and clamping) for numeric tensors. Key changes include the implementation of new static methods in TensorPrimitives for common numeric operations, the introduction of vectorized operator overloads, and several overloads to support both span and scalar inputs.
Reviewed Changes
File | Description |
---|---|
TensorPrimitives.Average.cs | Adds a method to compute the average of elements. |
TensorPrimitives.IsComplexNumber.cs | Adds methods for checking complex number properties. |
TensorPrimitives.IsFinite.cs | Implements methods to check finiteness with vectorized operations. |
TensorPrimitives.BitDecrement.cs | Provides bit decrement functionality. |
TensorPrimitives.IsEvenInteger.cs | Introduces methods for identifying even integral numbers. |
TensorPrimitives.ConvertToIntegerNative.cs | Implements platform-specific native conversion to integer. |
TensorPrimitives.IsCanonical.cs | Adds canonical form checks with vectorized shortcuts. |
TensorPrimitives.ConvertToInteger.cs | Implements saturating integer conversion. |
TensorPrimitives.BitIncrement.cs | Provides bit increment operations. |
TensorPrimitives.Increment.cs | Adds element-wise increment functionality. |
TensorPrimitives.Decrement.cs | Adds element-wise decrement functionality. |
TensorPrimitives.DivRem.cs | Implements division with remainder for spans and scalars. |
TensorPrimitives.Clamp.cs | Provides multiple overloads for clamping tensor values. |
Copilot reviewed 45 out of 45 changed files in this pull request and generated 3 comments.
Tip: If you use Visual Studio Code, you can request a review from Copilot before you push from the "Source Control" tab. Learn more
Adds all of the approved TensorPrimitives surface area from:
#103611
#104117