vecmem 1.14.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
vecmem::details::reverse_iterator< Iterator > Class Template Reference

Type mimicking std::reverse_iterator. More...

#include <vecmem/containers/details/reverse_iterator.hpp>

Public Types

Type definitions, mimicking @c std::reverse_iterator
typedef Iterator iterator_type
 Type of the forward iterator, being wrapped.
 
typedef std::iterator_traits< iterator_type >::value_type value_type
 Value type being iterated on.
 
typedef std::iterator_traits< iterator_type >::difference_type difference_type
 (Pointer) Difference type
 
typedef std::iterator_traits< iterator_type >::pointer pointer
 Pointer type to the underlying value.
 
typedef std::iterator_traits< iterator_type >::reference reference
 Reference type to the underlying value.
 

Public Member Functions

VECMEM_HOST_AND_DEVICE reverse_iterator ()
 Default constructor.
 
VECMEM_HOST_AND_DEVICE reverse_iterator (iterator_type itr)
 Constructor, from a forward iterator.
 
VECMEM_HOST_AND_DEVICE reverse_iterator (const reverse_iterator &parent)
 Copy constructor.
 
template<typename T >
VECMEM_HOST_AND_DEVICE reverse_iterator (const reverse_iterator< T > &parent)
 Copy constructor.
 
VECMEM_HOST_AND_DEVICE reverse_iteratoroperator= (const reverse_iterator &rhs)
 Copy assignment operator.
 
VECMEM_HOST_AND_DEVICE iterator_type base () const
 Access the base/forward iterator.
 
Value accessor operators
VECMEM_HOST_AND_DEVICE reference operator* () const
 De-reference the iterator.
 
VECMEM_HOST_AND_DEVICE pointer operator-> () const
 Use the iterator as a pointer.
 
VECMEM_HOST_AND_DEVICE reference operator[] (difference_type n) const
 Return the value at a specific offset.
 
Iterator updating operators
VECMEM_HOST_AND_DEVICE reverse_iteratoroperator++ ()
 Decrement the underlying iterator (with '++' as a prefix)
 
VECMEM_HOST_AND_DEVICE reverse_iterator operator++ (int)
 Decrement the underlying iterator (wuth '++' as a postfix)
 
VECMEM_HOST_AND_DEVICE reverse_iteratoroperator-- ()
 Increment the underlying iterator (with '–' as a prefix)
 
VECMEM_HOST_AND_DEVICE reverse_iterator operator-- (int)
 Increment the underlying iterator (with '–' as a postfix)
 
VECMEM_HOST_AND_DEVICE reverse_iterator operator+ (difference_type n) const
 Decrement the underlying iterator by a specific value.
 
VECMEM_HOST_AND_DEVICE reverse_iteratoroperator+= (difference_type n)
 Decrement the underlying iterator by a specific value.
 
VECMEM_HOST_AND_DEVICE reverse_iterator operator- (difference_type n) const
 Increment the underlying iterator by a specific value.
 
VECMEM_HOST_AND_DEVICE reverse_iteratoroperator-= (difference_type n)
 Increment the underlying iterator by a specific value.
 

Detailed Description

template<typename Iterator>
class vecmem::details::reverse_iterator< Iterator >

Type mimicking std::reverse_iterator.

It behaves and is implemented basically in the same way as std::reverse_iterator. The only reason why it needs to exist is to make it possible to be used from device code. (The STL type can not be.)


The documentation for this class was generated from the following files: