Nektar++
Classes | Typedefs | Enumerations | Functions
Nektar::Thread Namespace Reference

Classes

class  ThreadJob
 Base class for tasks to be sent to the ThreadManager to run. More...
 
class  ThreadManager
 The interface class for the controller for worker threads and jobs. More...
 
class  ThreadManagerBoost
 Implementation of ThreadManager using Boost threads. More...
 
class  ThreadMaster
 
class  ThreadStartupManager
 A default ThreadManager. More...
 
class  ThreadWorkerBoost
 Implementation class for ThreadManagerBoost. More...
 

Typedefs

typedef boost::shared_ptr< ThreadManagerThreadManagerSharedPtr
 
typedef LibUtilities::NekFactory< std::string, ThreadManager, unsigned int > ThreadManagerFactory
 
typedef boost::unique_lock< boost::shared_mutex > WriteLock
 
typedef boost::shared_lock< boost::shared_mutex > ReadLock
 
typedef boost::unique_lock< boost::mutex > Lock
 

Enumerations

enum  SchedType { e_guided, e_dynamic }
 Identifies the algorithm for scheduling. More...
 

Functions

ThreadManagerFactoryGetThreadManagerFactory ()
 
ThreadMasterGetThreadMaster ()
 

Typedef Documentation

typedef boost::unique_lock<boost::mutex> Nektar::Thread::Lock

Definition at line 52 of file ThreadBoost.h.

typedef boost::shared_lock<boost::shared_mutex> Nektar::Thread::ReadLock

Definition at line 325 of file Thread.h.

Definition at line 77 of file Thread.h.

Definition at line 74 of file Thread.h.

typedef boost::unique_lock<boost::shared_mutex> Nektar::Thread::WriteLock

Definition at line 324 of file Thread.h.

Enumeration Type Documentation

Identifies the algorithm for scheduling.

Currently there are two strategies to determine the number of jobs. e_static always loads m_chunkSize jobs onto each worker, e_guided uses a simple algorithm that loads a larger proportion of jobs onto the worker as the size of the queue list is large, but scales down to no fewer than m_chunkSize as the queue empties.

See also
ThreadManager::SetChunkSize()
Enumerator
e_guided 
e_dynamic 

Definition at line 67 of file Thread.h.

Function Documentation

ThreadManagerFactory & Nektar::Thread::GetThreadManagerFactory ( )

Definition at line 49 of file Thread.cpp.

Referenced by Nektar::Thread::ThreadMaster::CreateInstance().

50 {
51  typedef Loki::SingletonHolder<ThreadManagerFactory,
52  Loki::CreateUsingNew,
53  Loki::NoDestroy,
54  Loki::SingleThreaded> Type;
55  return Type::Instance();
56 }
LibUtilities::NekFactory< std::string, ThreadManager, unsigned int > ThreadManagerFactory
Definition: Thread.h:77
ThreadMaster & Nektar::Thread::GetThreadMaster ( )

Definition at line 143 of file Thread.cpp.

144 {
145  typedef Loki::SingletonHolder<ThreadMaster,
146  Loki::CreateUsingNew,
147  Loki::NoDestroy,
148  Loki::SingleThreaded> Type;
149  return Type::Instance();
150 }