1 #ifndef SimTK_SimTKCOMMON_PARALLEL_WORK_QUEUE_H_
2 #define SimTK_SimTKCOMMON_PARALLEL_WORK_QUEUE_H_
32 class ParallelWorkQueue;
33 class ParallelWorkQueueImpl;
37 #ifndef SimTK_SIMTKCOMMON_DEFINING_PARALLEL_WORK_QUEUE
38 extern template class PIMPLHandle<ParallelWorkQueue, ParallelWorkQueueImpl>;
This header provides declarations of the user-visible portion of the PIMPLHandle template classes tha...
#define SimTK_SimTKCOMMON_EXPORT
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:224
static int getNumProcessors()
Get the total number of available processor cores (physical cores and hyperthreads on Intel architect...
Concrete subclasses of this abstract class represent tasks that can be executed by a ParallelWorkQueu...
Definition: ParallelWorkQueue.h:94
virtual void execute()=0
This method defines the task to be performed.
virtual ~Task()
Definition: ParallelWorkQueue.h:96
This class is used for performing multithreaded computations. It maintains a queue of tasks to be exe...
Definition: ParallelWorkQueue.h:66
ParallelWorkQueue(int queueSize, int numThreads=ParallelExecutor::getNumProcessors())
Construct a ParallelWorkQueue.
void flush()
Block until all Tasks that have been added to the queue finish executing.
void addTask(Task *task)
Add a Task to the queue.
This is the top-level SimTK namespace into which all SimTK names are placed to avoid collision with o...
Definition: Assembler.h:37