Coder Social home page Coder Social logo

Comments (5)

jrhemstad avatar jrhemstad commented on May 22, 2024 6

@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.

henryiii avatar henryiii commented on May 22, 2024

I think it only exists as an example: https://github.com/thrust/thrust/blob/master/examples/strided_range.cu

from cccl.

cdeterman avatar cdeterman commented on May 22, 2024

@henryiii thanks, I wonder why it hasn't been formally added in to thrust. Any additional thoughts regarding the 'padding' problem?

from cccl.

brycelelbach avatar brycelelbach commented on May 22, 2024

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.

jrhemstad avatar jrhemstad commented on May 22, 2024

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1899r0.pdf

Equivalent for ranges.

from cccl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.