1 #ifndef DASH__LIST__GLOB_LIST_ITER_H__INCLUDED 2 #define DASH__LIST__GLOB_LIST_ITER_H__INCLUDED 4 #include <dash/GlobPtr.h> 5 #include <dash/GlobRef.h> 7 #include <dash/list/internal/ListTypes.h> 23 class PointerType = GlobPtr<ElementType, GlobMemType>,
24 class ReferenceType = GlobRef<ElementType> >
26 :
public std::iterator<
27 std::bidirectional_iterator_tag,
29 dash::default_index_t,
42 typedef ElementType value_type;
43 typedef ReferenceType reference;
44 typedef const ReferenceType const_reference;
45 typedef PointerType pointer;
46 typedef const PointerType const_pointer;
48 typedef typename GlobMemType::local_pointer local_pointer;
50 typedef internal::ListNode<value_type> node_type;
53 typedef std::integral_constant<bool, false> has_view;
71 DASH_LOG_TRACE(
"GlobListIter(gmem,node,pat)");
78 const self_t & other) =
default;
84 const self_t & other) =
default;
91 operator pointer()
const 105 return reference(
this);
170 self_t result = *
this;
189 self_t result = *
this;
199 return _node == other._node;
207 return _node != other._node;
222 GlobMemType * _globmem{};
224 node_type * _node =
nullptr;
232 #endif // DASH__LIST__GLOB_LIST_ITER_H__INCLUDED self_t operator--(int)
Postfix decrement operator.
This class is a simple memory pool which holds allocates elements of size ValueType.
self_t & operator=(const self_t &other)=default
Assignment operator.
const_reference operator*() const
Dereference operator.
constexpr bool is_relative() const noexcept
Whether the iterator's position is relative to a view.
bool operator!=(const self_t &other) const
Inequality comparison operator.
const GlobMemType & globmem() const
The instance of GlobStaticMem used by this iterator to resolve addresses in global memory...
self_t operator++(int)
Postfix increment operator.
GlobListIter()=default
Default constructor.
self_t & operator--()
Prefix decrement operator.
GlobListIter(GlobMemType *gmem, node_type &node)
Constructor, creates a global iterator on a dash::List instance.
A Team instance specifies a subset of all available units.
GlobMemType & globmem()
The instance of GlobStaticMem used by this iterator to resolve addresses in global memory...
Bi-directional global iterator on elements of a dash::List instance.
self_t & operator++()
Prefix increment operator.
reference operator*()
Dereference operator.
struct dash::unit_id< dash::local_unit, dart_team_unit_t > team_unit_t
Unit ID to use for team-local IDs.
self_t global() const
Map iterator to global index domain.
bool operator==(const self_t &other) const
Equality comparison operator.