31 #ifndef vtkMultiThreader_h
32 #define vtkMultiThreader_h
34 #include "vtkCommonCoreModule.h"
36 #include "vtkThreads.h"
40 #if defined(VTK_USE_PTHREADS)
42 #include <sys/types.h>
58 #ifdef VTK_USE_PTHREADS
59 typedef void* (*vtkThreadFunctionType)(
void*);
66 #ifdef VTK_USE_WIN32_THREADS
74 #if !defined(VTK_USE_PTHREADS) && !defined(VTK_USE_WIN32_THREADS)
118 vtkSetClampMacro(NumberOfThreads,
int, 1, VTK_MAX_THREADS);
119 virtual int GetNumberOfThreads();
126 static int GetGlobalStaticMaximumNumberOfThreads();
135 static void SetGlobalMaximumNumberOfThreads(
int val);
136 static int GetGlobalMaximumNumberOfThreads();
145 static void SetGlobalDefaultNumberOfThreads(
int val);
146 static int GetGlobalDefaultNumberOfThreads();
157 void SingleMethodExecute();
164 void MultipleMethodExecute();
191 void TerminateThread(
int threadId);
226 int SpawnedThreadActiveFlag[VTK_MAX_THREADS];
227 std::mutex* SpawnedThreadActiveFlagLock[VTK_MAX_THREADS];
233 void* MultipleData[VTK_MAX_THREADS];
abstract base class for most VTK objects
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void(* vtkThreadFunctionType)(void *)
A class for performing multithreaded execution.
This is the structure that is passed to the thread that is created from the SingleMethodExecute, MultipleMethodExecute or the SpawnThread method.
int vtkMultiThreaderIDType
a simple class to control print indentation
int vtkThreadProcessIDType
std::mutex * ActiveFlagLock
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
vtkThreadFunctionType SingleMethod