Implementation of a task factory. More...
Public Member Functions | |
| virtual void | initialize (Int32 nb_thread)=0 |
| virtual void | terminate ()=0 |
| virtual ITask * | createRootTask (ITaskFunctor *f)=0 |
| Creates a root task. The implementation must copy the value of f, which is either a TaskFunctor or a TaskFunctorWithContext. | |
| virtual void | executeParallelFor (Integer begin, Integer size, const ParallelLoopOptions &options, IRangeFunctor *f)=0 |
| Executes the functor f in parallel. | |
| virtual void | executeParallelFor (Integer begin, Integer size, Integer block_size, IRangeFunctor *f)=0 |
| Executes the functor f in parallel. | |
| virtual void | executeParallelFor (Integer begin, Integer size, IRangeFunctor *f)=0 |
| Executes the functor f in parallel. | |
| virtual void | executeParallelFor (const ParallelFor1DLoopInfo &loop_info)=0 |
| Executes the loop loop_info in parallel. | |
| virtual void | executeParallelFor (const ComplexForLoopRanges< 1 > &loop_ranges, const ForLoopRunInfo &run_info, IMDRangeFunctor< 1 > *functor)=0 |
| Executes a 1D loop in parallel. | |
| virtual void | executeParallelFor (const ComplexForLoopRanges< 2 > &loop_ranges, const ForLoopRunInfo &run_info, IMDRangeFunctor< 2 > *functor)=0 |
| Executes a 2D loop in parallel. | |
| virtual void | executeParallelFor (const ComplexForLoopRanges< 3 > &loop_ranges, const ForLoopRunInfo &run_info, IMDRangeFunctor< 3 > *functor)=0 |
| Executes a 3D loop in parallel. | |
| virtual void | executeParallelFor (const ComplexForLoopRanges< 4 > &loop_ranges, const ForLoopRunInfo &run_info, IMDRangeFunctor< 4 > *functor)=0 |
| Executes a 4D loop in parallel. | |
| virtual bool | isActive () const =0 |
| Indicates if the implementation is active. | |
| Int32 | nbAllowedThread () const |
| Maximum number of threads used to manage tasks. | |
| virtual Int32 | currentTaskThreadIndex () const =0 |
| Implementation of TaskFactory::currentTaskThreadIndex(). | |
| virtual Int32 | currentTaskIndex () const =0 |
| Implementation of TaskFactory::currentTaskIndex(). | |
| virtual void | printInfos (std::ostream &o) const =0 |
| Prints information about the runtime used. | |
Implementation of a task factory.
This class is internal to Arcane. To manage tasks, you must use the TaskFactory class.
Definition at line 37 of file ITaskImplementation.h.
|
pure virtual |
Creates a root task. The implementation must copy the value of f, which is either a TaskFunctor or a TaskFunctorWithContext.
Implemented in Arcane::NullTaskImplementation, and Arcane::TBBTaskImplementation.
|
pure virtual |
Implementation of TaskFactory::currentTaskIndex().
Implemented in Arcane::NullTaskImplementation, and Arcane::TBBTaskImplementation.
References currentTaskIndex().
Referenced by currentTaskIndex().
|
pure virtual |
Implementation of TaskFactory::currentTaskThreadIndex().
Implemented in Arcane::NullTaskImplementation, and Arcane::TBBTaskImplementation.
References currentTaskThreadIndex().
Referenced by currentTaskThreadIndex().
|
pure virtual |
Executes a 1D loop in parallel.
Implemented in Arcane::NullTaskImplementation, and Arcane::TBBTaskImplementation.
|
pure virtual |
Executes a 2D loop in parallel.
Implemented in Arcane::NullTaskImplementation, and Arcane::TBBTaskImplementation.
|
pure virtual |
Executes a 3D loop in parallel.
Implemented in Arcane::NullTaskImplementation, and Arcane::TBBTaskImplementation.
|
pure virtual |
Executes a 4D loop in parallel.
Implemented in Arcane::NullTaskImplementation, and Arcane::TBBTaskImplementation.
|
pure virtual |
Executes the loop loop_info in parallel.
Implemented in Arcane::NullTaskImplementation, and Arcane::TBBTaskImplementation.
|
pure virtual |
Executes the functor f in parallel.
Implemented in Arcane::NullTaskImplementation, and Arcane::TBBTaskImplementation.
|
pure virtual |
Executes the functor f in parallel.
Implemented in Arcane::NullTaskImplementation, and Arcane::TBBTaskImplementation.
|
pure virtual |
Executes the functor f in parallel.
Implemented in Arcane::NullTaskImplementation, and Arcane::TBBTaskImplementation.
|
pure virtual |
. 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.
Implemented in Arcane::NullTaskImplementation, and Arcane::TBBTaskImplementation.
|
pure virtual |
Indicates if the implementation is active.
Implemented in Arcane::NullTaskImplementation, and Arcane::TBBTaskImplementation.
References nbAllowedThread().
| Int32 Arcane::ITaskImplementation::nbAllowedThread | ( | ) | const |
Maximum number of threads used to manage tasks.
Definition at line 130 of file ConcurrencyGlobal.cc.
References Arcane::ConcurrencyBase::maxAllowedThread().
Referenced by Arcane::TBBTaskImplementation::currentTaskThreadIndex(), Arcane::TBBTaskImplementation::initialize(), and isActive().
|
pure virtual |
Prints information about the runtime used.
Implemented in Arcane::NullTaskImplementation, and Arcane::TBBTaskImplementation.
References printInfos().
Referenced by printInfos().
|
pure virtual |
. Terminates the use of the implementation. This method must be called only at the end of the calculation.
Implemented in Arcane::NullTaskImplementation, and Arcane::TBBTaskImplementation.