Classes | Public Types | Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
Eigen::NonBlockingThreadPoolTempl< Environment > Class Template Reference

#include <NonBlockingThreadPool.h>

Inheritance diagram for Eigen::NonBlockingThreadPoolTempl< Environment >:
Inheritance graph
[legend]

Classes

struct  PerThread
 

Public Types

typedef RunQueue< Task, 1024 > Queue
 
typedef Environment::Task Task
 

Public Member Functions

int CurrentThreadId () const final
 
 NonBlockingThreadPoolTempl (int num_threads, Environment env=Environment())
 
int NumThreads () const final
 
void Schedule (std::function< void()> fn)
 
 ~NonBlockingThreadPoolTempl ()
 
- Public Member Functions inherited from Eigen::ThreadPoolInterface
virtual ~ThreadPoolInterface ()
 

Private Types

typedef Environment::EnvThread Thread
 

Private Member Functions

int NonEmptyQueueIndex ()
 
Task Steal ()
 
bool WaitForWork (EventCount::Waiter *waiter, Task *t)
 
void WorkerLoop (int thread_id)
 

Static Private Member Functions

static EIGEN_STRONG_INLINE PerThreadGetPerThread ()
 
static EIGEN_STRONG_INLINE unsigned Rand (uint64_t *state)
 

Private Attributes

std::atomic< unsigned > blocked_
 
MaxSizeVector< unsigned > coprimes_
 
std::atomic< bool > done_
 
EventCount ec_
 
Environment env_
 
MaxSizeVector< Queue * > queues_
 
std::atomic< bool > spinning_
 
MaxSizeVector< Thread * > threads_
 
MaxSizeVector< EventCount::Waiterwaiters_
 

Detailed Description

template<typename Environment>
class Eigen::NonBlockingThreadPoolTempl< Environment >

Definition at line 17 of file NonBlockingThreadPool.h.

Member Typedef Documentation

template<typename Environment >
typedef RunQueue<Task, 1024> Eigen::NonBlockingThreadPoolTempl< Environment >::Queue

Definition at line 20 of file NonBlockingThreadPool.h.

template<typename Environment >
typedef Environment::Task Eigen::NonBlockingThreadPoolTempl< Environment >::Task

Definition at line 19 of file NonBlockingThreadPool.h.

template<typename Environment >
typedef Environment::EnvThread Eigen::NonBlockingThreadPoolTempl< Environment >::Thread
private

Definition at line 115 of file NonBlockingThreadPool.h.

Constructor & Destructor Documentation

template<typename Environment >
Eigen::NonBlockingThreadPoolTempl< Environment >::NonBlockingThreadPoolTempl ( int  num_threads,
Environment  env = Environment() 
)
inline

Definition at line 22 of file NonBlockingThreadPool.h.

template<typename Environment >
Eigen::NonBlockingThreadPoolTempl< Environment >::~NonBlockingThreadPoolTempl ( )
inline

Definition at line 62 of file NonBlockingThreadPool.h.

Member Function Documentation

template<typename Environment >
int Eigen::NonBlockingThreadPoolTempl< Environment >::CurrentThreadId ( ) const
inlinefinalvirtual

Implements Eigen::ThreadPoolInterface.

Definition at line 104 of file NonBlockingThreadPool.h.

template<typename Environment >
static EIGEN_STRONG_INLINE PerThread* Eigen::NonBlockingThreadPoolTempl< Environment >::GetPerThread ( )
inlinestaticprivate

Definition at line 255 of file NonBlockingThreadPool.h.

template<typename Environment >
int Eigen::NonBlockingThreadPoolTempl< Environment >::NonEmptyQueueIndex ( )
inlineprivate

Definition at line 237 of file NonBlockingThreadPool.h.

template<typename Environment >
int Eigen::NonBlockingThreadPoolTempl< Environment >::NumThreads ( ) const
inlinefinalvirtual

Implements Eigen::ThreadPoolInterface.

Definition at line 100 of file NonBlockingThreadPool.h.

template<typename Environment >
static EIGEN_STRONG_INLINE unsigned Eigen::NonBlockingThreadPoolTempl< Environment >::Rand ( uint64_t state)
inlinestaticprivate

Definition at line 261 of file NonBlockingThreadPool.h.

template<typename Environment >
void Eigen::NonBlockingThreadPoolTempl< Environment >::Schedule ( std::function< void()>  fn)
inlinevirtual

Implements Eigen::ThreadPoolInterface.

Definition at line 74 of file NonBlockingThreadPool.h.

template<typename Environment >
Task Eigen::NonBlockingThreadPoolTempl< Environment >::Steal ( )
inlineprivate

Definition at line 173 of file NonBlockingThreadPool.h.

template<typename Environment >
bool Eigen::NonBlockingThreadPoolTempl< Environment >::WaitForWork ( EventCount::Waiter waiter,
Task t 
)
inlineprivate

Definition at line 195 of file NonBlockingThreadPool.h.

template<typename Environment >
void Eigen::NonBlockingThreadPoolTempl< Environment >::WorkerLoop ( int  thread_id)
inlineprivate

Definition at line 135 of file NonBlockingThreadPool.h.

Member Data Documentation

template<typename Environment >
std::atomic<unsigned> Eigen::NonBlockingThreadPoolTempl< Environment >::blocked_
private

Definition at line 129 of file NonBlockingThreadPool.h.

template<typename Environment >
MaxSizeVector<unsigned> Eigen::NonBlockingThreadPoolTempl< Environment >::coprimes_
private

Definition at line 127 of file NonBlockingThreadPool.h.

template<typename Environment >
std::atomic<bool> Eigen::NonBlockingThreadPoolTempl< Environment >::done_
private

Definition at line 131 of file NonBlockingThreadPool.h.

template<typename Environment >
EventCount Eigen::NonBlockingThreadPoolTempl< Environment >::ec_
private

Definition at line 132 of file NonBlockingThreadPool.h.

template<typename Environment >
Environment Eigen::NonBlockingThreadPoolTempl< Environment >::env_
private

Definition at line 124 of file NonBlockingThreadPool.h.

template<typename Environment >
MaxSizeVector<Queue*> Eigen::NonBlockingThreadPoolTempl< Environment >::queues_
private

Definition at line 126 of file NonBlockingThreadPool.h.

template<typename Environment >
std::atomic<bool> Eigen::NonBlockingThreadPoolTempl< Environment >::spinning_
private

Definition at line 130 of file NonBlockingThreadPool.h.

template<typename Environment >
MaxSizeVector<Thread*> Eigen::NonBlockingThreadPoolTempl< Environment >::threads_
private

Definition at line 125 of file NonBlockingThreadPool.h.

template<typename Environment >
MaxSizeVector<EventCount::Waiter> Eigen::NonBlockingThreadPoolTempl< Environment >::waiters_
private

Definition at line 128 of file NonBlockingThreadPool.h.


The documentation for this class was generated from the following file:


gtsam
Author(s):
autogenerated on Sat May 8 2021 02:53:23