Classes | |
struct | PerThread |
struct | ThreadData |
Public Types | |
typedef RunQueue< Task, 1024 > | Queue |
typedef Environment::Task | Task |
Public Member Functions | |
void | Cancel () EIGEN_OVERRIDE |
int | CurrentThreadId () const EIGEN_FINAL |
int | NumThreads () const EIGEN_FINAL |
void | Schedule (std::function< void()> fn) EIGEN_OVERRIDE |
void | ScheduleWithHint (std::function< void()> fn, int start, int limit) override |
void | SetStealPartitions (const std::vector< std::pair< unsigned, unsigned >> &partitions) |
ThreadPoolTempl (int num_threads, bool allow_spinning, Environment env=Environment()) | |
ThreadPoolTempl (int num_threads, Environment env=Environment()) | |
~ThreadPoolTempl () | |
Public Member Functions inherited from Eigen::ThreadPoolInterface | |
virtual | ~ThreadPoolInterface () |
Private Types | |
typedef Environment::EnvThread | Thread |
Private Member Functions | |
void | AssertBounds (int start, int end) |
void | ComputeCoprimes (int N, MaxSizeVector< unsigned > *coprimes) |
void | DecodePartition (unsigned val, unsigned *start, unsigned *limit) |
unsigned | EncodePartition (unsigned start, unsigned limit) |
PerThread * | GetPerThread () |
unsigned | GetStealPartition (int i) |
Task | GlobalSteal () |
Task | LocalSteal () |
int | NonEmptyQueueIndex () |
void | SetStealPartition (size_t i, unsigned val) |
Task | Steal (unsigned start, unsigned limit) |
bool | WaitForWork (EventCount::Waiter *waiter, Task *t) |
void | WorkerLoop (int thread_id) |
Static Private Member Functions | |
static uint64_t | GlobalThreadIdHash () |
static unsigned | Rand (uint64_t *state) |
Private Attributes | |
MaxSizeVector< MaxSizeVector< unsigned > > | all_coprimes_ |
const bool | allow_spinning_ |
std::atomic< unsigned > | blocked_ |
std::atomic< bool > | cancelled_ |
std::atomic< bool > | done_ |
EventCount | ec_ |
Environment | env_ |
unsigned | global_steal_partition_ |
std::unique_ptr< Barrier > | init_barrier_ |
const int | num_threads_ |
std::unordered_map< uint64_t, std::unique_ptr< PerThread > > | per_thread_map_ |
EIGEN_MUTEX | per_thread_map_mutex_ |
std::atomic< bool > | spinning_ |
MaxSizeVector< ThreadData > | thread_data_ |
MaxSizeVector< EventCount::Waiter > | waiters_ |
Static Private Attributes | |
static const int | kMaxPartitionBits |
static const int | kMaxThreads |
Definition at line 18 of file NonBlockingThreadPool.h.
typedef RunQueue<Task, 1024> Eigen::ThreadPoolTempl< Environment >::Queue |
Definition at line 21 of file NonBlockingThreadPool.h.
typedef Environment::Task Eigen::ThreadPoolTempl< Environment >::Task |
Definition at line 20 of file NonBlockingThreadPool.h.
|
private |
Definition at line 217 of file NonBlockingThreadPool.h.
|
inline |
Definition at line 23 of file NonBlockingThreadPool.h.
|
inline |
Definition at line 26 of file NonBlockingThreadPool.h.
|
inline |
Definition at line 69 of file NonBlockingThreadPool.h.
|
inlineprivate |
Definition at line 187 of file NonBlockingThreadPool.h.
|
inlinevirtual |
Reimplemented from Eigen::ThreadPoolInterface.
Definition at line 140 of file NonBlockingThreadPool.h.
|
inlineprivate |
Definition at line 201 of file NonBlockingThreadPool.h.
|
inlinevirtual |
Implements Eigen::ThreadPoolInterface.
Definition at line 157 of file NonBlockingThreadPool.h.
|
inlineprivate |
Definition at line 181 of file NonBlockingThreadPool.h.
|
inlineprivate |
Definition at line 177 of file NonBlockingThreadPool.h.
|
inlineprivate |
Definition at line 458 of file NonBlockingThreadPool.h.
|
inlineprivate |
Definition at line 197 of file NonBlockingThreadPool.h.
|
inlineprivate |
Definition at line 378 of file NonBlockingThreadPool.h.
|
inlinestaticprivate |
Definition at line 454 of file NonBlockingThreadPool.h.
|
inlineprivate |
Definition at line 364 of file NonBlockingThreadPool.h.
|
inlineprivate |
Definition at line 433 of file NonBlockingThreadPool.h.
|
inlinevirtual |
|
inlinestaticprivate |
Definition at line 474 of file NonBlockingThreadPool.h.
|
inlinevirtual |
Implements Eigen::ThreadPoolInterface.
Definition at line 103 of file NonBlockingThreadPool.h.
|
inlineoverridevirtual |
Reimplemented from Eigen::ThreadPoolInterface.
Definition at line 107 of file NonBlockingThreadPool.h.
|
inlineprivate |
Definition at line 193 of file NonBlockingThreadPool.h.
|
inline |
Definition at line 90 of file NonBlockingThreadPool.h.
|
inlineprivate |
Definition at line 338 of file NonBlockingThreadPool.h.
|
inlineprivate |
Definition at line 386 of file NonBlockingThreadPool.h.
|
inlineprivate |
Definition at line 256 of file NonBlockingThreadPool.h.
|
private |
Definition at line 241 of file NonBlockingThreadPool.h.
|
private |
Definition at line 239 of file NonBlockingThreadPool.h.
|
private |
Definition at line 244 of file NonBlockingThreadPool.h.
|
private |
Definition at line 247 of file NonBlockingThreadPool.h.
|
private |
Definition at line 246 of file NonBlockingThreadPool.h.
|
private |
Definition at line 248 of file NonBlockingThreadPool.h.
|
private |
Definition at line 237 of file NonBlockingThreadPool.h.
|
private |
Definition at line 243 of file NonBlockingThreadPool.h.
|
private |
Definition at line 250 of file NonBlockingThreadPool.h.
|
staticprivate |
Definition at line 174 of file NonBlockingThreadPool.h.
|
staticprivate |
Definition at line 175 of file NonBlockingThreadPool.h.
|
private |
Definition at line 238 of file NonBlockingThreadPool.h.
|
private |
Definition at line 252 of file NonBlockingThreadPool.h.
|
private |
Definition at line 251 of file NonBlockingThreadPool.h.
|
private |
Definition at line 245 of file NonBlockingThreadPool.h.
|
private |
Definition at line 240 of file NonBlockingThreadPool.h.
|
private |
Definition at line 242 of file NonBlockingThreadPool.h.