37 #include <boost/core/ignore_unused.hpp>
122 m_mutex(), m_threadingType()
160 "Tried to SetThreadingType when it was already set");
199 "Trying to create a ThreadManager before SetThreadingType called");
228 boost::ignore_unused(joblist);
230 "Attempted to QueueJobs in ThreadDefaultManager");
239 boost::ignore_unused(job);
241 "Attempted to QueueJob in ThreadDefaultManager");
269 "Attempted to SetNumWorkers to != 1 in ThreadDefaultManager");
305 boost::ignore_unused(chnk);
307 "Attempted to SetChunkSize in ThreadDefaultManager");
316 boost::ignore_unused(s);
318 "Attempted to SetSchedType in ThreadDefaultManager");
364 boost::ignore_unused(src);
#define ASSERTL0(condition, msg)
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mode...
Provides a generic Factory class.
tBaseSharedPtr CreateInstance(tKey idKey, tParam... args)
Create an instance of the class referred to by idKey.
Base class for tasks to be sent to the ThreadManager to run.
virtual ~ThreadJob()
Base destructor.
void SetWorkerNum(unsigned int num)
Set number of worker threads.
ThreadJob()
Base constructor.
unsigned int GetWorkerNum()
virtual ~ThreadManager()
Destructor.
virtual bool IsInitialised()
ThreadManager implementation.
~ThreadMaster()
Destructor.
void SetThreadingType(const std::string &p_type)
Sets what ThreadManagers will be created in CreateInstance.
ThreadManagerSharedPtr CreateInstance(const ThreadManagerName t, unsigned int nThr)
Creates an instance of a ThreadManager (which one is determined by a previous call to SetThreadingTyp...
ThreadManagerSharedPtr & GetInstance(const ThreadManagerName t)
Gets the ThreadManager associated with string s.
ThreadMaster()
Constructor.
std::vector< ThreadManagerSharedPtr > m_threadManagers
std::string m_threadingType
virtual bool IsInitialised()
ThreadManager implementation.
virtual void SetChunkSize(unsigned int chnk)
Controls how many jobs are sent to each worker at a time.
virtual void Wait()
Waits until all queued jobs are finished.
virtual ~ThreadStartupManager()
ThreadStartupManager & operator=(const ThreadStartupManager &src)
ThreadDefaultManager copy constructor.
virtual unsigned int GetNumWorkers()
Return the number of active workers.
virtual unsigned int GetMaxNumWorkers()
Gets the maximum available number of threads.
ThreadStartupManager()
ThreadDefaultManager.
virtual void SetNumWorkers()
Sets the number of active workers to the maximum.
virtual bool InThread()
Indicates whether the code is in a worker thread or not.
virtual const std::string & GetType() const
Returns a description of the type of threading.
virtual void QueueJobs(std::vector< ThreadJob * > &joblist)
Pass a list of tasklets to the master queue.
virtual void SetSchedType(SchedType s)
Sets the current scheduling algorithm.
virtual void QueueJob(ThreadJob *job)
Pass a single job to the master queue.
virtual unsigned int GetWorkerNum()
Returns the worker number of the executing thread.
virtual void Hold()
A calling threads holds until all active threads call this method.
SchedType
Identifies the algorithm for scheduling.
ThreadManagerFactory & GetThreadManagerFactory()
std::shared_ptr< ThreadManager > ThreadManagerSharedPtr
ThreadMaster & GetThreadMaster()
The above copyright notice and this permission notice shall be included.