Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
Concurrency

Set of classes managing concurrency. More...

Classes

class  Arcane::ParallelLoopOptions
 Execution options for a parallel loop in multi-threading. More...
class  Arcane::TaskContext
 Execution context of a task. More...
class  Arcane::ITask
 Interface for a concurrent task. More...
class  Arcane::TaskFactory
 Factory for tasks. More...

Functions

template<typename InstanceType, typename ItemType>
void Arcane::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 options options.
template<typename LambdaType>
void Arcane::arcaneParallelForeach (const ItemVectorView &items_view, const ForLoopRunInfo &run_info, const LambdaType &lambda_function)
 Applies the lambda function lambda_function instance concurrently on the view items_view with the options options.
template<typename InstanceType, typename ItemType>
void Arcane::arcaneParallelForeach (const ItemVectorView &items_view, const ParallelLoopOptions &options, InstanceType *instance, void(InstanceType::*function)(ItemVectorViewT< ItemType > items))
 Applies the method function of the instance instance concurrently on the view items_view with the options options.
template<typename InstanceType, typename ItemType>
void Arcane::arcaneParallelForeach (const ItemGroup &items, const ForLoopRunInfo &run_info, InstanceType *instance, void(InstanceType::*function)(ItemVectorViewT< ItemType > items))
 Applies the method function of the instance instance concurrently on the group items with the options options.
template<typename InstanceType, typename ItemType>
void Arcane::arcaneParallelForeach (const ItemVectorView &items_view, InstanceType *instance, void(InstanceType::*function)(ItemVectorViewT< ItemType > items))
 Applies the method function of the instance instance concurrently on the view items_view.
template<typename InstanceType, typename ItemType>
void Arcane::arcaneParallelForeach (const ItemGroup &items, InstanceType *instance, void(InstanceType::*function)(ItemVectorViewT< ItemType > items))
 Applies the method function of the instance instance concurrently on the group items.
template<typename LambdaType>
void Arcane::arcaneParallelForeach (const ItemVectorView &items_view, const ParallelLoopOptions &options, const LambdaType &lambda_function)
 Applies the lambda function lambda_function instance concurrently on the view items_view with the options options.
template<typename LambdaType>
void Arcane::arcaneParallelForeach (const ItemGroup &items, const ParallelLoopOptions &options, const LambdaType &lambda_function)
 Applies the lambda function lambda_function concurrently on the group items with the options options.
template<typename LambdaType>
void Arcane::arcaneParallelForeach (const ItemVectorView &items_view, const LambdaType &lambda_function)
 Applies the lambda function lambda_function instance concurrently on the view items_view.
template<typename LambdaType>
void Arcane::arcaneParallelForeach (const ItemGroup &items, const LambdaType &lambda_function)
 Applies the lambda function lambda_function concurrently on the group items.
template<typename InstanceType>
void Arcane::arcaneParallelFor (Integer i0, Integer size, InstanceType *itype, void(InstanceType::*lambda_function)(Integer i0, Integer size))
 Applies the lambda function lambda_function concurrently over the iteration range [i0,i0+size].
template<typename LambdaType>
void Arcane::arcaneParallelFor (Integer i0, Integer size, const ForLoopRunInfo &options, const LambdaType &lambda_function)
 Applies the lambda function lambda_function concurrently over the iteration range [i0,i0+size] with the options options.
template<typename LambdaType>
void Arcane::arcaneParallelFor (Integer i0, Integer size, const ParallelLoopOptions &options, const LambdaType &lambda_function)
 Applies the lambda function lambda_function concurrently over the iteration range [i0,i0+size] with the options options.
template<typename LambdaType, typename... Views>
void Arcane::arcaneParallelForVa (const ForLoopRunInfo &run_info, const LambdaType &lambda_function, Views... views)
 Applies the lambda function lambda_function instance concurrently on the container views views with the options options.
template<typename LambdaType>
void Arcane::arcaneParallelForeach (const ComponentItemVectorView &items_view, const LambdaType &lambda_function)
 Applies the lambda function lambda_function instance concurrently on the component view items_view.
template<typename LambdaType>
void Arcane::arcaneParallelForeach (const ComponentItemVectorView &items_view, const ParallelLoopOptions &options, const LambdaType &lambda_function)
 Applies the lambda function lambda_function instance concurrently on the component view items_view with the options options.
template<typename LambdaType>
void Arcane::arcaneParallelForeach (const EnvItemVectorView &items_view, const LambdaType &lambda_function)
 Applies the lambda function lambda_function instance concurrently on the environment view items_view.
template<typename LambdaType>
void Arcane::arcaneParallelForeach (const EnvItemVectorView &items_view, const ParallelLoopOptions &options, const LambdaType &lambda_function)
 Applies the lambda function lambda_function instance concurrently on the environment view items_view with the options options.
template<typename LambdaType>
void Arcane::arcaneParallelForeach (const MatItemVectorView &items_view, const LambdaType &lambda_function)
 Applies the lambda function lambda_function instance concurrently on the material view items_view.
template<typename LambdaType>
void Arcane::arcaneParallelForeach (const MatItemVectorView &items_view, const ParallelLoopOptions &options, const LambdaType &lambda_function)
 Applies the lambda function lambda_function instance concurrently on the material view items_view with the options options.
template<typename LambdaType>
void Arcane::Parallel::Foreach (const ComponentItemVectorView &items_view, const LambdaType &lambda_function)
 Applies the lambda function lambda_function instance concurrently on the component view items_view.
template<typename LambdaType>
void Arcane::Parallel::Foreach (const ComponentItemVectorView &items_view, const ParallelLoopOptions &options, const LambdaType &lambda_function)
 Applies the lambda function lambda_function instance concurrently on the component view items_view with the options options.
template<typename LambdaType>
void Arcane::Parallel::Foreach (const EnvItemVectorView &items_view, const LambdaType &lambda_function)
 Applies the lambda function lambda_function instance concurrently on the environment view items_view.
template<typename LambdaType>
void Arcane::Parallel::Foreach (const EnvItemVectorView &items_view, const ParallelLoopOptions &options, const LambdaType &lambda_function)
 Applies the lambda function lambda_function instance concurrently on the environment view items_view with the options options.
template<typename LambdaType>
void Arcane::Parallel::Foreach (const MatItemVectorView &items_view, const LambdaType &lambda_function)
 Applies the lambda function lambda_function instance concurrently on the material view items_view.
template<typename LambdaType>
void Arcane::Parallel::Foreach (const MatItemVectorView &items_view, const ParallelLoopOptions &options, const LambdaType &lambda_function)
 Applies the lambda function lambda_function instance concurrently on the material view items_view with the options options.

Detailed Description

Set of classes managing concurrency.

For more information, refer to the page Concurrency and Multi-threading

Function Documentation

◆ arcaneParallelFor() [1/3]

template<typename LambdaType>
void Arcane::arcaneParallelFor ( Integer i0,
Integer size,
const ForLoopRunInfo & options,
const LambdaType & lambda_function )
inline

Applies the lambda function lambda_function concurrently over the iteration range [i0,i0+size] with the options options.

Definition at line 217 of file Concurrency.h.

References Arcane::TaskFactory::executeParallelFor().

◆ arcaneParallelFor() [2/3]

template<typename LambdaType>
void Arcane::arcaneParallelFor ( Integer i0,
Integer size,
const ParallelLoopOptions & options,
const LambdaType & lambda_function )
inline

Applies the lambda function lambda_function concurrently over the iteration range [i0,i0+size] with the options options.

Definition at line 231 of file Concurrency.h.

References arcaneParallelFor().

◆ arcaneParallelFor() [3/3]

template<typename InstanceType>
void Arcane::arcaneParallelFor ( Integer i0,
Integer size,
InstanceType * itype,
void(InstanceType::* lambda_function )(Integer i0, Integer size) )
inline

Applies the lambda function lambda_function concurrently over the iteration range [i0,i0+size].

Definition at line 203 of file Concurrency.h.

References Arcane::TaskFactory::executeParallelFor().

Referenced by Arcane::Accelerator::Impl::_applyConstituentCells(), and arcaneParallelFor().

◆ arcaneParallelForeach() [1/16]

template<typename LambdaType>
void Arcane::arcaneParallelForeach ( const ComponentItemVectorView & items_view,
const LambdaType & lambda_function )
inline

Applies the lambda function lambda_function instance concurrently on the component view items_view.

Definition at line 88 of file MatConcurrency.h.

References Arcane::TaskFactory::executeParallelFor(), and Arcane::Materials::ComponentItemVectorView::nbItem().

◆ arcaneParallelForeach() [2/16]

template<typename LambdaType>
void Arcane::arcaneParallelForeach ( const ComponentItemVectorView & items_view,
const ParallelLoopOptions & options,
const LambdaType & lambda_function )
inline

Applies the lambda function lambda_function instance concurrently on the component view items_view with the options options.

Definition at line 100 of file MatConcurrency.h.

References Arcane::TaskFactory::executeParallelFor(), and Arcane::Materials::ComponentItemVectorView::nbItem().

◆ arcaneParallelForeach() [3/16]

template<typename LambdaType>
void Arcane::arcaneParallelForeach ( const EnvItemVectorView & items_view,
const LambdaType & lambda_function )
inline

Applies the lambda function lambda_function instance concurrently on the environment view items_view.

Definition at line 113 of file MatConcurrency.h.

References Arcane::TaskFactory::executeParallelFor(), and Arcane::Materials::ComponentItemVectorView::nbItem().

◆ arcaneParallelForeach() [4/16]

template<typename LambdaType>
void Arcane::arcaneParallelForeach ( const EnvItemVectorView & items_view,
const ParallelLoopOptions & options,
const LambdaType & lambda_function )
inline

Applies the lambda function lambda_function instance concurrently on the environment view items_view with the options options.

Definition at line 125 of file MatConcurrency.h.

References Arcane::TaskFactory::executeParallelFor(), and Arcane::Materials::ComponentItemVectorView::nbItem().

◆ arcaneParallelForeach() [5/16]

template<typename InstanceType, typename ItemType>
void Arcane::arcaneParallelForeach ( const ItemGroup & items,
const ForLoopRunInfo & run_info,
InstanceType * instance,
void(InstanceType::* function )(ItemVectorViewT< ItemType > items) )
inline

Applies the method function of the instance instance concurrently on the group items with the options options.

Definition at line 119 of file Concurrency.h.

References arcaneParallelForeach().

◆ arcaneParallelForeach() [6/16]

template<typename LambdaType>
void Arcane::arcaneParallelForeach ( const ItemGroup & items,
const LambdaType & lambda_function )
inline

Applies the lambda function lambda_function concurrently on the group items.

Definition at line 190 of file Concurrency.h.

References Arcane::ItemGroup::_paddedView(), and arcaneParallelForeach().

◆ arcaneParallelForeach() [7/16]

template<typename LambdaType>
void Arcane::arcaneParallelForeach ( const ItemGroup & items,
const ParallelLoopOptions & options,
const LambdaType & lambda_function )
inline

Applies the lambda function lambda_function concurrently on the group items with the options options.

Definition at line 167 of file Concurrency.h.

References Arcane::ItemGroup::_paddedView(), and arcaneParallelForeach().

◆ arcaneParallelForeach() [8/16]

template<typename InstanceType, typename ItemType>
void Arcane::arcaneParallelForeach ( const ItemGroup & items,
InstanceType * instance,
void(InstanceType::* function )(ItemVectorViewT< ItemType > items) )
inline

Applies the method function of the instance instance concurrently on the group items.

Definition at line 143 of file Concurrency.h.

References arcaneParallelForeach().

◆ arcaneParallelForeach() [9/16]

template<typename LambdaType>
void Arcane::arcaneParallelForeach ( const ItemVectorView & items_view,
const ForLoopRunInfo & run_info,
const LambdaType & lambda_function )
inline

Applies the lambda function lambda_function instance concurrently on the view items_view with the options options.

Definition at line 81 of file Concurrency.h.

References Arcane::AbstractItemRangeFunctor::blockGrainSize(), Arcane::TaskFactory::defaultParallelLoopOptions(), Arcane::TaskFactory::executeParallelFor(), Arcane::AbstractItemRangeFunctor::nbBlock(), and Arcane::ParallelLoopOptions::setGrainSize().

◆ arcaneParallelForeach() [10/16]

◆ arcaneParallelForeach() [11/16]

template<typename LambdaType>
void Arcane::arcaneParallelForeach ( const ItemVectorView & items_view,
const LambdaType & lambda_function )
inline

Applies the lambda function lambda_function instance concurrently on the view items_view.

Definition at line 179 of file Concurrency.h.

References arcaneParallelForeach().

◆ arcaneParallelForeach() [12/16]

template<typename LambdaType>
void Arcane::arcaneParallelForeach ( const ItemVectorView & items_view,
const ParallelLoopOptions & options,
const LambdaType & lambda_function )
inline

Applies the lambda function lambda_function instance concurrently on the view items_view with the options options.

Definition at line 155 of file Concurrency.h.

References arcaneParallelForeach().

◆ arcaneParallelForeach() [13/16]

template<typename InstanceType, typename ItemType>
void Arcane::arcaneParallelForeach ( const ItemVectorView & items_view,
const ParallelLoopOptions & options,
InstanceType * instance,
void(InstanceType::* function )(ItemVectorViewT< ItemType > items) )
inline

Applies the method function of the instance instance concurrently on the view items_view with the options options.

Definition at line 106 of file Concurrency.h.

References arcaneParallelForeach().

◆ arcaneParallelForeach() [14/16]

template<typename InstanceType, typename ItemType>
void Arcane::arcaneParallelForeach ( const ItemVectorView & items_view,
InstanceType * instance,
void(InstanceType::* function )(ItemVectorViewT< ItemType > items) )
inline

Applies the method function of the instance instance concurrently on the view items_view.

Definition at line 131 of file Concurrency.h.

References arcaneParallelForeach().

◆ arcaneParallelForeach() [15/16]

template<typename LambdaType>
void Arcane::arcaneParallelForeach ( const MatItemVectorView & items_view,
const LambdaType & lambda_function )
inline

Applies the lambda function lambda_function instance concurrently on the material view items_view.

Definition at line 138 of file MatConcurrency.h.

References Arcane::TaskFactory::executeParallelFor(), and Arcane::Materials::ComponentItemVectorView::nbItem().

◆ arcaneParallelForeach() [16/16]

template<typename LambdaType>
void Arcane::arcaneParallelForeach ( const MatItemVectorView & items_view,
const ParallelLoopOptions & options,
const LambdaType & lambda_function )
inline

Applies the lambda function lambda_function instance concurrently on the material view items_view with the options options.

Definition at line 150 of file MatConcurrency.h.

References Arcane::TaskFactory::executeParallelFor(), and Arcane::Materials::ComponentItemVectorView::nbItem().

◆ arcaneParallelForVa()

template<typename LambdaType, typename... Views>
void Arcane::arcaneParallelForVa ( const ForLoopRunInfo & run_info,
const LambdaType & lambda_function,
Views... views )
inline

Applies the lambda function lambda_function instance concurrently on the container views views with the options options.

Definition at line 258 of file Concurrency.h.

References ARCANE_FATAL, and Arcane::TaskFactory::executeParallelFor().

◆ Foreach() [1/6]

template<typename LambdaType>
void Arcane::Parallel::Foreach ( const ComponentItemVectorView & items_view,
const LambdaType & lambda_function )
inline

Applies the lambda function lambda_function instance concurrently on the component view items_view.

Definition at line 172 of file MatConcurrency.h.

References Arcane::arcaneParallelForeach().

◆ Foreach() [2/6]

template<typename LambdaType>
void Arcane::Parallel::Foreach ( const ComponentItemVectorView & items_view,
const ParallelLoopOptions & options,
const LambdaType & lambda_function )
inline

Applies the lambda function lambda_function instance concurrently on the component view items_view with the options options.

Definition at line 183 of file MatConcurrency.h.

References Arcane::arcaneParallelForeach().

◆ Foreach() [3/6]

template<typename LambdaType>
void Arcane::Parallel::Foreach ( const EnvItemVectorView & items_view,
const LambdaType & lambda_function )
inline

Applies the lambda function lambda_function instance concurrently on the environment view items_view.

Definition at line 195 of file MatConcurrency.h.

References Arcane::arcaneParallelForeach().

◆ Foreach() [4/6]

template<typename LambdaType>
void Arcane::Parallel::Foreach ( const EnvItemVectorView & items_view,
const ParallelLoopOptions & options,
const LambdaType & lambda_function )
inline

Applies the lambda function lambda_function instance concurrently on the environment view items_view with the options options.

Definition at line 206 of file MatConcurrency.h.

References Arcane::arcaneParallelForeach().

◆ Foreach() [5/6]

template<typename LambdaType>
void Arcane::Parallel::Foreach ( const MatItemVectorView & items_view,
const LambdaType & lambda_function )
inline

Applies the lambda function lambda_function instance concurrently on the material view items_view.

Definition at line 218 of file MatConcurrency.h.

References Arcane::arcaneParallelForeach().

◆ Foreach() [6/6]

template<typename LambdaType>
void Arcane::Parallel::Foreach ( const MatItemVectorView & items_view,
const ParallelLoopOptions & options,
const LambdaType & lambda_function )
inline

Applies the lambda function lambda_function instance concurrently on the material view items_view with the options options.

Definition at line 229 of file MatConcurrency.h.

References Arcane::arcaneParallelForeach().