thrust::make_permutation_iterator

Defined in /home/runner/work/cccl/cccl/thrust/thrust/iterator/permutation_iterator.h

template<typename ElementIterator, typename IndexIterator>
permutation_iterator<ElementIterator, IndexIterator> thrust::make_permutation_iterator(ElementIterator e, IndexIterator i)

make_permutation_iterator creates a permutation_iterator from an ElementIterator pointing to a range of elements to “permute” and an IndexIterator pointing to a range of indices defining an indexing scheme on the values.

Parameters
  • e – An ElementIterator pointing to a range of values.

  • i – An IndexIterator pointing to an indexing scheme to use on e.

Returns

A new permutation_iterator which permutes the range e by i.