Geant4-11
|
#include <TaskManager.hh>
Public Types | |
typedef ThreadPool::size_type | size_type |
typedef TaskManager | this_type |
Public Member Functions | |
template<typename RetT , typename FuncT > | |
std::shared_ptr< PackagedTask< RetT > > | async (FuncT &&func) |
template<typename RetT , typename FuncT , typename... Args> | |
std::shared_ptr< PackagedTask< RetT, Args... > > | async (FuncT &&func, Args &&... args) |
template<typename FuncT , typename... Args> | |
auto | async (FuncT &&func, Args... args) -> std::shared_ptr< PackagedTask< decay_t< decltype(func(args...))>, Args... > > |
template<typename... Args> | |
void | exec (Task< Args... > *_task) |
template<typename RetT , typename ArgT , typename FuncT > | |
void | exec (TaskGroup< RetT, ArgT > &tg, FuncT &&func) |
template<typename RetT , typename ArgT , typename FuncT , typename... Args> | |
void | exec (TaskGroup< RetT, ArgT > &tg, FuncT &&func, Args &&... args) |
void | finalize () |
this_type & | operator= (const this_type &)=delete |
this_type & | operator= (this_type &&)=default |
template<typename RetT , typename ArgT , typename FuncT > | |
void | rexec (TaskGroup< RetT, ArgT > &tg, FuncT &&func) |
template<typename RetT , typename ArgT , typename FuncT , typename... Args> | |
void | rexec (TaskGroup< RetT, ArgT > &tg, FuncT &&func, Args &&... args) |
template<typename FuncT > | |
void | rexec (TaskGroup< void, void > &tg, FuncT &&func) |
template<typename FuncT , typename... Args> | |
void | rexec (TaskGroup< void, void > &tg, FuncT &&func, Args &&... args) |
size_type | size () const |
TaskManager (const this_type &)=delete | |
TaskManager (this_type &&)=default | |
TaskManager (ThreadPool *) | |
ThreadPool * | thread_pool () const |
template<typename RetT , typename ArgT , typename FuncT > | |
std::shared_ptr< Task< RetT, ArgT > > | wrap (TaskGroup< RetT, ArgT > &tg, FuncT &&func) |
template<typename RetT , typename ArgT , typename FuncT , typename... Args> | |
std::shared_ptr< Task< RetT, ArgT, Args... > > | wrap (TaskGroup< RetT, ArgT > &tg, FuncT &&func, Args &&... args) |
virtual | ~TaskManager () |
Static Public Member Functions | |
static TaskManager * | GetInstance () |
get the singleton pointer More... | |
static TaskManager * | GetInstanceIfExists () |
static unsigned | ncores () |
Protected Attributes | |
ThreadPool * | m_pool = nullptr |
Static Private Member Functions | |
static TaskManager *& | fgInstance () |
Definition at line 50 of file TaskManager.hh.
Definition at line 54 of file TaskManager.hh.
Definition at line 53 of file TaskManager.hh.
|
inlineexplicit |
Definition at line 241 of file TaskManager.hh.
References fgInstance().
|
inlinevirtual |
Definition at line 250 of file TaskManager.hh.
|
delete |
|
default |
|
inline |
Definition at line 111 of file TaskManager.hh.
References PTL::ThreadPool::add_task(), and m_pool.
|
inline |
Definition at line 100 of file TaskManager.hh.
References PTL::ThreadPool::add_task(), args, and m_pool.
Referenced by G4TaskRunManagerKernel::ExecuteWorkerInit(), G4TaskRunManagerKernel::ExecuteWorkerTask(), and G4TaskRunManagerKernel::InitializeWorker().
|
inline |
Definition at line 121 of file TaskManager.hh.
|
inline |
Definition at line 91 of file TaskManager.hh.
References PTL::ThreadPool::add_task(), and m_pool.
|
inline |
Definition at line 162 of file TaskManager.hh.
References PTL::TaskGroup< Tp, Arg, MaxDepth >::exec().
|
inline |
Definition at line 156 of file TaskManager.hh.
References args, and PTL::TaskGroup< Tp, Arg, MaxDepth >::exec().
|
inlinestaticprivate |
Definition at line 210 of file TaskManager.hh.
Referenced by TaskManager().
|
inline |
Definition at line 83 of file TaskManager.hh.
References PTL::ThreadPool::destroy_threadpool(), and m_pool.
|
inlinestatic |
get the singleton pointer
Definition at line 219 of file TaskManager.hh.
References PTL::TaskRunManager::GetMasterRunManager().
|
inlinestatic |
Definition at line 234 of file TaskManager.hh.
|
inlinestatic |
Definition at line 70 of file TaskManager.hh.
|
inline |
Definition at line 174 of file TaskManager.hh.
References PTL::TaskGroup< Tp, Arg, MaxDepth >::exec().
|
inline |
Definition at line 168 of file TaskManager.hh.
References args, and PTL::TaskGroup< Tp, Arg, MaxDepth >::exec().
|
inline |
Definition at line 188 of file TaskManager.hh.
References PTL::TaskGroup< Tp, Arg, MaxDepth >::exec().
|
inline |
Definition at line 182 of file TaskManager.hh.
References args, and PTL::TaskGroup< Tp, Arg, MaxDepth >::exec().
|
inline |
|
inline |
|
inline |
Definition at line 146 of file TaskManager.hh.
References PTL::TaskGroup< Tp, Arg, MaxDepth >::wrap().
|
inline |
Definition at line 139 of file TaskManager.hh.
References args, and PTL::TaskGroup< Tp, Arg, MaxDepth >::wrap().
|
protected |
Definition at line 196 of file TaskManager.hh.
Referenced by async(), exec(), finalize(), size(), and thread_pool().