Eclipse SUMO - Simulation of Urban MObility
|
#include <WorkStealingThreadPool.h>
Public Member Functions | |
template<typename TaskT > | |
auto | executeAsync (TaskT &&task, int idx=-1) -> std::future< decltype(task(std::declval< CONTEXT >()))> |
void | waitAll () |
WorkStealingThreadPool (const bool workSteal, const std::vector< CONTEXT > &context) | |
~WorkStealingThreadPool () | |
Private Member Functions | |
void | run (size_t queueIndex, const CONTEXT &context) |
void | workStealRun (size_t queueIndex, const CONTEXT &context) |
Private Attributes | |
std::atomic< size_t > | myQueueIndex { 0 } |
std::vector< TaskQueue< CONTEXT > > | myQueues |
std::vector< std::thread > | myThreads |
const size_t | myTryoutCount |
Definition at line 30 of file WorkStealingThreadPool.h.
|
inlineexplicit |
Definition at line 33 of file WorkStealingThreadPool.h.
References WorkStealingThreadPool< CONTEXT >::myThreads, WorkStealingThreadPool< CONTEXT >::run(), and WorkStealingThreadPool< CONTEXT >::workStealRun().
|
inline |
Definition at line 46 of file WorkStealingThreadPool.h.
References WorkStealingThreadPool< CONTEXT >::myQueues, and WorkStealingThreadPool< CONTEXT >::myThreads.
|
inline |
Definition at line 56 of file WorkStealingThreadPool.h.
References WorkStealingThreadPool< CONTEXT >::myQueueIndex, WorkStealingThreadPool< CONTEXT >::myQueues, and WorkStealingThreadPool< CONTEXT >::myTryoutCount.
Referenced by WorkStealingThreadPool< CONTEXT >::waitAll().
|
inlineprivate |
Definition at line 86 of file WorkStealingThreadPool.h.
References WorkStealingThreadPool< CONTEXT >::myQueues.
Referenced by WorkStealingThreadPool< CONTEXT >::WorkStealingThreadPool().
|
inline |
Definition at line 75 of file WorkStealingThreadPool.h.
References WorkStealingThreadPool< CONTEXT >::executeAsync(), and WorkStealingThreadPool< CONTEXT >::myQueues.
|
inlineprivate |
Definition at line 95 of file WorkStealingThreadPool.h.
References WorkStealingThreadPool< CONTEXT >::myQueues, and WorkStealingThreadPool< CONTEXT >::myTryoutCount.
Referenced by WorkStealingThreadPool< CONTEXT >::WorkStealingThreadPool().
|
private |
Definition at line 112 of file WorkStealingThreadPool.h.
Referenced by WorkStealingThreadPool< CONTEXT >::executeAsync().
|
private |
Definition at line 111 of file WorkStealingThreadPool.h.
Referenced by WorkStealingThreadPool< CONTEXT >::executeAsync(), WorkStealingThreadPool< CONTEXT >::run(), WorkStealingThreadPool< CONTEXT >::waitAll(), WorkStealingThreadPool< CONTEXT >::workStealRun(), and WorkStealingThreadPool< CONTEXT >::~WorkStealingThreadPool().
|
private |
Definition at line 114 of file WorkStealingThreadPool.h.
Referenced by WorkStealingThreadPool< CONTEXT >::WorkStealingThreadPool(), and WorkStealingThreadPool< CONTEXT >::~WorkStealingThreadPool().
|
private |
Definition at line 113 of file WorkStealingThreadPool.h.
Referenced by WorkStealingThreadPool< CONTEXT >::executeAsync(), and WorkStealingThreadPool< CONTEXT >::workStealRun().