[FEA]: Implement GPU friendly single-threaded sorting algorithms
- Dominant language
- C++
- Stars
- 2.5k
- Forks
- 486
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 295
Description
### Is this a duplicate?
- [x] I confirmed there appear to be no [duplicate issues](https://github.com/NVIDIA/cccl/issues) for this request and that I agree to the [Code of Conduct](CODE_OF_CONDUCT.md)
### Area
libcu++
### Is your feature request related to a problem? Please describe.
We currently do not expose `cuda::std::` sorting algorithms, because they are commonly implemented through recursion and that might blow up the GPU stack.
We need to spend time to implement a proper GPU friendly, single-threaded implementation to expose
* `sort`
* `stable_sort`
* `nth_element`
* `inplace_merge`
### Describe the solution you'd like
There are a lot of nice sorting networks available, that are already in the libc++ implementation.
We should investigate if we can use some larger ones to properly implement a non-recursive sort on device
Note that we do not want to have implementation divergence between host and device
Also this is regarding *serial* algorithms. For parallel algorithms we will use the CUB backend
### Describe alternatives you've considered
_No response_
### Additional context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.