Finalize replacing thrust with cuda iterators
- Dominant language
- C++
- Stars
- 2.5k
- Forks
- 486
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 295
Description
We have implemented new iterators in the `cuda` namespace to replace the ones from Thrust. We should finish this transition.
This includes replacing the use of Thrust iterators in CCCL by cuda iterators. We have a few pending PRs which try to address this:
- [x] #5649
- [x] #5651
- [ ] #5963
IIRC, some of those PRs unveiled problems with the underlying iterator models. Thrust uses a model based on Boost.Iterator using traversal categories in addition to iterator categories. The Thrust model is, AFAIK, also not compatible with C++20 iterator concepts. cuda iterators support the C++17 and C++20 model. IIRC, we had to retrofit the Thrust model internally onto cuda iterators to make them work efficiently with Thrust algorithms, but I forgot the details and I also forgot whether that transition was actually merged to `main`. I remember some users running into problems where moving from a Thrust iterator to a cuda one turned their algorithm serial. Maybe @miscco remembers what happened.
After all uses of Thrust iterators have been replaced, we should properly deprecate them in the source code as well as in the documentation and advise users towards cuda iterators.
Contributor guide
Assessment
This issue has not been assessed yet.