12#ifndef ARCANE_MATERIALS_MATCONCURRENCY_H
13#define ARCANE_MATERIALS_MATCONCURRENCY_H
18#include "arcane/utils/RangeFunctor.h"
19#include "arcane/utils/FatalErrorException.h"
23#include "arcane/materials/MatItemEnumerator.h"
24#include "arcane/materials/ComponentItemVectorView.h"
41template <
typename ViewType,
typename LambdaType>
42class LambdaMatItemRangeFunctorT
47 LambdaMatItemRangeFunctorT(ViewType items_view,
const LambdaType& lambda_function)
49 , m_lambda_function(lambda_function)
57 ViewType sub_view(m_items._subView(begin, size));
58 m_lambda_function(sub_view);
64 const LambdaType& m_lambda_function;
87template <
typename LambdaType>
inline void
99template <
typename LambdaType>
inline void
101 const LambdaType& lambda_function)
112template <
typename LambdaType>
inline void
124template <
typename LambdaType>
inline void
126 const LambdaType& lambda_function)
137template <
typename LambdaType>
inline void
149template <
typename LambdaType>
inline void
151 const LambdaType& lambda_function)
164using namespace Arcane;
171template <
typename LambdaType>
inline void
182template <
typename LambdaType>
inline void
184 const LambdaType& lambda_function)
194template <
typename LambdaType>
inline void
205template <
typename LambdaType>
inline void
207 const LambdaType& lambda_function)
217template <
typename LambdaType>
inline void
228template <
typename LambdaType>
inline void
230 const LambdaType& lambda_function)
Classes, Types, and macros for managing concurrency.
Declarations of types used in Arcane.
Interface of a functor on an iteration interval.
View over a vector of entities of a component.
Integer nbItem() const
Number of entities in the view.
View over a vector of entities of an environment.
Functor over an iteration interval instantiated via a lambda function.
virtual void executeFunctor(Integer begin, Integer size)
Executes the associated method.
View over a vector of entities of a material.
Execution options for a parallel loop in multi-threading.
static void executeParallelFor(Integer begin, Integer size, const ParallelLoopOptions &options, IRangeFunctor *f)
Executes the functor f in parallel.
void arcaneParallelForeach(const ItemVectorView &items_view, const ForLoopRunInfo &run_info, InstanceType *instance, void(InstanceType::*function)(ItemVectorViewT< ItemType > items))
Applies the method function of the instance instance concurrently on the view items_view with the opt...
Always enables tracing in Arcane parts concerning materials.
Concurrency implementation.
void Foreach(const ItemVectorView &items_view, const ParallelLoopOptions &options, InstanceType *instance, void(InstanceType::*function)(ItemVectorViewT< ItemType > items))
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Int32 Integer
Type representing an integer.
Set of classes ensuring the management of materials and media.