1 #ifndef SimTK_SimTKCOMMON_PARALLEL_EXECUTOR_H_ 2 #define SimTK_SimTKCOMMON_PARALLEL_EXECUTOR_H_ 33 class ParallelExecutor;
34 class ParallelExecutorImpl;
41 #ifndef SimTK_SIMTKCOMMON_DEFINING_PARALLEL_EXECUTOR 42 extern template class PIMPLHandle<ParallelExecutor, ParallelExecutorImpl>;
127 void execute(
Task& task,
int times);
133 static int getNumProcessors();
138 static bool isWorkerThread();
143 int getMaxThreads()
const;
158 virtual void execute(
int index) = 0;
176 #endif // SimTK_SimTKCOMMON_PARALLEL_EXECUTOR_H_ #define SimTK_SimTKCOMMON_EXPORT
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:224
This is the top-level SimTK namespace into which all SimTK names are placed to avoid collision with o...
Definition: Assembler.h:37
virtual ~Task()
Definition: ParallelExecutor.h:152
This class is used for performing multithreaded computations.
Definition: ParallelExecutor.h:99
virtual void finish()
This method is invoked once by each worker thread after all invocations of the task on that thread ar...
Definition: ParallelExecutor.h:170
virtual void initialize()
This method is invoked once by each worker thread before the task is executed.
Definition: ParallelExecutor.h:163
This header provides declarations of the user-visible portion of the PIMPLHandle template classes tha...
Concrete subclasses of this abstract class represent tasks that can be executed by a ParallelExecutor...
Definition: ParallelExecutor.h:150