10#include "vecmem/utils/types.hpp"
15template <
typename Iterator>
19template <
typename Iterator>
24template <
typename Iterator>
27 : m_current(parent.m_current) {}
29template <
typename Iterator>
33 : m_current(parent.base()) {}
35template <
typename Iterator>
45 m_current =
rhs.m_current;
51template <
typename Iterator>
58template <
typename Iterator>
66template <
typename Iterator>
71 return to_pointer(--
tmp);
74template <
typename Iterator>
81template <
typename Iterator>
89template <
typename Iterator>
98template <
typename Iterator>
106template <
typename Iterator>
115template <
typename Iterator>
122template <
typename Iterator>
130template <
typename Iterator>
137template <
typename Iterator>
145template <
typename Iterator>
152template <
typename Iterator>
155reverse_iterator<Iterator>::to_pointer(
T itr) {
157 return itr.operator->();
160template <
typename T1,
typename T2>
164 return (
itr1.base() ==
itr2.base());
167template <
typename T1,
typename T2>
Type mimicking std::reverse_iterator.
Definition reverse_iterator.hpp:25
VECMEM_HOST_AND_DEVICE reverse_iterator & operator--()
Increment the underlying iterator (with '–' as a prefix)
Definition reverse_iterator.ipp:100
std::iterator_traits< iterator_type >::pointer pointer
Pointer type to the underlying value.
Definition reverse_iterator.hpp:39
Iterator iterator_type
Type of the forward iterator, being wrapped.
Definition reverse_iterator.hpp:32
VECMEM_HOST_AND_DEVICE reverse_iterator & operator-=(difference_type n)
Increment the underlying iterator by a specific value.
Definition reverse_iterator.ipp:139
VECMEM_HOST_AND_DEVICE reverse_iterator & operator=(const reverse_iterator &rhs)
Copy assignment operator.
Definition reverse_iterator.ipp:37
VECMEM_HOST_AND_DEVICE pointer operator->() const
Use the iterator as a pointer.
Definition reverse_iterator.ipp:68
std::iterator_traits< iterator_type >::reference reference
Reference type to the underlying value.
Definition reverse_iterator.hpp:41
VECMEM_HOST_AND_DEVICE reverse_iterator & operator+=(difference_type n)
Decrement the underlying iterator by a specific value.
Definition reverse_iterator.ipp:124
VECMEM_HOST_AND_DEVICE reverse_iterator & operator++()
Decrement the underlying iterator (with '++' as a prefix)
Definition reverse_iterator.ipp:83
VECMEM_HOST_AND_DEVICE iterator_type base() const
Access the base/forward iterator.
Definition reverse_iterator.ipp:53
std::iterator_traits< iterator_type >::difference_type difference_type
(Pointer) Difference type
Definition reverse_iterator.hpp:37
VECMEM_HOST_AND_DEVICE reverse_iterator()
Default constructor.
Definition reverse_iterator.ipp:16
VECMEM_HOST_AND_DEVICE reverse_iterator operator-(difference_type n) const
Increment the underlying iterator by a specific value.
Definition reverse_iterator.ipp:132
VECMEM_HOST_AND_DEVICE reference operator[](difference_type n) const
Return the value at a specific offset.
Definition reverse_iterator.ipp:76
VECMEM_HOST_AND_DEVICE reference operator*() const
De-reference the iterator.
Definition reverse_iterator.ipp:60
VECMEM_HOST_AND_DEVICE reverse_iterator operator+(difference_type n) const
Decrement the underlying iterator by a specific value.
Definition reverse_iterator.ipp:117
VECMEM_HOST_AND_DEVICE bool operator==(const reverse_iterator< T1 > &itr1, const reverse_iterator< T2 > &itr2)
Comparison operator for reverse iterators.
Definition reverse_iterator.ipp:161
VECMEM_HOST_AND_DEVICE bool operator!=(const reverse_iterator< T1 > &itr1, const reverse_iterator< T2 > &itr2)
Comparison operator for reverse iterators.
Definition reverse_iterator.ipp:168
Main namespace for the vecmem classes/functions.
Definition atomic_ref.hpp:16
std::vector< T, vecmem::polymorphic_allocator< T > > vector
Alias type for vectors with our polymorphic allocator.
Definition vector.hpp:35