rocPRIM
Namespaces | Classes | Functions
Iteratormodule
Collaboration diagram for Iteratormodule:

Namespaces

 detail
 Deprecated: Configuration of device-level scan primitives.
 

Classes

class  arg_index_iterator< InputIterator, Difference, InputValueType >
 A random-access input (read-only) iterator adaptor for pairing dereferenced values with their indices. More...
 
class  constant_iterator< ValueType, Difference >
 A random-access input (read-only) iterator which generates a sequence of homogeneous values. More...
 
class  counting_iterator< Incrementable, Difference >
 A random-access input (read-only) iterator over a sequence of consecutive integer values. More...
 
class  discard_iterator
 A random-access iterator which discards values assigned to it upon dereference. More...
 
class  reverse_iterator< SourceIterator >
 A reverse iterator is an iterator adaptor that reverses the direction of a wrapped iterator. More...
 
class  texture_cache_iterator< T, Difference >
 A random-access input (read-only) iterator adaptor for dereferencing array values through texture cache. More...
 
class  transform_iterator< InputIterator, UnaryFunction, ValueType >
 A random-access input (read-only) iterator adaptor for transforming dereferenced values. More...
 
class  zip_iterator< IteratorTuple >
 TBD. More...
 

Functions

template<class InputIterator , class Difference , class InputValueType >
ROCPRIM_HOST_DEVICE arg_index_iterator< InputIterator, Difference, InputValueType > operator+ (typename arg_index_iterator< InputIterator, Difference, InputValueType >::difference_type distance, const arg_index_iterator< InputIterator, Difference, InputValueType > &iterator)
 
template<class InputIterator , class Difference = std::ptrdiff_t, class InputValueType = typename std::iterator_traits<InputIterator>::value_type>
ROCPRIM_HOST_DEVICE arg_index_iterator< InputIterator, Difference, InputValueType > make_arg_index_iterator (InputIterator iterator, Difference offset=0)
 make_arg_index_iterator creates a arg_index_iterator using iterator as the underlying iterator and offset as the position (index) of iterator in the input range. More...
 
template<class ValueType , class Difference >
ROCPRIM_HOST_DEVICE constant_iterator< ValueType, Difference > operator+ (typename constant_iterator< ValueType, Difference >::difference_type distance, const constant_iterator< ValueType, Difference > &iter)
 
template<class ValueType , class Difference = std::ptrdiff_t>
ROCPRIM_HOST_DEVICE constant_iterator< ValueType, Difference > make_constant_iterator (ValueType value, size_t index=0)
 make_constant_iterator creates a constant_iterator with its initial value set to value. More...
 
template<class Incrementable , class Difference >
ROCPRIM_HOST_DEVICE counting_iterator< Incrementable, Difference > operator+ (typename counting_iterator< Incrementable, Difference >::difference_type distance, const counting_iterator< Incrementable, Difference > &iter)
 
template<class Incrementable , class Difference = std::ptrdiff_t>
ROCPRIM_HOST_DEVICE counting_iterator< Incrementable, Difference > make_counting_iterator (Incrementable value)
 make_counting_iterator creates a counting_iterator with its initial value set to value. More...
 
ROCPRIM_HOST_DEVICE discard_iterator operator+ (typename discard_iterator::difference_type distance, const discard_iterator &iterator)
 
ROCPRIM_HOST_DEVICE discard_iterator make_discard_iterator (size_t index=0)
 make_discard_iterator creates a discard_iterator using optional index parameter index. More...
 
template<class SourceIterator >
ROCPRIM_HOST_DEVICE reverse_iterator< SourceIterator > operator+ (typename reverse_iterator< SourceIterator >::difference_type distance, const reverse_iterator< SourceIterator > &iterator)
 
template<class SourceIterator >
ROCPRIM_HOST_DEVICE reverse_iterator< SourceIterator > make_reverse_iterator (SourceIterator source_iterator)
 make_reverse_iterator creates a reverse_iterator wrapping source_iterator. More...
 
template<class T , class Difference >
ROCPRIM_HOST_DEVICE texture_cache_iterator< T, Difference > operator+ (typename texture_cache_iterator< T, Difference >::difference_type distance, const texture_cache_iterator< T, Difference > &iterator)
 
template<class InputIterator , class UnaryFunction , class ValueType >
ROCPRIM_HOST_DEVICE transform_iterator< InputIterator, UnaryFunction, ValueType > operator+ (typename transform_iterator< InputIterator, UnaryFunction, ValueType >::difference_type distance, const transform_iterator< InputIterator, UnaryFunction, ValueType > &iterator)
 
template<class InputIterator , class UnaryFunction >
ROCPRIM_HOST_DEVICE transform_iterator< InputIterator, UnaryFunction > make_transform_iterator (InputIterator iterator, UnaryFunction transform)
 make_transform_iterator creates a transform_iterator using iterator as the underlying iterator and transform as the unary function. More...
 
template<class IteratorTuple >
ROCPRIM_HOST_DEVICE zip_iterator< IteratorTuple > operator+ (typename zip_iterator< IteratorTuple >::difference_type distance, const zip_iterator< IteratorTuple > &iterator)
 
template<class IteratorTuple >
ROCPRIM_HOST_DEVICE zip_iterator< IteratorTuple > make_zip_iterator (IteratorTuple iterator_tuple)
 make_zip_iterator creates a zip_iterator using iterator_tuple as the underlying tuple of iterator. More...
 

Detailed Description

Function Documentation

◆ make_arg_index_iterator()

template<class InputIterator , class Difference = std::ptrdiff_t, class InputValueType = typename std::iterator_traits<InputIterator>::value_type>
ROCPRIM_HOST_DEVICE arg_index_iterator<InputIterator, Difference, InputValueType> make_arg_index_iterator ( InputIterator  iterator,
Difference  offset = 0 
)
inline

make_arg_index_iterator creates a arg_index_iterator using iterator as the underlying iterator and offset as the position (index) of iterator in the input range.

Template Parameters
InputIterator- type of the underlying random-access input iterator. Must be a random-access iterator.
Difference- type used for identify distance between iterators and as the index type in the output pair type (see value_type in arg_index_iterator).
InputValueType- value type used in the output pair type (see value_type in arg_index_iterator).
Parameters
iteratorinput iterator pointing to the input range.
offsetindex of the iterator in the input range.

◆ make_constant_iterator()

template<class ValueType , class Difference = std::ptrdiff_t>
ROCPRIM_HOST_DEVICE constant_iterator<ValueType, Difference> make_constant_iterator ( ValueType  value,
size_t  index = 0 
)
inline

make_constant_iterator creates a constant_iterator with its initial value set to value.

Template Parameters
ValueType- type of value that can be obtained by dereferencing created iterator.
Difference- a type used for identify distance between constant_iterator iterators.
Parameters
value- initial value for constant_iterator.
index- optional index for constant_iterator.

◆ make_counting_iterator()

template<class Incrementable , class Difference = std::ptrdiff_t>
ROCPRIM_HOST_DEVICE counting_iterator<Incrementable, Difference> make_counting_iterator ( Incrementable  value)
inline

make_counting_iterator creates a counting_iterator with its initial value set to value.

Template Parameters
Incrementable- type of value that can be obtained by dereferencing created iterator.
Difference- a type used for identify distance between counting_iterator iterators.
Parameters
value- initial value for counting_iterator.

◆ make_discard_iterator()

ROCPRIM_HOST_DEVICE discard_iterator make_discard_iterator ( size_t  index = 0)
inline

make_discard_iterator creates a discard_iterator using optional index parameter index.

Parameters
index- optional index of discard iterator (default = 0).
Returns
A new discard_iterator object.

◆ make_reverse_iterator()

template<class SourceIterator >
ROCPRIM_HOST_DEVICE reverse_iterator<SourceIterator> make_reverse_iterator ( SourceIterator  source_iterator)

make_reverse_iterator creates a reverse_iterator wrapping source_iterator.

Template Parameters
SourceIterator- type of source_iterator.
Parameters
source_iterator- the iterator to wrap in the created reverse_iterator.
Returns
A reverse_iterator that wraps source_iterator.

◆ make_transform_iterator()

template<class InputIterator , class UnaryFunction >
ROCPRIM_HOST_DEVICE transform_iterator<InputIterator, UnaryFunction> make_transform_iterator ( InputIterator  iterator,
UnaryFunction  transform 
)
inline

make_transform_iterator creates a transform_iterator using iterator as the underlying iterator and transform as the unary function.

Template Parameters
InputIterator- type of the underlying random-access input iterator.
UnaryFunction- type of the transform functor.
Parameters
iterator- input iterator.
transform- transform functor to use in created transform_iterator.
Returns
A new transform_iterator object which transforms the range pointed by iterator using transform functor.

◆ make_zip_iterator()

template<class IteratorTuple >
ROCPRIM_HOST_DEVICE zip_iterator<IteratorTuple> make_zip_iterator ( IteratorTuple  iterator_tuple)
inline

make_zip_iterator creates a zip_iterator using iterator_tuple as the underlying tuple of iterator.

Template Parameters
IteratorTuple- iterator tuple type
Parameters
iterator_tuple- tuple of iterators to use
Returns
A new zip_iterator object