Skip to content
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

Implement block-wide odd-even sort #632

Merged
merged 1 commit into from
Aug 2, 2024

Conversation

stephenswat
Copy link
Member

@stephenswat stephenswat commented Jun 26, 2024

Sorting small arrays is a relatively common problem in GPGPU programming. Many useful algorithms exist, and some are provided by libraries like CUB. An algorithm close to my heart is odd-even sort because it is exceedingly simply, relatively efficient for small arrays and, importantly, it uses $\mathcal{O}(1)$ space. This commit adds new implementations of this sorting algorithm for block-wide odd-even sort in a portable way.

@stephenswat stephenswat added feature New feature or request shared Changes related to shared code labels Jun 26, 2024
@stephenswat
Copy link
Member Author

Depends on #631, #602, and #596. Replaces #347.

@stephenswat stephenswat force-pushed the feat/oddeven branch 3 times, most recently from 0d6f19f to 200f2db Compare June 26, 2024 13:49
@stephenswat stephenswat marked this pull request as draft June 26, 2024 13:59
@stephenswat stephenswat marked this pull request as ready for review August 1, 2024 15:02
@stephenswat
Copy link
Member Author

This is now ready for review.

Copy link
Member

@krasznaa krasznaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't claim to understand the algorithm. 😦

But "looks-wise" I like it. And the CI is happy with it, so: 👍

Sorting small arrays is a relatively common problem in GPGPU
programming. Many useful algorithms exist, and some are provided by
libraries like CUB. An algorithm close to my heart is odd-even sort
because it is exceedingly simply, relatively efficient for small arrays
and, importantly, it uses O(1) space. This commit adds new
implementations of this sorting algorithm for block-wide odd-even sort
in a portable way.
@stephenswat stephenswat merged commit b0c0939 into acts-project:main Aug 2, 2024
20 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request shared Changes related to shared code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants