[FEA]: Investigate in-place sorting algorithms to reduce memory usage
- 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
CUB
### Is your feature request related to a problem? Please describe.
Current sorting algorithms require at least 2n space to sort a sequence of length n. Investigate possible implementations of comparison based in-place sort to reduce memory usage.
### Describe the solution you'd like
Some in-place sorting algorithms suitable for GPUs are already described in the literature:
Bitonic sort - has time complexity `O(nlog(n)log(n)`. The extra log(n) factor here makes it significantly slower than e.g. parallel merge sort.
Peters, Hagen, Ole Schulz-Hildebrandt, and Norbert Luttenberger. "Fast in-place sorting with cuda based on bitonic sort." International Conference on Parallel Processing and Applied Mathematics. Berlin, Heidelberg: Springer Berlin Heidelberg, 2009.
Shell sort
Lin, Chun-Yuan, Wei Sheng Lee, and Chuan Yi Tang. "Parallel shellsort algorithm for many-core GPUs with CUDA." International Journal of Grid and High Performance Computing (IJGHPC) 4.2 (2012): 1-16.
In-merge sort
In-place parallel radix sort
https://dl.acm.org/doi/abs/10.14778/2824032.2824050
### Describe alternatives you've considered
_No response_
### Additional context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.