-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[stdlib] SIMD.shuffle with StaticIntTuple mask #2315
Conversation
Thanks for the contribution! 🎉 I'm out of office for the first part of this week (Monday - Wednesday), so I've added a few additional reviewers to this PR in hopes they can take a look before I'm back. |
12dc3de
to
fe8ab96
Compare
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.
Nice! Just a few quibbles.
Thanks so much for the contribution! 🎉
Signed-off-by: Michael Kowalski <1331470+mikowals@users.noreply.github.com>
Signed-off-by: Michael Kowalski <1331470+mikowals@users.noreply.github.com>
Signed-off-by: Michael Kowalski <1331470+mikowals@users.noreply.github.com>
Signed-off-by: Michael Kowalski <1331470+mikowals@users.noreply.github.com>
Signed-off-by: Michael Kowalski <1331470+mikowals@users.noreply.github.com>
Signed-off-by: Michael Kowalski <1331470+mikowals@users.noreply.github.com>
Signed-off-by: Michael Kowalski <1331470+mikowals@users.noreply.github.com>
Signed-off-by: Michael Kowalski <1331470+mikowals@users.noreply.github.com>
✅🟣 This contribution has been merged 🟣✅ Hey @mikowals, Thanks so much for the contribution! 🎉 We're moving to a new infrastructure for merging contributions to Mojo (we're using a tool called Copybara), and your contribution has now been merged into our internal copy of the Mojo Standard Library. I've added the "merged-internally" label on this PR. The changes in this PR will appear here in the mojo repo nightly branch when we do our next outbound synchronization at the time that the next Mojo nightly is released. That should happen within the next 24 hours. Please let me know if you have any questions or concerns. |
[External] [stdlib] SIMD.shuffle with StaticIntTuple mask Implement #2293. New overloads for `SIMD.shuffle()` like this: ``` fn shuffle[mask: StaticIntTuple[size]](self) -> Self: ``` additionally: - added tests for `SIMD.join()` and `SIMD.shuffle()` - simplified `join` implementation and always use shuffle rather than 2 inserts when mask size > 32 - cleaned up doc strings about shuffle output length - minor refactor of original `_shuffle_list` to use `output_size` parameter rather than calculate `len(mask)` many times As I mentioned in the issue, this can be nicer when inferred parameters are implemented but I guess that is true of most things. ORIGINAL_AUTHOR=Michael Kowalski <1331470+mikowals@users.noreply.github.com> PUBLIC_PR_LINK=#2315 Co-authored-by: Michael Kowalski <1331470+mikowals@users.noreply.github.com> Closes #2315 MODULAR_ORIG_COMMIT_REV_ID: db6215999badc9da09f81700ee9b070db8e93a5b
🎉 🔥 This landed in tonight's nightly release in #2480! Thanks again for the contribution! |
[External] [stdlib] SIMD.shuffle with StaticIntTuple mask Implement modularml#2293. New overloads for `SIMD.shuffle()` like this: ``` fn shuffle[mask: StaticIntTuple[size]](self) -> Self: ``` additionally: - added tests for `SIMD.join()` and `SIMD.shuffle()` - simplified `join` implementation and always use shuffle rather than 2 inserts when mask size > 32 - cleaned up doc strings about shuffle output length - minor refactor of original `_shuffle_list` to use `output_size` parameter rather than calculate `len(mask)` many times As I mentioned in the issue, this can be nicer when inferred parameters are implemented but I guess that is true of most things. ORIGINAL_AUTHOR=Michael Kowalski <1331470+mikowals@users.noreply.github.com> PUBLIC_PR_LINK=modularml#2315 Co-authored-by: Michael Kowalski <1331470+mikowals@users.noreply.github.com> Closes modularml#2315 MODULAR_ORIG_COMMIT_REV_ID: db6215999badc9da09f81700ee9b070db8e93a5b Signed-off-by: Lukas Hermann <lukashermann28@gmail.com>
[External] [stdlib] SIMD.shuffle with StaticIntTuple mask Implement #2293. New overloads for `SIMD.shuffle()` like this: ``` fn shuffle[mask: StaticIntTuple[size]](self) -> Self: ``` additionally: - added tests for `SIMD.join()` and `SIMD.shuffle()` - simplified `join` implementation and always use shuffle rather than 2 inserts when mask size > 32 - cleaned up doc strings about shuffle output length - minor refactor of original `_shuffle_list` to use `output_size` parameter rather than calculate `len(mask)` many times As I mentioned in the issue, this can be nicer when inferred parameters are implemented but I guess that is true of most things. ORIGINAL_AUTHOR=Michael Kowalski <1331470+mikowals@users.noreply.github.com> PUBLIC_PR_LINK=#2315 Co-authored-by: Michael Kowalski <1331470+mikowals@users.noreply.github.com> Closes #2315 MODULAR_ORIG_COMMIT_REV_ID: db6215999badc9da09f81700ee9b070db8e93a5b
Implement #2293. New overloads for
SIMD.shuffle()
like this:additionally:
SIMD.join()
andSIMD.shuffle()
join
implementation and always use shuffle rather than 2 inserts when mask size > 32_shuffle_list
to useoutput_size
parameter rather than calculatelen(mask)
many timesAs I mentioned in the issue, this can be nicer when inferred parameters are implemented but I guess that is true of most things.