Nektar++
|
A default ThreadManager. More...
#include <Thread.h>
Public Member Functions | |
ThreadStartupManager () | |
ThreadDefaultManager. More... | |
ThreadStartupManager (const ThreadStartupManager &src)=default | |
~ThreadStartupManager () override | |
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 | |
void | v_QueueJobs (std::vector< ThreadJob * > &joblist) override |
void | v_QueueJob (ThreadJob *job) override |
unsigned int | v_GetNumWorkers () override |
unsigned int | v_GetWorkerNum () override |
void | v_SetNumWorkers (const unsigned int num) override |
void | v_SetNumWorkers () override |
unsigned int | v_GetMaxNumWorkers () override |
void | v_Wait () override |
void | v_SetChunkSize (unsigned int chnk) override |
void | v_SetSchedType (SchedType s) override |
bool | v_InThread () override |
void | v_Hold () override |
bool | v_IsInitialised () override |
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 |
|
override |
Definition at line 200 of file Thread.cpp.
|
private |
ThreadDefaultManager copy constructor.
Definition at line 326 of file Thread.cpp.
|
overrideprotectedvirtual |
Implements Nektar::Thread::ThreadManager.
Definition at line 260 of file Thread.cpp.
|
overrideprotectedvirtual |
Implements Nektar::Thread::ThreadManager.
Definition at line 227 of file Thread.cpp.
|
overrideprotectedvirtual |
Implements Nektar::Thread::ThreadManager.
Definition at line 318 of file Thread.cpp.
References m_type.
|
overrideprotectedvirtual |
Implements Nektar::Thread::ThreadManager.
Definition at line 235 of file Thread.cpp.
|
overrideprotectedvirtual |
Implements Nektar::Thread::ThreadManager.
Definition at line 302 of file Thread.cpp.
|
overrideprotectedvirtual |
Implements Nektar::Thread::ThreadManager.
Definition at line 294 of file Thread.cpp.
|
overrideprotectedvirtual |
Implementations should not override this function, since they are initialised.
Reimplemented from Nektar::Thread::ThreadManager.
Definition at line 310 of file Thread.cpp.
Implements Nektar::Thread::ThreadManager.
Definition at line 218 of file Thread.cpp.
References Nektar::ErrorUtil::efatal, and NEKERROR.
|
overrideprotectedvirtual |
Implements Nektar::Thread::ThreadManager.
Definition at line 208 of file Thread.cpp.
References Nektar::ErrorUtil::efatal, and NEKERROR.
|
overrideprotectedvirtual |
Implements Nektar::Thread::ThreadManager.
Definition at line 276 of file Thread.cpp.
References Nektar::ErrorUtil::efatal, and NEKERROR.
|
overrideprotectedvirtual |
Implements Nektar::Thread::ThreadManager.
Definition at line 252 of file Thread.cpp.
|
overrideprotectedvirtual |
Implements Nektar::Thread::ThreadManager.
Definition at line 243 of file Thread.cpp.
References ASSERTL0.
Implements Nektar::Thread::ThreadManager.
Definition at line 285 of file Thread.cpp.
References Nektar::ErrorUtil::efatal, and NEKERROR.
|
overrideprotectedvirtual |
Implements Nektar::Thread::ThreadManager.
Definition at line 268 of file Thread.cpp.
|
private |
Definition at line 462 of file Thread.h.
Referenced by v_GetType().