Wrapper for tbb::task_arena.
Wrapper over tbb::task_arena.
Necessary in order to keep tbb away from ROOT headers. This class is thought out to be used as a singleton.
This class is a wrapper over tbb::task_arena, in order to keep TBB away from ROOT's headers. We keep a single global instance to be used by any parallel ROOT class with TBB as a backend.
TThreadExecutor, IMT and any class relying on TBB will get a pointer to the scheduler through ROOT::Internal::GetGlobalTaskArena()
, which will return areference to the only pointer to the TBB scheduler that will be active in any ROOT Process.
Definition at line 63 of file RTaskArena.hxx.
Public Member Functions | |
~RTaskArenaWrapper () | |
ROOT::ROpaqueTaskArena & | Access () |
Provides access to the wrapped tbb::task_arena. More... | |
Static Public Member Functions | |
static unsigned | TaskArenaSize () |
Private Member Functions | |
RTaskArenaWrapper (unsigned maxConcurrency=0) | |
Initializes the tbb::task_arena within RTaskArenaWrapper. More... | |
Private Attributes | |
std::unique_ptr< ROOT::ROpaqueTaskArena > | fTBBArena |
Static Private Attributes | |
static unsigned | fNWorkers = 0u |
Friends | |
std::shared_ptr< ROOT::Internal::RTaskArenaWrapper > | GetGlobalTaskArena (unsigned maxConcurrency) |
Factory function returning a shared pointer to the instance of the global RTaskArenaWrapper. More... | |
#include <ROOT/RTaskArena.hxx>
ROOT::Internal::RTaskArenaWrapper::~RTaskArenaWrapper | ( | ) |
Definition at line 90 of file RTaskArena.cxx.
|
private |
Initializes the tbb::task_arena within RTaskArenaWrapper.
Definition at line 72 of file RTaskArena.cxx.
ROOT::ROpaqueTaskArena & ROOT::Internal::RTaskArenaWrapper::Access | ( | ) |
Provides access to the wrapped tbb::task_arena.
Definition at line 104 of file RTaskArena.cxx.
|
static |
Definition at line 97 of file RTaskArena.cxx.
|
friend |
Factory function returning a shared pointer to the instance of the global RTaskArenaWrapper.
Allows for reinstantiation of the global RTaskArenaWrapper once all the references to the previous one are gone and the object destroyed.
Definition at line 109 of file RTaskArena.cxx.
|
staticprivate |
Definition at line 72 of file RTaskArena.hxx.
|
private |
Definition at line 71 of file RTaskArena.hxx.