Skip to content
This repository was archived by the owner on Mar 21, 2024. It is now read-only.
This repository was archived by the owner on Mar 21, 2024. It is now read-only.

Potentially interpret tuple as an index type in zip_iterator #70

Closed as not planned

Description

@jaredhoberock

z_iter[(i,j,k)] could potentially make sense if the tuple is the right size and the element types are each convertible to zip_iterator::difference_type

Comment 1 by andrew.corrigan, Sep 16, 2011
I implemented a new iterator called multi_permutation_iterator [1]. It is a new iterator which is like a permutation_iterator but with tuple-valued indexes, and thus dereferences to produce tuples of values from ElementIterator, as opposed to a single value like permutation_iterator. This implements the functionality I described last year, which led to this issue being opened. [2]

As compared to a combination of zip_iterator and multiple permutation_iterators, this new iterator has the advantage of only using one ElementIterator, which can reduce register usage and also parameter size (and thus avoid launch_closure_by_pointer and its memory allocation and copy). This has already helped speed up my code quite a bit, where so far I use it to implement non-contiguous, coalesced multi-dimensional arrays. This multi_permutation_iterator should also help others implement things like finite-difference stencils without excessive register usage, as discussed in [3].

[1] https://code.google.com/r/andrewcorrigan-thrust/source/detail?r=22958c2f47c02cb1a67d8e5c2ad1f788da99f7ac
[2] http://groups.google.com/group/thrust-users/browse_thread/thread/d76e6f7d6206790e/1a7a307e843241f7
[3] http://groups.google.com/group/thrust-users/browse_thread/thread/853579a9bccff08c/33c67c39e7e380a1

Forwarded from http://code.google.com/p/thrust/issues/detail?id=205

Activity

  1. added a commit that references this issue on Mar 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3: backlogthrusttype: enhancement

    Type

    No type

    Projects

    • Status
      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions