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 std::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

◆ Lock

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

Definition at line 51 of file ThreadBoost.h.

◆ ReadLock

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

Definition at line 323 of file Thread.h.

◆ ThreadManagerFactory

Definition at line 75 of file Thread.h.

◆ ThreadManagerSharedPtr

Definition at line 72 of file Thread.h.

◆ WriteLock

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

Definition at line 322 of file Thread.h.

Enumeration Type Documentation

◆ SchedType

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 65 of file Thread.h.

Function Documentation

◆ GetThreadManagerFactory()

ThreadManagerFactory & Nektar::Thread::GetThreadManagerFactory ( )

Definition at line 50 of file Thread.cpp.

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

51 {
52  static ThreadManagerFactory instance;
53  return instance;
54 }
LibUtilities::NekFactory< std::string, ThreadManager, unsigned int > ThreadManagerFactory
Definition: Thread.h:75

◆ GetThreadMaster()

ThreadMaster & Nektar::Thread::GetThreadMaster ( )

Definition at line 141 of file Thread.cpp.

142 {
143  static ThreadMaster instance;
144  return instance;
145 }