-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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 : Arm64 Load & Store #24771
Comments
These are similar to similarly named methods in X86. The unsafe Load* and Store are basically identical to X86. X86 has @eerhardt @CarolEidt @RussKeldorph PTAL |
As I know, C# does not have pointers to generic types. |
Interesting... I think it is reasonable to review as is with the understanding that these may need to expand. |
I am not sure if we should match the C++ name (actually, I do not think When I designed the API, I thought I am happy to hear more comments from C# experts. cc @jkotas @AndyAyersMS @benaadams |
IMO bcs not only of the reasons above @fiigii naming is more appealing to C# coders. My first impression with the name is that it does provide casting operations based on static methods and essentially it does that. There is |
The equivalent APIs for Span is going to be called just Cast: |
Sounds like X86 If we should match |
I change the |
@eerhardt @CarolEidt @RussKeldorph API-Ready-For-Review? |
The x86 LoadVector methods are expanded out: ex.
Same for Why are we using generics and |
Only to reduce API surface. I am happy to change. |
I would prefer the two sets of APIs be consistent, unless there is a reason/value for them to be different. |
I believe in one of the discussions with @CarolEidt, it was determined that we could/should use generics if all 10 numeric types for a method are supported in a single ISA. x86 doesn't meet this requirement in a number of places, since it generally exposes a subset in one ISA and the rest in the next iteration (e.g. x86 is using generics in the few places where it does meet the first requirement. |
OK - that makes sense to me why they are different. |
@eerhardt Any reason why this is marked future? I believe this is within range of 2.1. Implementation should take more than a few days. |
@eerhardt @CarolEidt @RussKeldorph These are not currently implemented. I think they their absence will make the Arm64 SIMD intrinsics difficult to use. I think we could safely implement them in CoreCLR and expose the API in CoreFX in time for Zero Bug Bounce. Is that still an option? Or will the PR's be deferred till after ZBB. |
If we can't complete simple scenarios with the ARM64 intrinsics APIs, then it doesn't make sense to leave them in. So I'd suggest at least getting a simple end-to-end scenario working, or removing the APIs all together.
I would take the PRs to complete a simple end-to-end scenario if they were completed before ZBB. |
Should the naming reflect alignment requirements?
|
The |
Looks good as proposed, except the namespaces/types should match the existing types: namespace System.Runtime.Intrinsics.Arm
{
public partial class AdvSimd
{
public partial class Arm64 : ArmBase
{
/// <summary>
/// Vector load
///
/// Corresponds to vector form of ARM64 LDR
/// </summary>
public static unsafe Vector64<T> LoadVector64<T>(void* address) where T : struct;
public static unsafe Vector128<T> LoadVector128<T>(void* address) where T : struct;
/// <summary>
/// Vector store
///
/// Corresponds to vector form of ARM64 STR
/// </summary>
public static unsafe void Store<T>(void* address, Vector64<T> source) where T : struct;
public static unsafe void Store<T>(void* address, Vector128<T> source) where T : struct;
}
}
} |
Edit: Removed
StaticCast
as that is handled byVector128.As*
. Kept the Load/Store APIs as generic with note that the actual implementation is exploded and supports all 10 primitive typesThe text was updated successfully, but these errors were encountered: