Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
|
#include <VTaskGroup.hh>
Public Types | |
template<typename Tp > | |
using | container_type = std::vector< Tp > |
template<typename Tp > | |
using | list_type = std::vector< Tp > |
typedef VTaskGroup | this_type |
typedef std::thread::id | tid_type |
typedef VTask | task_type |
typedef uintmax_t | size_type |
typedef Mutex | lock_t |
typedef std::atomic_intmax_t | atomic_int |
typedef std::atomic_uintmax_t | atomic_uint |
typedef Condition | condition_t |
typedef task_type * | task_pointer |
typedef container_type< task_pointer > | vtask_list_type |
Public Member Functions | |
VTaskGroup (ThreadPool *tp=nullptr) | |
virtual | ~VTaskGroup () |
VTaskGroup (const this_type &)=delete | |
VTaskGroup (this_type &&rhs)=default | |
this_type & | operator= (const this_type &)=delete |
this_type & | operator= (this_type &&rhs)=default |
virtual void | wait () |
intmax_t | operator++ () |
intmax_t | operator++ (int) |
intmax_t | operator-- () |
intmax_t | operator-- (int) |
intmax_t | size () const |
std::shared_ptr< condition_t > | task_cond () |
const uintmax_t & | id () const |
void | set_pool (ThreadPool *tp) |
ThreadPool *& | pool () |
ThreadPool * | pool () const |
void | clear () |
virtual bool | is_native_task_group () const |
virtual bool | is_master () const |
virtual intmax_t | pending () |
Static Public Member Functions | |
static void | set_verbose (int level) |
Protected Member Functions | |
atomic_int & | task_count () |
const atomic_int & | task_count () const |
Static Protected Member Functions | |
static tid_type | this_tid () |
Protected Attributes | |
uintmax_t | m_id |
ThreadPool * | m_pool |
std::shared_ptr< atomic_int > | m_tot_task_count = std::make_shared<atomic_int>(0) |
std::shared_ptr< condition_t > | m_task_cond = std::make_shared<condition_t>() |
std::shared_ptr< lock_t > | m_task_lock = std::make_shared<lock_t>() |
tid_type | m_main_tid |
vtask_list_type | vtask_list |
Static Protected Attributes | |
static int | f_verbose = GetEnv<int>("PTL_VERBOSE", 0) |
Definition at line 53 of file VTaskGroup.hh.
typedef std::atomic_intmax_t PTL::VTaskGroup::atomic_int |
Definition at line 66 of file VTaskGroup.hh.
typedef std::atomic_uintmax_t PTL::VTaskGroup::atomic_uint |
Definition at line 67 of file VTaskGroup.hh.
Definition at line 68 of file VTaskGroup.hh.
using PTL::VTaskGroup::container_type = std::vector<Tp> |
Definition at line 57 of file VTaskGroup.hh.
using PTL::VTaskGroup::list_type = std::vector<Tp> |
Definition at line 59 of file VTaskGroup.hh.
typedef Mutex PTL::VTaskGroup::lock_t |
Definition at line 65 of file VTaskGroup.hh.
typedef uintmax_t PTL::VTaskGroup::size_type |
Definition at line 64 of file VTaskGroup.hh.
typedef task_type* PTL::VTaskGroup::task_pointer |
Definition at line 69 of file VTaskGroup.hh.
typedef VTask PTL::VTaskGroup::task_type |
Definition at line 63 of file VTaskGroup.hh.
typedef VTaskGroup PTL::VTaskGroup::this_type |
Definition at line 61 of file VTaskGroup.hh.
typedef std::thread::id PTL::VTaskGroup::tid_type |
Definition at line 62 of file VTaskGroup.hh.
Definition at line 70 of file VTaskGroup.hh.
|
explicit |
Definition at line 56 of file VTaskGroup.cc.
|
virtual |
Definition at line 76 of file VTaskGroup.cc.
|
delete |
|
default |
|
inline |
Definition at line 146 of file VTaskGroup.hh.
Referenced by PTL::TaskGroup< Tp, Arg >::clear().
|
inline |
Definition at line 106 of file VTaskGroup.hh.
|
inlinevirtual |
Definition at line 115 of file VTaskGroup.hh.
|
inlinevirtual |
Definition at line 114 of file VTaskGroup.hh.
Referenced by PTL::VTask::is_native_task(), and wait().
|
inline |
Definition at line 92 of file VTaskGroup.hh.
Referenced by PTL::TaskGroup< Tp, Arg >::operator+=().
|
inline |
Definition at line 93 of file VTaskGroup.hh.
|
inline |
Definition at line 96 of file VTaskGroup.hh.
|
inline |
Definition at line 97 of file VTaskGroup.hh.
|
inlinevirtual |
|
inline |
|
inline |
Definition at line 111 of file VTaskGroup.hh.
|
inline |
Definition at line 109 of file VTaskGroup.hh.
|
inlinestatic |
Definition at line 121 of file VTaskGroup.hh.
|
inline |
Definition at line 100 of file VTaskGroup.hh.
|
inline |
|
inlineprotected |
|
inlineprotected |
Definition at line 131 of file VTaskGroup.hh.
|
inlinestaticprotected |
Definition at line 126 of file VTaskGroup.hh.
Referenced by is_master().
|
virtual |
Definition at line 81 of file VTaskGroup.cc.
Referenced by G4TaskRunManager::CreateAndStartWorkers(), PTL::TaskGroup< Tp, Arg >::join(), and wait().
|
staticprotected |
Definition at line 142 of file VTaskGroup.hh.
Referenced by set_verbose(), and wait().
|
protected |
Definition at line 135 of file VTaskGroup.hh.
Referenced by id().
|
protected |
Definition at line 140 of file VTaskGroup.hh.
Referenced by is_master().
|
protected |
Definition at line 136 of file VTaskGroup.hh.
Referenced by PTL::TaskGroup< Tp, Arg >::exec(), pool(), PTL::TaskGroup< Tp, Arg >::run(), set_pool(), VTaskGroup(), and wait().
|
protected |
Definition at line 138 of file VTaskGroup.hh.
Referenced by task_cond(), and wait().
Definition at line 139 of file VTaskGroup.hh.
Referenced by wait().
|
protected |
Definition at line 137 of file VTaskGroup.hh.
Referenced by operator++(), operator--(), pending(), size(), and task_count().
|
protected |
Definition at line 141 of file VTaskGroup.hh.
Referenced by clear(), and PTL::TaskGroup< Tp, Arg >::operator+=().