12#ifndef ARCCORE_BASE_PARALLELFOR_H
13#define ARCCORE_BASE_PARALLELFOR_H
17#include "arccore/concurrency/TaskFactory.h"
33class ARCCORE_CONCURRENCY_EXPORT ParallelFor1DLoopInfo
37 using ThatClass = ParallelFor1DLoopInfo;
47 : m_run_info(run_info)
59 m_run_info.addOptions(opts);
64 Int32 beginIndex()
const {
return m_begin; }
65 Int32 size()
const {
return m_size; }
84template <
int RankValue,
typename LambdaType,
typename... ReducerArgs>
inline void
87 const LambdaType& lambda_function,
88 const ReducerArgs&... reducer_args)
101 using Type =
typename std::remove_reference<LambdaType>::type;
102 Type private_lambda(lambda_function);
115template <
int RankValue,
typename LambdaType,
typename... ReducerArgs>
inline void
118 const LambdaType& lambda_function,
119 const ReducerArgs&... reducer_args)
130template <
int RankValue,
typename LambdaType,
typename... ReducerArgs>
inline void
133 const LambdaType& lambda_function,
134 const ReducerArgs&... reducer_args)
137 arcaneParallelFor(complex_loop_ranges, run_info, lambda_function, reducer_args...);
146template <
int RankValue,
typename LambdaType,
typename... ReducerArgs>
inline void
149 const LambdaType& lambda_function,
150 const ReducerArgs&... reducer_args)
162template <
int RankValue,
typename LambdaType>
inline void
164 const LambdaType& lambda_function)
176template <
int RankValue,
typename LambdaType>
inline void
178 const LambdaType& lambda_function)
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.
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.
void arcaneParallelFor(Integer i0, Integer size, InstanceType *itype, void(InstanceType::*lambda_function)(Integer i0, Integer size))
Applique en concurrence la fonction lambda lambda_function sur l'intervalle d'itération [i0,...
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
void arcaneSequentialFor(LoopBoundType< 1, IndexType > bounds, const Lambda &func, ReducerArgs... reducer_args)
Applique le fonctor func sur une boucle 1D.
void arccoreParallelFor(const ComplexForLoopRanges< RankValue > &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...
std::int32_t Int32
Type entier signé sur 32 bits.