Documentation Request: Allocators / Iterators
- Dominant language
- C++
- Stars
- 2.5k
- Forks
- 486
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 295
Description
Hi, I am working on a project and I would like to standardize on thrusts iterators and allocators,
however I am finding difficulty in writing my own custom iterators and allocators,
It would be great if there was some more documentation on the differences between the standard and thrust on these topics, likewise I think an example showcasing a custom allocator and/or custom iterator (without inheriting from an existing thrust::allocator/iterator) would be great.
I state that I would prefer to not inherit from thrusts iterators/allocators as my project will only include the thrust headers if the user is compiling with cuda support (and will fallback to the `std::` if not).
**Shameless self promotion:
https://github.com/josephjaspers/blackcat_tensors
**This file wraps std and thrust algorithms. (showcasing how I am only conditionally depending on thrust)
Will use thrust algos if __CUDACC__ is defined else fallback to just `std::`
https://github.com/josephjaspers/blackcat_tensors/blob/master/blackcat/algorithms/algorithms.h
Contributor guide
Assessment
This issue has not been assessed yet.