|
Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
|
#include <TaskGroup.hh>
Inheritance diagram for PTL::TaskGroup< Tp, Arg >:Public Types | |
| typedef decay_t< Arg > | ArgTp |
| typedef Tp | result_type |
| typedef TaskGroup< Tp, Arg > | this_type |
| typedef std::promise< ArgTp > | promise_type |
| typedef std::future< ArgTp > | future_type |
| typedef std::packaged_task< ArgTp()> | packaged_task_type |
| typedef list_type< future_type > | task_list_t |
| typedef JoinFunction< Tp, Arg >::Type | join_type |
| typedef task_list_t::iterator | iterator |
| typedef task_list_t::reverse_iterator | reverse_iterator |
| typedef task_list_t::const_iterator | const_iterator |
| typedef task_list_t::const_reverse_iterator | const_reverse_iterator |
| template<typename... Args> | |
| using | task_type = Task< ArgTp, decay_t< Args >... > |
Public Types inherited from PTL::VTaskGroup | |
| 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 Types inherited from PTL::TaskAllocator< Type > | |
| typedef Type | value_type |
| typedef size_t | size_type |
| typedef ptrdiff_t | difference_type |
| typedef Type * | pointer |
| typedef const Type * | const_pointer |
| typedef Type & | reference |
| typedef const Type & | const_reference |
| typedef TaskAllocatorImpl< Type > | allocator_type |
Public Types inherited from PTL::TaskAllocatorImpl< Type > | |
| typedef Type | value_type |
| typedef size_t | size_type |
| typedef ptrdiff_t | difference_type |
| typedef Type * | pointer |
| typedef const Type * | const_pointer |
| typedef Type & | reference |
| typedef const Type & | const_reference |
Public Member Functions | |
| template<typename Func > | |
| TaskGroup (Func &&_join, ThreadPool *_tp=nullptr) | |
| template<typename Up = Tp, enable_if_t< std::is_same< Up, void >::value, int > = 0> | |
| TaskGroup (ThreadPool *_tp=nullptr) | |
| virtual | ~TaskGroup () |
| TaskGroup (const this_type &)=delete | |
| TaskGroup (this_type &&rhs)=default | |
| this_type & | operator= (const this_type &rhs)=delete |
| this_type & | operator= (this_type &&rhs)=default |
| template<typename Up > | |
| Up * | operator+= (Up *_task) |
| template<typename Func , typename... Args> | |
| task_type< Args... > * | wrap (Func &&func, Args... args) |
| template<typename Func , typename... Args> | |
| void | exec (Func &&func, Args... args) |
| template<typename Func , typename... Args> | |
| void | run (Func &&func, Args... args) |
| template<typename Func , typename... Args> | |
| void | parallel_for (const intmax_t &nitr, const intmax_t &chunks, Func &&func, Args... args) |
| task_list_t & | get_tasks () |
| const task_list_t & | get_tasks () const |
| itr_t | begin () |
| itr_t | end () |
| citr_t | begin () const |
| citr_t | end () const |
| citr_t | cbegin () const |
| citr_t | cend () const |
| ritr_t | rbegin () |
| ritr_t | rend () |
| critr_t | rbegin () const |
| critr_t | rend () const |
| template<typename Up = Tp, enable_if_t<!std::is_void< Up >::value, int > = 0> | |
| Up | join (Up accum={}) |
| template<typename Up = Tp, typename Rp = Arg, enable_if_t< std::is_void< Up >::value &&std::is_void< Rp >::value, int > = 0> | |
| void | join () |
| template<typename Up = Tp, typename Rp = Arg, enable_if_t< std::is_void< Up >::value &&!std::is_void< Rp >::value, int > = 0> | |
| void | join () |
| void | clear () |
Public Member Functions inherited from PTL::VTaskGroup | |
| 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 () |
Public Member Functions inherited from PTL::TaskAllocator< Type > | |
| void * | operator new (size_type) |
| void | operator delete (void *ptr) |
Public Member Functions inherited from PTL::TaskAllocatorImpl< Type > | |
| TaskAllocatorImpl () | |
| ~TaskAllocatorImpl () | |
| Type * | MallocSingle () |
| void | FreeSingle (Type *anElement) |
| void | ResetStorage () override |
| size_t | GetAllocatedSize () const override |
| int | GetNoPages () const override |
| size_t | GetPageSize () const override |
| void | IncreasePageSize (unsigned int sz) override |
| const char * | GetPoolType () const override |
| template<class U > | |
| TaskAllocatorImpl (const TaskAllocatorImpl< U > &right) throw () | |
| pointer | address (reference r) const |
| const_pointer | address (const_reference r) const |
| pointer | allocate (size_type n, void *=0) |
| void | deallocate (pointer p, size_type n) |
| void | construct (pointer p, const Type &val) |
| void | destroy (pointer p) |
| size_type | max_size () const throw () |
Public Member Functions inherited from PTL::TaskAllocatorBase | |
| TaskAllocatorBase () | |
| virtual | ~TaskAllocatorBase () |
| virtual void | ResetStorage ()=0 |
| virtual size_t | GetAllocatedSize () const =0 |
| virtual int | GetNoPages () const =0 |
| virtual size_t | GetPageSize () const =0 |
| virtual void | IncreasePageSize (unsigned int sz)=0 |
| virtual const char * | GetPoolType () const =0 |
Protected Types | |
| typedef iterator | itr_t |
| typedef const_iterator | citr_t |
| typedef reverse_iterator | ritr_t |
| typedef const_reverse_iterator | critr_t |
Protected Attributes | |
| task_list_t | m_task_set |
| join_type | m_join |
Protected Attributes inherited from PTL::VTaskGroup | |
| 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 |
Additional Inherited Members | |
Static Public Member Functions inherited from PTL::VTaskGroup | |
| static void | set_verbose (int level) |
Public Attributes inherited from PTL::TaskAllocatorImpl< Type > | |
| TaskAllocatorPool | mem |
Protected Member Functions inherited from PTL::VTaskGroup | |
| atomic_int & | task_count () |
| const atomic_int & | task_count () const |
Static Protected Member Functions inherited from PTL::VTaskGroup | |
| static tid_type | this_tid () |
Static Protected Attributes inherited from PTL::VTaskGroup | |
| static int | f_verbose = GetEnv<int>("PTL_VERBOSE", 0) |
Definition at line 141 of file TaskGroup.hh.
| typedef decay_t<Arg> PTL::TaskGroup< Tp, Arg >::ArgTp |
Definition at line 147 of file TaskGroup.hh.
|
protected |
Definition at line 246 of file TaskGroup.hh.
| typedef task_list_t::const_iterator PTL::TaskGroup< Tp, Arg >::const_iterator |
Definition at line 157 of file TaskGroup.hh.
| typedef task_list_t::const_reverse_iterator PTL::TaskGroup< Tp, Arg >::const_reverse_iterator |
Definition at line 158 of file TaskGroup.hh.
|
protected |
Definition at line 248 of file TaskGroup.hh.
| typedef std::future<ArgTp> PTL::TaskGroup< Tp, Arg >::future_type |
Definition at line 151 of file TaskGroup.hh.
| typedef task_list_t::iterator PTL::TaskGroup< Tp, Arg >::iterator |
Definition at line 155 of file TaskGroup.hh.
|
protected |
Definition at line 245 of file TaskGroup.hh.
| typedef JoinFunction<Tp,Arg>::Type PTL::TaskGroup< Tp, Arg >::join_type |
Definition at line 154 of file TaskGroup.hh.
| typedef std::packaged_task<ArgTp()> PTL::TaskGroup< Tp, Arg >::packaged_task_type |
Definition at line 152 of file TaskGroup.hh.
| typedef std::promise<ArgTp> PTL::TaskGroup< Tp, Arg >::promise_type |
Definition at line 150 of file TaskGroup.hh.
| typedef Tp PTL::TaskGroup< Tp, Arg >::result_type |
Definition at line 148 of file TaskGroup.hh.
| typedef task_list_t::reverse_iterator PTL::TaskGroup< Tp, Arg >::reverse_iterator |
Definition at line 156 of file TaskGroup.hh.
|
protected |
Definition at line 247 of file TaskGroup.hh.
| typedef list_type<future_type> PTL::TaskGroup< Tp, Arg >::task_list_t |
Definition at line 153 of file TaskGroup.hh.
| using PTL::TaskGroup< Tp, Arg >::task_type = Task<ArgTp, decay_t<Args>...> |
Definition at line 161 of file TaskGroup.hh.
| typedef TaskGroup<Tp, Arg> PTL::TaskGroup< Tp, Arg >::this_type |
Definition at line 149 of file TaskGroup.hh.
|
inline |
Definition at line 167 of file TaskGroup.hh.
|
inlineexplicit |
Definition at line 172 of file TaskGroup.hh.
|
inlinevirtual |
Definition at line 177 of file TaskGroup.hh.
|
delete |
|
default |
|
inline |
Definition at line 260 of file TaskGroup.hh.
|
inline |
Definition at line 262 of file TaskGroup.hh.
|
inline |
Definition at line 264 of file TaskGroup.hh.
|
inline |
Definition at line 265 of file TaskGroup.hh.
|
inline |
Definition at line 313 of file TaskGroup.hh.
Referenced by PTL::TaskGroup< Tp, Arg >::join(), and PTL::TaskGroup< Tp, Arg >::~TaskGroup().
|
inline |
Definition at line 261 of file TaskGroup.hh.
|
inline |
Definition at line 263 of file TaskGroup.hh.
|
inline |
Definition at line 215 of file TaskGroup.hh.
Referenced by G4TaskRunManager::AddEventTask(), PTL::TaskManager::exec(), and PTL::TaskManager::rexec().
|
inline |
Definition at line 254 of file TaskGroup.hh.
|
inline |
Definition at line 255 of file TaskGroup.hh.
|
inline |
Definition at line 289 of file TaskGroup.hh.
|
inline |
Definition at line 301 of file TaskGroup.hh.
|
inline |
Definition at line 274 of file TaskGroup.hh.
Referenced by G4TaskRunManager::TerminateWorkers(), G4TaskRunManager::WaitForEndEventLoopWorkers(), and G4TaskRunManager::~G4TaskRunManager().
|
inline |
Definition at line 191 of file TaskGroup.hh.
Referenced by PTL::TaskGroup< Tp, Arg >::wrap().
|
delete |
|
default |
|
inline |
Definition at line 227 of file TaskGroup.hh.
|
inline |
Definition at line 266 of file TaskGroup.hh.
|
inline |
Definition at line 268 of file TaskGroup.hh.
|
inline |
Definition at line 267 of file TaskGroup.hh.
|
inline |
Definition at line 269 of file TaskGroup.hh.
|
inline |
Definition at line 221 of file TaskGroup.hh.
Referenced by PTL::TaskGroup< Tp, Arg >::parallel_for().
|
inline |
Definition at line 206 of file TaskGroup.hh.
Referenced by PTL::TaskGroup< Tp, Arg >::exec(), PTL::TaskGroup< Tp, Arg >::run(), and PTL::TaskManager::wrap().
|
protected |
Definition at line 322 of file TaskGroup.hh.
Referenced by PTL::TaskGroup< Tp, Arg >::join().
|
protected |
Definition at line 321 of file TaskGroup.hh.
Referenced by PTL::TaskGroup< Tp, Arg >::begin(), PTL::TaskGroup< Tp, Arg >::cbegin(), PTL::TaskGroup< Tp, Arg >::cend(), PTL::TaskGroup< Tp, Arg >::end(), PTL::TaskGroup< Tp, Arg >::get_tasks(), PTL::TaskGroup< Tp, Arg >::join(), PTL::TaskGroup< Tp, Arg >::operator+=(), PTL::TaskGroup< Tp, Arg >::rbegin(), and PTL::TaskGroup< Tp, Arg >::rend().