Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
PTL::internal Namespace Reference

Functions

std::atomic_uintmax_t & task_group_counter ()
 
ThreadPoolget_default_threadpool ()
 
intmax_t get_task_depth ()
 

Function Documentation

◆ get_default_threadpool()

ThreadPool * PTL::internal::get_default_threadpool ( )

Definition at line 51 of file TaskGroup.cc.

52{
53 auto* mrm = TaskRunManager::GetMasterRunManager();
54 if(mrm)
55 {
56 if(!mrm->GetThreadPool())
57 mrm->Initialize();
58 return mrm->GetThreadPool();
59 }
60 return nullptr;
61}

◆ get_task_depth()

intmax_t PTL::internal::get_task_depth ( )

Definition at line 64 of file TaskGroup.cc.

65{
66 return (ThreadData::GetInstance()) ? ThreadData::GetInstance()->task_depth : 0;
67}

◆ task_group_counter()

std::atomic_uintmax_t & PTL::internal::task_group_counter ( )

Definition at line 44 of file TaskGroup.cc.

45{
46 static std::atomic_uintmax_t _instance(0);
47 return _instance;
48}