Skip to content

Topic contains almost no info on how to use the method #11343

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

Open
rindlespot opened this issue May 23, 2025 · 1 comment
Open

Topic contains almost no info on how to use the method #11343

rindlespot opened this issue May 23, 2025 · 1 comment
Labels
area-System.Runtime.Intrinsics untriaged New issue has not been triaged by the area owner

Comments

@rindlespot
Copy link

Type of issue

Missing information

Description

I realize this is still pre-release material, but I want to make sure it's still on someone's todo list. The docs for 'Shuffle' aren't much better. Mostly I was looking, for some indication of how ShuffleNative is any different from just Shuffle? Looking in Vector64.cs, ShuffleNative just seems to call Shuffle, but perhaps something interesting happens in the intrinsic substitution.

When these docs do get written, I'm hoping for one specific item here. And if it's ever going to get added, it needs to happen before the code is released, otherwise there are backward compatibility issues.

Looking at the current code, if your indices vector contains 0x0001020304050607 it reverses the vector (as expected). And if it contains 0x0x8080808004050607, then the 4 most significant bytes gets zeroed instead of reversed (also as expected). Strictly speaking, any value greater than the number of elements in the vector would zero the corresponding output element (based on the current code). But by explicitly documenting that setting the most significant bit of the index results in zeros, it would be consistent with the SSE shuffle instructions.

If there's no reason not to, being compatible with SSE seems like a good thing. Especially since no code change would be required, just a line in the (as yet unwritten) docs.

Page URL

https://learn.microsoft.com/en-us/dotnet/api/system.runtime.intrinsics.vector64.shufflenative?view=net-10.0

Content source URL

https://github.com/dotnet/dotnet-api-docs/blob/main/xml/System.Runtime.Intrinsics/Vector64.xml

Document Version Independent Id

b9ba8c77-1dfc-8407-41d1-7611246b02c7

Platform Id

3bf12d49-ac45-3318-da2a-a33a38462460

Article author

@dotnet-bot

@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label May 23, 2025
@github-actions github-actions bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label May 23, 2025
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-runtime-intrinsics

@dotnet-policy-service dotnet-policy-service bot removed the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label May 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-System.Runtime.Intrinsics untriaged New issue has not been triaged by the area owner
Projects
None yet
Development

No branches or pull requests

2 participants