A random-access input (read-only) iterator adaptor for pairing dereferenced values with their indices.
More...
#include <arg_index_iterator.hpp>
|
using | value_type = ::rocprim::key_value_pair< Difference, InputValueType > |
| The type of the value that can be obtained by dereferencing the iterator.
|
|
using | reference = const value_type & |
| A reference type of the type iterated over (value_type ). More...
|
|
using | pointer = const value_type * |
| A pointer type of the type iterated over (value_type ). More...
|
|
using | difference_type = Difference |
| A type used for identify distance between iterators.
|
|
using | iterator_category = std::random_access_iterator_tag |
| The category of the iterator.
|
|
using | self_type = arg_index_iterator |
|
template<class InputIterator, class Difference = std::ptrdiff_t, class InputValueType = typename std::iterator_traits<InputIterator>::value_type>
class arg_index_iterator< InputIterator, Difference, InputValueType >
A random-access input (read-only) iterator adaptor for pairing dereferenced values with their indices.
- Overview
- Dereferencing arg_index_iterator return a value of
key_value_pair<Difference, InputValueType>
type, which includes value from the underlying range and its index in that range.
std::iterator_traits<InputIterator>::value_type
should be convertible to InputValueType
.
- 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 ). |
InputValueType | - value type used in the output pair type (see value_type ). |
◆ pointer
template<class InputIterator, class Difference = std::ptrdiff_t, class InputValueType = typename std::iterator_traits<InputIterator>::value_type>
A pointer type of the type iterated over (value_type
).
It's const
since arg_index_iterator is a read-only iterator.
◆ reference
template<class InputIterator, class Difference = std::ptrdiff_t, class InputValueType = typename std::iterator_traits<InputIterator>::value_type>
A reference type of the type iterated over (value_type
).
It's const
since arg_index_iterator is a read-only iterator.
◆ arg_index_iterator()
template<class InputIterator, class Difference = std::ptrdiff_t, class InputValueType = typename std::iterator_traits<InputIterator>::value_type>
Creates a new arg_index_iterator.
- Parameters
-
iterator | input iterator pointing to the input range. |
offset | index of the iterator in the input range. |
The documentation for this class was generated from the following file: