thrust::make_shuffle_iterator

Defined in thrust/iterator/shuffle_iterator.h

template<class IndexType, class URBG>
shuffle_iterator<IndexType> thrust::make_shuffle_iterator(IndexType n, URBG &&g)

make_shuffle_iterator creates a shuffle_iterator from an IndexType and URBG.

See also

shuffle_iterator

Parameters
  • n – The number of elements in the permutation.

  • g – The URBG used to generate the random permutation.

Returns

A new shuffle_iterator which generates a random permutation of the input range.