Classes | |
| class | MDParallelForExecute |
| class | TaskInfoLockGuard |
| Class for positioning TaskThreadInfo::taskIndex(). More... | |
| class | Impl |
| class | ParallelForExecute |
Public Member Functions | |
| class | ARCCORE_ALIGNAS_PACKED (64) TaskThreadInfo |
| void | build () |
| void | initialize (Int32 nb_thread) override |
| void | terminate () override |
| ITask * | createRootTask (ITaskFunctor *f) override |
| Creates a root task. The implementation must copy the value of f, which is either a TaskFunctor or a TaskFunctorWithContext. | |
| void | executeParallelFor (Int32 begin, Int32 size, const ParallelLoopOptions &options, IRangeFunctor *f) final |
| Executes the functor f in parallel. | |
| void | executeParallelFor (Int32 begin, Int32 size, Integer grain_size, IRangeFunctor *f) final |
| Executes the functor f in parallel. | |
| void | executeParallelFor (Int32 begin, Int32 size, IRangeFunctor *f) final |
| Executes the functor f in parallel. | |
| void | executeParallelFor (const ParallelFor1DLoopInfo &loop_info) override |
| Executes the loop loop_info in parallel. | |
| void | executeParallelFor (const ComplexForLoopRanges< 1 > &loop_ranges, const ForLoopRunInfo &run_info, IMDRangeFunctor< 1 > *functor) final |
| Executes a 1D loop in parallel. | |
| void | executeParallelFor (const ComplexForLoopRanges< 2 > &loop_ranges, const ForLoopRunInfo &run_info, IMDRangeFunctor< 2 > *functor) final |
| Executes a 2D loop in parallel. | |
| void | executeParallelFor (const ComplexForLoopRanges< 3 > &loop_ranges, const ForLoopRunInfo &run_info, IMDRangeFunctor< 3 > *functor) final |
| Executes a 3D loop in parallel. | |
| void | executeParallelFor (const ComplexForLoopRanges< 4 > &loop_ranges, const ForLoopRunInfo &run_info, IMDRangeFunctor< 4 > *functor) final |
| Executes a 4D loop in parallel. | |
| bool | isActive () const final |
| Indicates if the implementation is active. | |
| Int32 | currentTaskThreadIndex () const final |
| Implementation of TaskFactory::currentTaskThreadIndex(). | |
| Int32 | currentTaskIndex () const final |
| Implementation of TaskFactory::currentTaskIndex(). | |
| void | printInfos (std::ostream &o) const final |
| Prints information about the runtime used. | |
| TaskThreadInfo * | currentTaskThreadInfo () const |
| Instance of TaskThreadInfo associated with the current thread. | |
| Public Member Functions inherited from Arcane::ITaskImplementation | |
| Int32 | nbAllowedThread () const |
| Maximum number of threads used to manage tasks. | |
Private Member Functions | |
| template<int RankValue> | |
| void | _executeMDParallelFor (const ComplexForLoopRanges< RankValue > &loop_ranges, IMDRangeFunctor< RankValue > *functor, const ForLoopRunInfo &run_info) |
| Execution of an N-dimensional loop. | |
| void | _executeParallelFor (const ParallelFor1DLoopInfo &loop_info) |
Private Attributes | |
| bool | m_is_active = false |
| Impl * | m_p = nullptr |
Definition at line 343 of file TBBTaskImplementation.cc.
|
override |
Definition at line 1035 of file TBBTaskImplementation.cc.
|
private |
Execution of an N-dimensional loop.
Definition at line 1146 of file TBBTaskImplementation.cc.
References Arcane::TaskFactory::defaultParallelLoopOptions(), Arcane::ParallelLoopOptions::grainSize(), Arcane::makeLoopRanges(), Arcane::ParallelLoopOptions::maxThread(), Arcane::ParallelLoopOptions::mergeUnsetValues(), and Arcane::TaskFactory::verboseLevel().
Referenced by executeParallelFor(), executeParallelFor(), executeParallelFor(), and executeParallelFor().
|
private |
Definition at line 1083 of file TBBTaskImplementation.cc.
|
inline |
Definition at line 331 of file TBBTaskImplementation.cc.
|
inline |
Definition at line 412 of file TBBTaskImplementation.cc.
|
inlineoverridevirtual |
Creates a root task. The implementation must copy the value of f, which is either a TaskFunctor or a TaskFunctorWithContext.
Implements Arcane::ITaskImplementation.
Definition at line 416 of file TBBTaskImplementation.cc.
|
finalvirtual |
Implementation of TaskFactory::currentTaskIndex().
Implements Arcane::ITaskImplementation.
Definition at line 1243 of file TBBTaskImplementation.cc.
References currentTaskThreadIndex(), and currentTaskThreadInfo().
|
inlinefinalvirtual |
Implementation of TaskFactory::currentTaskThreadIndex().
Implements Arcane::ITaskImplementation.
Definition at line 460 of file TBBTaskImplementation.cc.
References Arcane::ITaskImplementation::nbAllowedThread().
Referenced by currentTaskIndex(), and currentTaskThreadInfo().
| TBBTaskImplementation::TaskThreadInfo * Arcane::TBBTaskImplementation::currentTaskThreadInfo | ( | ) | const |
Instance of TaskThreadInfo associated with the current thread.
May be null if the current thread is not associated with a TBB thread or if it is outside the execution of a task or a parallel loop.
Definition at line 1231 of file TBBTaskImplementation.cc.
References currentTaskThreadIndex().
Referenced by currentTaskIndex().
|
inlinefinalvirtual |
Executes a 1D loop in parallel.
Implements Arcane::ITaskImplementation.
Definition at line 430 of file TBBTaskImplementation.cc.
References _executeMDParallelFor().
|
inlinefinalvirtual |
Executes a 2D loop in parallel.
Implements Arcane::ITaskImplementation.
Definition at line 436 of file TBBTaskImplementation.cc.
References _executeMDParallelFor().
|
inlinefinalvirtual |
Executes a 3D loop in parallel.
Implements Arcane::ITaskImplementation.
Definition at line 442 of file TBBTaskImplementation.cc.
References _executeMDParallelFor().
|
inlinefinalvirtual |
Executes a 4D loop in parallel.
Implements Arcane::ITaskImplementation.
Definition at line 448 of file TBBTaskImplementation.cc.
References _executeMDParallelFor().
|
overridevirtual |
Executes the loop loop_info in parallel.
Implements Arcane::ITaskImplementation.
Definition at line 1131 of file TBBTaskImplementation.cc.
|
finalvirtual |
Executes the functor f in parallel.
Implements Arcane::ITaskImplementation.
Definition at line 1222 of file TBBTaskImplementation.cc.
References executeParallelFor().
Referenced by executeParallelFor(), executeParallelFor(), and executeParallelFor().
|
finalvirtual |
Executes the functor f in parallel.
Implements Arcane::ITaskImplementation.
Definition at line 1210 of file TBBTaskImplementation.cc.
References Arcane::TaskFactory::defaultParallelLoopOptions(), executeParallelFor(), and Arcane::ParallelLoopOptions::setGrainSize().
|
inlinefinalvirtual |
Executes the functor f in parallel.
Implements Arcane::ITaskImplementation.
Definition at line 424 of file TBBTaskImplementation.cc.
References Arcane::TaskFactory::defaultParallelLoopOptions(), and executeParallelFor().
|
overridevirtual |
. Initializes the implementation with a maximum of nb_thread. If nb_thread is 0, the implementation can choose the number of threads automatically. This method is internal to Arcane and should only be called during the execution initialization.
Implements Arcane::ITaskImplementation.
Definition at line 1044 of file TBBTaskImplementation.cc.
References Arcane::TaskFactory::defaultParallelLoopOptions(), Arcane::ITaskImplementation::nbAllowedThread(), Arcane::TaskFactory::setDefaultParallelLoopOptions(), and Arcane::ParallelLoopOptions::setMaxThread().
|
inlinefinalvirtual |
Indicates if the implementation is active.
Implements Arcane::ITaskImplementation.
Definition at line 455 of file TBBTaskImplementation.cc.
|
finalvirtual |
Prints information about the runtime used.
Implements Arcane::ITaskImplementation.
Definition at line 1071 of file TBBTaskImplementation.cc.
|
overridevirtual |
. Terminates the use of the implementation. This method must be called only at the end of the calculation.
Implements Arcane::ITaskImplementation.
Definition at line 1062 of file TBBTaskImplementation.cc.
|
private |
Definition at line 481 of file TBBTaskImplementation.cc.
|
private |
Definition at line 482 of file TBBTaskImplementation.cc.