Comments (5)
@brycelelbach @allisonvacanti there have been several times where I've wanted something very simple like this for linear sequences. I don't think we need a full on md-span or multi-dimensional iterator for something this simple. Similarly, I've wanted a counting_iterator
that takes a "step" value.
I imagine these would look something like this:
template <typename InputIterator, typename Stride>
auto make_strided_iterator(InputIterator it, Stride stride);
template <typename Incrementable>
auto make_counting_iterator(Incremenetable begin, Incrementable step);
from cccl.
I think it only exists as an example: https://github.com/thrust/thrust/blob/master/examples/strided_range.cu
from cccl.
@henryiii thanks, I wonder why it hasn't been formally added in to thrust. Any additional thoughts regarding the 'padding' problem?
from cccl.
This falls into the broader category of "multi-dimensional" support, I think, although a skip iterator could be useful for a linear sequence.
We don't have a firm design for what we're going to do in this space. But, I imagine we'll eventually want a family of strided iterators.
Note, however, that traditionally such iterators have all sorts of performance problems.
SEE ALSO: https://www.youtube.com/watch?v=EVGenON6p9g
SEE ALSO: https://github.com/brycelelbach/mditerator
SEE ALSO: https://github.com/brycelelbach/mdspan
SEE ALSO: wg21.link/P0009
from cccl.
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1899r0.pdf
Equivalent for ranges.
from cccl.
Related Issues (20)
- [BUG]: thrust::count_if and copy_if performance on Grace and x86 10x+ / 20x+ slower than libstdc++
- [FEA]: Expose `thrust::detail::contiguous_iterator_raw_pointer_cast` HOT 5
- Add tests for thrust::optional
- [FEA]: Add CI check for unqualified uses of `cuda::` namespace
- [BUG]: Thrust's OpenMP `unique_by_key` fails with large inputs/outputs.
- [FEA]: Upgrade Catch2 in CUB to version 3 HOT 1
- [DOC]: concepts library appears twice in TOC and is out of place (and ranges library page is missing)
- [BUG]: Intermittent wrong output from thrust::remove_if under heavy GPU loading HOT 8
- [BUG]: MSVC < 2022 doesn't properly handle thrust's member function detector.
- [BUG]: PTXAS emits advisory regarding cp.async.bulk.*.multicast use on sm_90
- [FEA]: Add support for SM_100 and SM_100a in <nv/target>
- Port Thrust docs to use Sphinx
- [DOC]: CUB namespace documentation includes unrelated macro doc
- Rewrite alias declarations from `typedef` to `using`
- Specify qualifier order in `.clang-format`
- CUB's NVTX ranges fail to compile when usercode uses explicitly versioned NVTX API
- [FEA]: Move support standard versions in matrix.yaml to per-compiler YAML anchors HOT 2
- Port `thrust::merge` to CUB
- CUB histogram API signatures are misleading
- CUB fails to build when __CUDA_NO_HALF_OPERATORS__ is defined. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cccl.