Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
|
#include <UserTaskQueue.hh>
Public Types | |
typedef VTask * | task_pointer |
typedef std::vector< TaskSubQueue * > | TaskSubQueueContainer |
typedef std::default_random_engine | random_engine_t |
typedef std::uniform_int_distribution< int > | int_dist_t |
Public Types inherited from PTL::VUserTaskQueue | |
typedef VTask * | task_pointer |
typedef std::atomic< intmax_t > | AtomicInt |
typedef uintmax_t | size_type |
typedef std::function< void()> | function_type |
typedef std::set< ThreadId > | ThreadIdSet |
Public Member Functions | |
UserTaskQueue (intmax_t nworkers=-1, UserTaskQueue *=nullptr) | |
virtual | ~UserTaskQueue () override |
virtual task_pointer | GetTask (intmax_t subq=-1, intmax_t nitr=-1) override |
virtual intmax_t | InsertTask (task_pointer, ThreadData *=nullptr, intmax_t subq=-1) override |
task_pointer | GetThreadBinTask () |
virtual void | Wait () override |
virtual void | resize (intmax_t) override |
virtual bool | empty () const override |
virtual size_type | size () const override |
virtual size_type | bin_size (size_type bin) const override |
virtual bool | bin_empty (size_type bin) const override |
bool | true_empty () const override |
size_type | true_size () const override |
virtual void | ExecuteOnAllThreads (ThreadPool *tp, function_type f) override |
virtual void | ExecuteOnSpecificThreads (ThreadIdSet tid_set, ThreadPool *tp, function_type f) override |
virtual VUserTaskQueue * | clone () override |
virtual intmax_t | GetThreadBin () const override |
Public Member Functions inherited from PTL::VUserTaskQueue | |
VUserTaskQueue (intmax_t nworkers=-1) | |
virtual | ~VUserTaskQueue () |
virtual task_pointer | GetTask (intmax_t subq=-1, intmax_t nitr=-1)=0 |
virtual intmax_t | InsertTask (task_pointer, ThreadData *=nullptr, intmax_t subq=-1)=0 |
virtual void | Wait ()=0 |
virtual intmax_t | GetThreadBin () const =0 |
virtual void | resize (intmax_t)=0 |
virtual size_type | size () const =0 |
virtual bool | empty () const =0 |
virtual size_type | bin_size (size_type bin) const =0 |
virtual bool | bin_empty (size_type bin) const =0 |
virtual size_type | true_size () const |
virtual bool | true_empty () const |
virtual void | ExecuteOnAllThreads (ThreadPool *tp, function_type f)=0 |
virtual void | ExecuteOnSpecificThreads (ThreadIdSet tid_set, ThreadPool *tp, function_type f)=0 |
intmax_t | workers () const |
virtual VUserTaskQueue * | clone ()=0 |
Protected Member Functions | |
intmax_t | GetInsertBin () const |
Additional Inherited Members | |
Static Public Member Functions inherited from PTL::VUserTaskQueue | |
template<typename ContainerT , size_t... Idx> | |
static auto | ContainerToTupleImpl (ContainerT &&container, mpl::index_sequence< Idx... >) -> decltype(std::make_tuple(std::forward< ContainerT >(container)[Idx]...)) |
template<std::size_t N, typename ContainerT > | |
static auto | ContainerToTuple (ContainerT &&container) -> decltype(ContainerToTupleImpl(std::forward< ContainerT >(container), mpl::make_index_sequence< N >{})) |
template<std::size_t N, std::size_t Nt, typename TupleT , enable_if_t<(N==Nt), int > = 0> | |
static void | TExecutor (TupleT &&_t) |
template<std::size_t N, std::size_t Nt, typename TupleT , enable_if_t<(N< Nt), int > = 0> | |
static void | TExecutor (TupleT &&_t) |
template<typename TupleT , std::size_t N = std::tuple_size<decay_t<TupleT>>::value> | |
static void | Executor (TupleT &&__t) |
template<typename Container , typename std::enable_if< std::is_same< Container, task_pointer >::value, int >::type = 0> | |
static void | Execute (Container &obj) |
template<typename Container , typename std::enable_if<!std::is_same< Container, task_pointer >::value, int >::type = 0> | |
static void | Execute (Container &tasks) |
Protected Attributes inherited from PTL::VUserTaskQueue | |
intmax_t | m_workers = 0 |
Definition at line 47 of file UserTaskQueue.hh.
typedef std::uniform_int_distribution<int> PTL::UserTaskQueue::int_dist_t |
Definition at line 53 of file UserTaskQueue.hh.
typedef std::default_random_engine PTL::UserTaskQueue::random_engine_t |
Definition at line 52 of file UserTaskQueue.hh.
typedef VTask* PTL::UserTaskQueue::task_pointer |
Definition at line 50 of file UserTaskQueue.hh.
typedef std::vector<TaskSubQueue*> PTL::UserTaskQueue::TaskSubQueueContainer |
Definition at line 51 of file UserTaskQueue.hh.
UserTaskQueue::UserTaskQueue | ( | intmax_t | nworkers = -1 , |
UserTaskQueue * | parent = nullptr |
||
) |
Definition at line 37 of file UserTaskQueue.cc.
|
overridevirtual |
Definition at line 76 of file UserTaskQueue.cc.
|
inlineoverridevirtual |
Implements PTL::VUserTaskQueue.
Definition at line 146 of file UserTaskQueue.hh.
|
inlineoverridevirtual |
Implements PTL::VUserTaskQueue.
Definition at line 138 of file UserTaskQueue.hh.
|
overridevirtual |
Implements PTL::VUserTaskQueue.
Definition at line 120 of file UserTaskQueue.cc.
|
inlineoverridevirtual |
Implements PTL::VUserTaskQueue.
Definition at line 122 of file UserTaskQueue.hh.
|
overridevirtual |
Implements PTL::VUserTaskQueue.
Definition at line 305 of file UserTaskQueue.cc.
|
overridevirtual |
Implements PTL::VUserTaskQueue.
Definition at line 376 of file UserTaskQueue.cc.
|
protected |
Definition at line 138 of file UserTaskQueue.cc.
Referenced by InsertTask().
|
overridevirtual |
Implements PTL::VUserTaskQueue.
Definition at line 180 of file UserTaskQueue.cc.
|
overridevirtual |
Implements PTL::VUserTaskQueue.
Definition at line 127 of file UserTaskQueue.cc.
Referenced by ExecuteOnAllThreads(), ExecuteOnSpecificThreads(), GetTask(), GetThreadBinTask(), and InsertTask().
UserTaskQueue::task_pointer UserTaskQueue::GetThreadBinTask | ( | ) |
Definition at line 146 of file UserTaskQueue.cc.
Referenced by GetTask().
|
overridevirtual |
Implements PTL::VUserTaskQueue.
Definition at line 238 of file UserTaskQueue.cc.
Referenced by ExecuteOnAllThreads(), and ExecuteOnSpecificThreads().
|
overridevirtual |
Implements PTL::VUserTaskQueue.
Definition at line 95 of file UserTaskQueue.cc.
|
inlineoverridevirtual |
Implements PTL::VUserTaskQueue.
Definition at line 130 of file UserTaskQueue.hh.
|
inlineoverridevirtual |
Reimplemented from PTL::VUserTaskQueue.
Definition at line 154 of file UserTaskQueue.hh.
Referenced by GetTask(), and UserTaskQueue().
|
inlineoverridevirtual |
Reimplemented from PTL::VUserTaskQueue.
Definition at line 165 of file UserTaskQueue.hh.
Referenced by UserTaskQueue().
|
inlineoverridevirtual |