1 #ifndef DASH__HVIEW_H_INCLUDED 2 #define DASH__HVIEW_H_INCLUDED 5 #include <dash/pattern/BlockPattern.h> 12 template<
class ContainerType,
int LEVEL>
13 class HIter :
public ContainerType::iterator
21 auto idx = ContainerType::iterator::m_idx;
22 for(; idx < m_pattern.
capacity(); idx++) {
23 auto unit = m_pattern.
unit_at(idx);
28 ContainerType::iterator::m_idx = idx;
34 typename ContainerType::iterator it,
37 : ContainerType::iterator(it),
43 ContainerType::iterator::m_idx++;
48 template<
class ContainerType,
int LEVEL>
52 typedef typename ContainerType::iterator iterator;
53 typedef typename ContainerType::value_type value_type;
56 ContainerType & m_container;
84 HView(ContainerType& cont)
86 m_subteam(cont.team().sub(LEVEL)),
87 m_pat(cont.pattern()),
88 m_begin(find_begin()),
101 template<
class ContainerType>
104 typedef typename ContainerType::iterator iterator;
105 typedef typename ContainerType::value_type value_type;
109 ContainerType & m_container;
113 HView(ContainerType& cont)
115 m_subteam(cont.team()),
116 m_pat(cont.pattern()) {
119 value_type*
begin() {
120 return m_container.lbegin();
124 return m_container.lend();
constexpr IndexType capacity() const noexcept
The maximum number of elements arranged in this pattern.
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())
A Team instance specifies a subset of all available units.
team_unit_t unit_at(const std::array< IndexType, NumDimensions > &coords, const ViewSpec_t &viewspec) const
unit_at
bool is_member(global_unit_t global_unit_id) const
Whether the group associated with this Team instance contains the unit specified by global id...