[THEME] Universal 64-bit index type support in Thrust/CUB algorithms
- Dominant language
- C++
- Stars
- 2.5k
- Forks
- 486
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 295
Description
# Summary
Users expect Thrust/CUB algorithms to work with input sequences larger than `INT_MAX`. However, for historical reasons, many Thrust/CUB algorithms are hard-coded to use `int` as the index/offset type. As a result, those algorithms will fail (often silently) when provided inputs whose extent is larger than `std::numeric_limits::max()`.
In order to provide a delightful and consistent user experience, every Thrust/CUB should be able to work with inputs larger than `INT_MAX`. However, we likely want different solutions in Thrust vs CUB.
# Intended Outcome
### Thrust
- All Thrust algorithms should work with large inputs by default.
- Users should be able to opt-in to explicitly specify the offset type to avoid any compile/run-time overhead
### CUB
- CUB algorithms need not work with large inputs by default, but should _enable_ users to work with large inputs
### Depends On
- [ ] https://github.com/NVIDIA/cccl/issues/24
# Tasks
- [ ] https://github.com/NVIDIA/cccl/issues/49
- [ ] https://github.com/NVIDIA/cccl/issues/50
# Related Info
https://github.com/NVIDIA/cub/issues/212 was the previous tracking issue in CUB that has a lot of good discussion about what we want a solution to look like in Thrust vs CUB.
Contributor guide
Assessment
This issue has not been assessed yet.