12#ifndef ARCCORE_BASE_PARALLELFOR_H
13#define ARCCORE_BASE_PARALLELFOR_H
17#include "arccore/concurrency/TaskFactory.h"
34class ARCCORE_CONCURRENCY_EXPORT ParallelFor1DLoopInfo
38 using ThatClass = ParallelFor1DLoopInfo;
48 : m_run_info(run_info)
60 m_run_info.addOptions(opts);
65 Int32 beginIndex()
const {
return m_begin; }
66 Int32 size()
const {
return m_size; }
85template <
int RankValue,
typename IndexType_,
typename LambdaType,
typename... ReducerArgs>
inline void
88 const LambdaType& lambda_function,
89 const ReducerArgs&... reducer_args)
109 using Type =
typename std::remove_reference<LambdaType>::type;
110 Type private_lambda(lambda_function);
124template <
int RankValue,
typename IndexType_,
typename LambdaType,
typename... ReducerArgs>
inline void
127 const LambdaType& lambda_function,
128 const ReducerArgs&... reducer_args)
139template <
int RankValue,
typename IndexType_,
typename LambdaType,
typename... ReducerArgs>
inline void
142 const LambdaType& lambda_function,
143 const ReducerArgs&... reducer_args)
155template <
int RankValue,
typename IndexType_,
typename LambdaType,
typename... ReducerArgs>
inline void
158 const LambdaType& lambda_function,
159 const ReducerArgs&... reducer_args)
171template <
int RankValue,
typename IndexType_,
typename LambdaType>
inline void
173 const LambdaType& lambda_function)
185template <
int RankValue,
typename IndexType_,
typename LambdaType>
inline void
187 const LambdaType& lambda_function)
201template <
typename LambdaType>
inline void
203 const LambdaType& lambda_function)
Interval d'itération complexe.
Informations d'exécution d'une boucle.
Interface d'un fonctor sur un interval d'itération.
Fonctor sur un interval d'itération instancié via une lambda fonction.
Fonctor sur un interval d'itération instancié via une lambda fonction.
Caractéristiques d'un boucle 1D multi-thread.
Options d'exécution d'une boucle parallèle en multi-thread.
void setGrainSize(Integer v)
Positionne la taille (approximative) d'un intervalle d'itération.
Interval d'itération simple.
static const ParallelLoopOptions & defaultParallelLoopOptions()
Valeurs par défaut d'exécution d'une boucle parallèle.
static void executeParallelFor(Integer begin, Integer size, const ParallelLoopOptions &options, IRangeFunctor *f)
Exécute le fonctor f en concurrence.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
void arccoreParallelFor(const ComplexForLoopRanges< RankValue, IndexType_ > &loop_ranges, const ForLoopRunInfo &run_info, const LambdaType &lambda_function, const ReducerArgs &... reducer_args)
Applique en concurrence la fonction lambda lambda_function sur l'intervalle d'itération donné par loo...
Int32 Integer
Type représentant un entier.
void arccoreSequentialFor(LoopBoundType< 1, IndexType > bounds, Lambda func, RemainingArgs... remaining_args)
Applique le functor func sur une boucle 1D.
std::int32_t Int32
Type entier signé sur 32 bits.