45 : m_local_id_ptr(local_id_ptr)
46 , m_local_id_offset(local_id_offset)
52 typedef std::random_access_iterator_tag iterator_category;
62 constexpr ARCCORE_HOST_DEVICE Int32 operator*()
const {
return m_local_id_offset + (*m_local_id_ptr); }
64 constexpr ARCCORE_HOST_DEVICE ThatClass& operator++()
69 constexpr ARCCORE_HOST_DEVICE ThatClass& operator--()
74 constexpr ARCCORE_HOST_DEVICE
void operator+=(
difference_type v) { m_local_id_ptr += v; }
75 constexpr ARCCORE_HOST_DEVICE
void operator-=(
difference_type v) { m_local_id_ptr -= v; }
76 constexpr ARCCORE_HOST_DEVICE
difference_type operator-(
const ThatClass& b)
const
78 return this->m_local_id_ptr - b.m_local_id_ptr;
80 constexpr ARCCORE_HOST_DEVICE
friend ThatClass operator-(
const ThatClass& a,
difference_type v)
82 const Int32* ptr = a.m_local_id_ptr - v;
83 return ThatClass(ptr, a.m_local_id_offset);
85 constexpr ARCCORE_HOST_DEVICE
friend ThatClass operator+(
const ThatClass& a,
difference_type v)
87 const Int32* ptr = a.m_local_id_ptr + v;
88 return ThatClass(ptr, a.m_local_id_offset);
90 constexpr ARCCORE_HOST_DEVICE
friend bool operator<(
const ThatClass& lhs,
const ThatClass& rhs)
92 return lhs.m_local_id_ptr <= rhs.m_local_id_ptr;
97 return lhs.m_local_id_ptr == rhs.m_local_id_ptr;
99 constexpr ARCCORE_HOST_DEVICE
friend bool operator!=(
const ThatClass& lhs,
const ThatClass& rhs)
101 return !(lhs == rhs);
106 const Int32* m_local_id_ptr;
107 Int32 m_local_id_offset = 0;
131 using value_type = LocalIdType;
135 constexpr ARCCORE_HOST_DEVICE LocalIdType operator*()
const
137 return LocalIdType(m_local_id_offset + (*m_local_id_ptr));
140 constexpr ARCCORE_HOST_DEVICE
ThatClass& operator++()
145 constexpr ARCCORE_HOST_DEVICE
ThatClass& operator--()
152 return this->m_local_id_ptr - b.m_local_id_ptr;
156 const Int32* ptr = a.m_local_id_ptr - v;
157 return ThatClass(ptr, a.m_local_id_offset);
161 const Int32* ptr = a.m_local_id_ptr + v;
162 return ThatClass(ptr, a.m_local_id_offset);
231 friend mesh::IndexedItemConnectivityAccessor;
232 friend ArcaneTest::MeshUnitTest;
241 using SentinelType = const_iterator;
249 constexpr ARCCORE_HOST_DEVICE
ItemLocalIdListViewT(
const Int32* ids, Int32 s, Int32 local_id_offset)
258 constexpr ARCCORE_HOST_DEVICE LocalIdType operator[](Int32 i)
const {
return LocalIdType(localId(i)); }
260 constexpr ARCCORE_HOST_DEVICE const_iterator begin()
const
262 return const_iterator(m_local_ids, m_local_id_offset);
264 constexpr ARCCORE_HOST_DEVICE SentinelType end()
const
266 return endIterator();
268 constexpr ARCCORE_HOST_DEVICE const_iterator endIterator()
const
270 return const_iterator(m_local_ids + m_size, m_local_id_offset);