A random-access input wrapper for pairing dereferenced values with their corresponding indices (forming KeyValuePair
tuples).
More...
A random-access input wrapper for pairing dereferenced values with their corresponding indices (forming KeyValuePair
tuples).
itr
of type InputIteratorT
. Dereferencing an ArgIndexInputIteratorTat offset i
produces a KeyValuePair
value whose key
field is i
and whose value
field is itr[i]
.ArgIndexInputIteratorTto
dereference an array of doubles InputIteratorT | The value type of the wrapped input iterator |
OffsetT | The difference type of this iterator (Default: ptrdiff_t ) |
OutputValueT | The paired value type of the <offset,value> tuple (Default: value type of input iterator) |
Definition at line 113 of file arg_index_input_iterator.cuh.
Public Types | |
typedef ArgIndexInputIterator | self_type |
My own type. | |
typedef OffsetT | difference_type |
Type to express the result of subtracting one iterator from another. | |
typedef KeyValuePair< difference_type, OutputValueT > | value_type |
The type of the element the iterator can point to. | |
typedef value_type * | pointer |
The type of a pointer to an element the iterator can point to. | |
typedef value_type | reference |
The type of a reference to an element the iterator can point to. | |
typedef std::random_access_iterator_tag | iterator_category |
The iterator category. | |
Public Member Functions | |
__host__ __device__ __forceinline__ | ArgIndexInputIterator (InputIteratorT itr, difference_type offset=0) |
Constructor. | |
__host__ __device__ __forceinline__ self_type | operator++ (int) |
Postfix increment. | |
__host__ __device__ __forceinline__ self_type | operator++ () |
Prefix increment. | |
__host__ __device__ __forceinline__ reference | operator* () const |
Indirection. | |
template<typename Distance > | |
__host__ __device__ __forceinline__ self_type | operator+ (Distance n) const |
Addition. | |
template<typename Distance > | |
__host__ __device__ __forceinline__ self_type & | operator+= (Distance n) |
Addition assignment. | |
template<typename Distance > | |
__host__ __device__ __forceinline__ self_type | operator- (Distance n) const |
Subtraction. | |
template<typename Distance > | |
__host__ __device__ __forceinline__ self_type & | operator-= (Distance n) |
Subtraction assignment. | |
__host__ __device__ __forceinline__ difference_type | operator- (self_type other) const |
Distance. | |
template<typename Distance > | |
__host__ __device__ __forceinline__ reference | operator[] (Distance n) const |
Array subscript. | |
__host__ __device__ __forceinline__ pointer | operator-> () |
Structure dereference. | |
__host__ __device__ __forceinline__ bool | operator== (const self_type &rhs) |
Equal to. | |
__host__ __device__ __forceinline__ bool | operator!= (const self_type &rhs) |
Not equal to. | |
__host__ __device__ __forceinline__ void | normalize () |
Normalize. | |
Private Attributes | |
InputIteratorT | itr |
difference_type | offset |
Friends | |
std::ostream & | operator<< (std::ostream &os, const self_type &) |
ostream operator | |
typedef OffsetT cub::ArgIndexInputIterator< InputIteratorT, OffsetT, OutputValueT >::difference_type |
Type to express the result of subtracting one iterator from another.
Definition at line 119 of file arg_index_input_iterator.cuh.
typedef std::random_access_iterator_tag cub::ArgIndexInputIterator< InputIteratorT, OffsetT, OutputValueT >::iterator_category |
The iterator category.
Definition at line 133 of file arg_index_input_iterator.cuh.
typedef value_type* cub::ArgIndexInputIterator< InputIteratorT, OffsetT, OutputValueT >::pointer |
The type of a pointer to an element the iterator can point to.
Definition at line 121 of file arg_index_input_iterator.cuh.
typedef value_type cub::ArgIndexInputIterator< InputIteratorT, OffsetT, OutputValueT >::reference |
The type of a reference to an element the iterator can point to.
Definition at line 122 of file arg_index_input_iterator.cuh.
typedef ArgIndexInputIterator cub::ArgIndexInputIterator< InputIteratorT, OffsetT, OutputValueT >::self_type |
My own type.
Definition at line 118 of file arg_index_input_iterator.cuh.
typedef KeyValuePair<difference_type, OutputValueT> cub::ArgIndexInputIterator< InputIteratorT, OffsetT, OutputValueT >::value_type |
The type of the element the iterator can point to.
Definition at line 120 of file arg_index_input_iterator.cuh.
|
inline |
Constructor.
itr | Input iterator to wrap |
offset | OffsetT (in items) from itr denoting the position of the iterator |
Definition at line 144 of file arg_index_input_iterator.cuh.
|
inline |
Normalize.
Definition at line 241 of file arg_index_input_iterator.cuh.
|
inline |
Not equal to.
Definition at line 235 of file arg_index_input_iterator.cuh.
|
inline |
Indirection.
Definition at line 168 of file arg_index_input_iterator.cuh.
|
inline |
Addition.
Definition at line 178 of file arg_index_input_iterator.cuh.
|
inline |
Prefix increment.
Definition at line 161 of file arg_index_input_iterator.cuh.
|
inline |
Postfix increment.
Definition at line 153 of file arg_index_input_iterator.cuh.
|
inline |
Addition assignment.
Definition at line 186 of file arg_index_input_iterator.cuh.
|
inline |
Subtraction.
Definition at line 194 of file arg_index_input_iterator.cuh.
|
inline |
Distance.
Definition at line 209 of file arg_index_input_iterator.cuh.
|
inline |
Subtraction assignment.
Definition at line 202 of file arg_index_input_iterator.cuh.
|
inline |
Structure dereference.
Definition at line 223 of file arg_index_input_iterator.cuh.
|
inline |
Equal to.
Definition at line 229 of file arg_index_input_iterator.cuh.
|
inline |
Array subscript.
Definition at line 216 of file arg_index_input_iterator.cuh.
|
friend |
ostream operator
Definition at line 248 of file arg_index_input_iterator.cuh.
|
private |
Definition at line 138 of file arg_index_input_iterator.cuh.
|
private |
Definition at line 139 of file arg_index_input_iterator.cuh.