|
Nektar++
|
A default ThreadManager. More...
#include <Thread.h>
Public Member Functions | |
| ThreadStartupManager () | |
| ThreadDefaultManager. More... | |
| ThreadStartupManager (const ThreadStartupManager &src)=default | |
| virtual | ~ThreadStartupManager () |
Public Member Functions inherited from Nektar::Thread::ThreadManager | |
| virtual | ~ThreadManager () |
| Destructor. More... | |
| void | QueueJobs (std::vector< ThreadJob * > &joblist) |
| Pass a list of tasklets to the master queue. More... | |
| void | QueueJob (ThreadJob *job) |
| Pass a single job to the master queue. More... | |
| unsigned int | GetNumWorkers () |
| Return the number of active workers. More... | |
| unsigned int | GetWorkerNum () |
| Returns the worker number of the executing thread. More... | |
| void | SetNumWorkers (const unsigned int num) |
| Sets the number of active workers. More... | |
| void | SetNumWorkers () |
| Sets the number of active workers to the maximum. More... | |
| unsigned int | GetMaxNumWorkers () |
| Gets the maximum available number of threads. More... | |
| void | Wait () |
| Waits until all queued jobs are finished. More... | |
| void | SetChunkSize (unsigned int chnk) |
| Controls how many jobs are sent to each worker at a time. More... | |
| void | SetSchedType (SchedType s) |
| Sets the current scheduling algorithm. More... | |
| bool | InThread () |
| Indicates whether the code is in a worker thread or not. More... | |
| void | Hold () |
| A calling threads holds until all active threads call this method. More... | |
| const std::string & | GetType () |
| Returns a description of the type of threading. More... | |
| bool | IsInitialised () |
| ThreadManager implementation. More... | |
| int | GetThrFromPartition (int pPartition) |
| int | GetRankFromPartition (int pPartition) |
| int | GetPartitionFromRankThr (int pRank, unsigned int pThr) |
Protected Member Functions | |
| virtual void | v_QueueJobs (std::vector< ThreadJob * > &joblist) override |
| virtual void | v_QueueJob (ThreadJob *job) override |
| virtual unsigned int | v_GetNumWorkers () override |
| virtual unsigned int | v_GetWorkerNum () override |
| virtual void | v_SetNumWorkers (const unsigned int num) override |
| virtual void | v_SetNumWorkers () override |
| virtual unsigned int | v_GetMaxNumWorkers () override |
| virtual void | v_Wait () override |
| virtual void | v_SetChunkSize (unsigned int chnk) override |
| virtual void | v_SetSchedType (SchedType s) override |
| virtual bool | v_InThread () override |
| virtual void | v_Hold () override |
| virtual bool | v_IsInitialised () override |
| virtual const std::string & | v_GetType () const override |
| virtual void | v_QueueJobs (std::vector< ThreadJob * > &joblist)=0 |
| virtual void | v_QueueJob (ThreadJob *job)=0 |
| virtual unsigned int | v_GetNumWorkers ()=0 |
| virtual unsigned int | v_GetWorkerNum ()=0 |
| virtual void | v_SetNumWorkers (const unsigned int num)=0 |
| virtual void | v_SetNumWorkers ()=0 |
| virtual unsigned int | v_GetMaxNumWorkers ()=0 |
| virtual void | v_Wait ()=0 |
| virtual void | v_SetChunkSize (unsigned int chnk)=0 |
| virtual void | v_SetSchedType (SchedType s)=0 |
| virtual bool | v_InThread ()=0 |
| virtual void | v_Hold ()=0 |
| virtual const std::string & | v_GetType () const =0 |
| virtual bool | v_IsInitialised () |
Private Member Functions | |
| ThreadStartupManager & | operator= (const ThreadStartupManager &src) |
| ThreadDefaultManager copy constructor. More... | |
Private Attributes | |
| const std::string | m_type |
A default ThreadManager.
This will be returned by ThreadMaster if a ThreadManager has not been initialised, such as if the code is still in static initialisation.
This manager pretends to be a ThreadManager with 1 thread. It will cause an error if anything more than trivial functions are called.
| Nektar::Thread::ThreadStartupManager::ThreadStartupManager | ( | ) |
|
default |
|
virtual |
Definition at line 204 of file Thread.cpp.
|
private |
ThreadDefaultManager copy constructor.
Definition at line 333 of file Thread.cpp.
|
overrideprotectedvirtual |
Implements Nektar::Thread::ThreadManager.
Definition at line 265 of file Thread.cpp.
|
overrideprotectedvirtual |
Implements Nektar::Thread::ThreadManager.
Definition at line 232 of file Thread.cpp.
|
overrideprotectedvirtual |
Implements Nektar::Thread::ThreadManager.
Definition at line 325 of file Thread.cpp.
References m_type.
|
overrideprotectedvirtual |
Implements Nektar::Thread::ThreadManager.
Definition at line 240 of file Thread.cpp.
|
overrideprotectedvirtual |
Implements Nektar::Thread::ThreadManager.
Definition at line 309 of file Thread.cpp.
|
overrideprotectedvirtual |
Implements Nektar::Thread::ThreadManager.
Definition at line 301 of file Thread.cpp.
|
overrideprotectedvirtual |
Implementations should not override this function, since they are initialised.
Reimplemented from Nektar::Thread::ThreadManager.
Definition at line 317 of file Thread.cpp.
Implements Nektar::Thread::ThreadManager.
Definition at line 222 of file Thread.cpp.
References Nektar::ErrorUtil::efatal, and NEKERROR.
|
overrideprotectedvirtual |
Implements Nektar::Thread::ThreadManager.
Definition at line 212 of file Thread.cpp.
References Nektar::ErrorUtil::efatal, and NEKERROR.
|
overrideprotectedvirtual |
Implements Nektar::Thread::ThreadManager.
Definition at line 281 of file Thread.cpp.
References Nektar::ErrorUtil::efatal, and NEKERROR.
|
overrideprotectedvirtual |
Implements Nektar::Thread::ThreadManager.
Definition at line 257 of file Thread.cpp.
|
overrideprotectedvirtual |
Implements Nektar::Thread::ThreadManager.
Definition at line 248 of file Thread.cpp.
References ASSERTL0.
Implements Nektar::Thread::ThreadManager.
Definition at line 291 of file Thread.cpp.
References Nektar::ErrorUtil::efatal, and NEKERROR.
|
overrideprotectedvirtual |
Implements Nektar::Thread::ThreadManager.
Definition at line 273 of file Thread.cpp.
|
private |
Definition at line 465 of file Thread.h.
Referenced by v_GetType().