12#ifndef ARCANE_CORE_ITEMLOOP_H
13#define ARCANE_CORE_ITEMLOOP_H
46 template <
typename IterType,
typename Lambda>
inline void
51 bool is_contigous = view.
indexes().isContigous();
57 for (
Int32 i = 0, n = view.
size(); i < n; ++i)
58 lambda(IterType(x0 + i));
62 lambda(IterType(iitem.localId()));
70 template <
typename ItemType>
75 typedef typename ItemType::Index IterType;
78 typedef ItemLoopFunctor<ItemType> ThatClass;
88 static ThatClass create(
const ItemGroupType& items)
90 return ThatClass(items.
view());
92 static ThatClass create(VectorViewType items)
94 return ThatClass(items);
99 template <
typename Lambda>
100 void operator<<(Lambda&& lambda)
151#define ENUMERATE_ITEM_LAMBDA(item_type, iter, container) \
152 Arcane::Loop::ItemLoopFunctor##item_type ::create((container)) << [=](Arcane::Loop::ItemLoopFunctor##item_type ::IterType iter)
Reference to a group of a given kind.
ItemVectorView view() const
View of the group entities.
View on a typed array of entities.
View on a vector of entities.
Int32 size() const
Number of elements in the vector.
ItemIndexArrayView indexes() const
View on the array of indices.
Int32ConstArrayView localIds() const
Array of local IDs of entities.
Template class to encapsulate a loop over entities.
Namespace containing various classes managing loops over entities.
void _InternalSimpleItemLoop(ItemVectorView view, const Lambda &lambda)
Entity loop functor that allows for the removal of indirections if the local indices of a view are co...
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
std::int32_t Int32
Signed integer type of 32 bits.