|
opm-simulators
|
Iterator class to make GpuViews more similar to std containers. More...
#include <GpuView.hpp>
Public Types | |
| using | iterator_category = std::forward_iterator_tag |
| using | difference_type = std::ptrdiff_t |
| using | value_type = T |
| using | pointer = T* |
| using | reference = T& |
Public Member Functions | |
| __host__ __device__ | iterator (T *ptr) |
| Create iterator from a pointer. | |
| __host__ __device__ reference | operator* () const |
| Dereference operator. | |
| __host__ __device__ iterator & | operator++ () |
| Pre-increment operator. | |
| __host__ __device__ iterator | operator++ (int) |
| Post-increment operator. | |
| __host__ __device__ iterator & | operator-- () |
| Pre-decrement operator. | |
| __host__ __device__ iterator | operator-- (int) |
| Post-decrement operator. | |
| __host__ __device__ bool | operator!= (const iterator &other) const |
| Inequality comparison operator. | |
| __host__ __device__ bool | operator== (const iterator &other) const |
| Inequality comparison operator. | |
| __host__ __device__ difference_type | operator- (const iterator &other) const |
| subtraction operator | |
| __host__ __device__ iterator | operator- (difference_type n) const |
| Subtraction of given number of elements from iterator. | |
| __host__ __device__ iterator | operator+ (difference_type n) const |
| Addition operator with diffptr. | |
| __host__ __device__ bool | operator< (const iterator &other) const |
| Less than comparison. | |
| __host__ __device__ bool | operator> (const iterator &other) const |
| Greater than comparison. | |
Iterator class to make GpuViews more similar to std containers.
|
inline |
Create iterator from a pointer.
| ptr | provided pointer that will become an iterator |
|
inline |
Inequality comparison operator.
|
inline |
Dereference operator.
|
inline |
Addition operator with diffptr.
| n | diffptr to add |
|
inline |
Pre-increment operator.
|
inline |
Post-increment operator.
| no | parameter, int is placeholder for c++ implementation to differentiate from pre-increment |
|
inline |
subtraction operator
| other | iterator to subtract |
|
inline |
Subtraction of given number of elements from iterator.
| n | the number of elements to step backwards |
|
inline |
Pre-decrement operator.
|
inline |
Post-decrement operator.
| no | parameter, int is placeholder for c++ implementation to differentiate from pre-decrement |
|
inline |
Less than comparison.
| other | iterator |
|
inline |
Inequality comparison operator.
|
inline |
Greater than comparison.
| other | iterator |