1 #ifndef DASH__ITERATOR_H__INCLUDED 2 #define DASH__ITERATOR_H__INCLUDED 4 #include <dash/Types.h> 5 #include <dash/Dimensional.h> 6 #include <dash/iterator/IteratorTraits.h> 7 #include <dash/iterator/GlobIter.h> 8 #include <dash/iterator/GlobViewIter.h> 57 template <
class IndexType>
58 constexpr
typename std::enable_if<
59 std::is_integral<IndexType>::value, IndexType >::type
77 template <
class Iterator>
78 constexpr
auto index(Iterator it) -> decltype((++it).gpos()) {
88 template <
class RandomAccessIt>
89 typename RandomAccessIt::difference_type
91 const RandomAccessIt &
first,
92 const RandomAccessIt & last)
124 typename ElementType,
129 typename Pattern::index_type
142 typename ElementType,
155 return lhs.pos() - rhs.pos();
177 constexpr
typename std::enable_if<
178 std::is_integral<OffsetType>::value,
183 return (end - begin);
188 #endif // DASH__ITERATOR_H__INCLUDED constexpr std::enable_if< std::is_integral< IndexType >::value, IndexType >::type index(IndexType idx)
constexpr auto end(RangeType &&range) -> decltype(std::forward< RangeType >(range).end())
This class is a simple memory pool which holds allocates elements of size ValueType.
constexpr auto begin(RangeType &&range) -> decltype(std::forward< RangeType >(range).begin())
dash::BlockPattern< NumDimensions, Arrangement, IndexType > Pattern
Template alias for dash::Pattern with the same default template arguments.
DASH_CONSTEXPR auto operator-(const GlobIter< ElementType, Pattern, GlobMemType, Pointer, Reference > &lhs, const GlobIter< ElementType, Pattern, GlobMemType, Pointer, Reference > &rhs) DASH_NOEXCEPT
Iterator on Partitioned Global Address Space.
constexpr std::enable_if< std::is_integral< OffsetType >::value, OffsetType >::type distance(OffsetType begin, OffsetType end)
dash::gptrdiff_t distance(GlobPtr< T, MemSpaceT > gbegin, GlobPtr< T, MemSpaceT > gend)
Returns the number of hops from gbegin to gend.