-
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 support for Vector<T>.Indices and Vector.CreateSequence #97880
Conversation
Note regarding the This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change. |
Tagging subscribers to this area: @dotnet/area-system-runtime-intrinsics Issue DetailsThis covers the xplat APIs approved in #94008
|
@@ -596,6 +597,7 @@ public partial struct Vector4 : System.IEquatable<System.Numerics.Vector4>, Syst | |||
public Vector(T[] values, int index) { throw null; } | |||
public static System.Numerics.Vector<T> AllBitsSet { get { throw null; } } | |||
public static int Count { get { throw null; } } | |||
public static System.Numerics.Vector<T> Indices { get { throw null; } } |
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.
Can we use this here?
Vector<int> init = new Vector<int>((ReadOnlySpan<int>)[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]); |
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.
There are several places that this should be usable including in LINQ and in Tensors
However, I was going to put up an issue and cover them in a follow up PR since source.dot.net wasn't bringing them up at the moment (making finding all the places rather difficult): https://source.dot.net/#System.Private.CoreLib/src/libraries/System.Private.CoreLib/src/System/Numerics/Vector_1.cs,2157880a86aea82e,references
Diff results for #97880Throughput diffsThroughput diffs for linux/arm64 ran on windows/x64MinOpts (-0.00% to +0.01%)
Throughput diffs for windows/x64 ran on windows/x64Overall (+0.00% to +0.01%)
FullOpts (-0.00% to +0.01%)
Details here |
Diff results for #97880Throughput diffsThroughput diffs for windows/arm64 ran on windows/x64MinOpts (-0.01% to +0.00%)
Throughput diffs for windows/x64 ran on windows/x64Overall (+0.00% to +0.01%)
FullOpts (+0.00% to +0.01%)
Details here Throughput diffs for windows/x86 ran on windows/x86FullOpts (+0.00% to +0.01%)
Details here |
b282804
to
b93a3a5
Compare
Diff results for #97880Throughput diffsThroughput diffs for linux/arm64 ran on linux/x64MinOpts (-0.00% to +0.01%)
Throughput diffs for windows/arm64 ran on linux/x64MinOpts (0.00% to +0.01%)
Throughput diffs for windows/x64 ran on linux/x64Overall (+0.00% to +0.01%)
FullOpts (+0.00% to +0.01%)
Details here |
b93a3a5
to
3e214a8
Compare
Diff results for #97880Throughput diffsThroughput diffs for linux/arm64 ran on windows/x64MinOpts (-0.00% to +0.01%)
Throughput diffs for windows/arm64 ran on windows/x64MinOpts (0.00% to +0.01%)
Throughput diffs for windows/x64 ran on windows/x64Overall (+0.00% to +0.01%)
FullOpts (+0.00% to +0.01%)
Details here |
Diff results for #97880Throughput diffsThroughput diffs for windows/arm64 ran on linux/x64MinOpts (-0.01% to +0.00%)
Throughput diffs for windows/x64 ran on linux/x64Overall (+0.00% to +0.01%)
FullOpts (+0.00% to +0.01%)
Details here |
3e214a8
to
971e475
Compare
Diff results for #97880Throughput diffsThroughput diffs for linux/arm64 ran on windows/x64MinOpts (-0.01% to +0.00%)
Throughput diffs for windows/arm64 ran on windows/x64MinOpts (-0.01% to +0.00%)
Throughput diffs for windows/x64 ran on windows/x64Overall (+0.00% to +0.01%)
FullOpts (+0.00% to +0.01%)
Details here |
971e475
to
db75184
Compare
ping @dotnet/jit-contrib, this is ready for review and is a simple change |
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.
JIT changes LGTM
This covers the xplat APIs approved in #94008