19 #ifndef vtkMultiThreader_h
20 #define vtkMultiThreader_h
22 #include "vtkCommonCoreModule.h"
24 #include "vtkThreads.h"
28 #if defined(VTK_USE_PTHREADS)
30 #include <sys/types.h>
46 #ifdef VTK_USE_PTHREADS
47 typedef void* (*vtkThreadFunctionType)(
void*);
54 #ifdef VTK_USE_WIN32_THREADS
62 #if !defined(VTK_USE_PTHREADS) && !defined(VTK_USE_WIN32_THREADS)
70 VTK_ABI_NAMESPACE_BEGIN
107 vtkSetClampMacro(NumberOfThreads,
int, 1, VTK_MAX_THREADS);
108 virtual int GetNumberOfThreads();
115 static int GetGlobalStaticMaximumNumberOfThreads();
124 static void SetGlobalMaximumNumberOfThreads(
int val);
125 static int GetGlobalMaximumNumberOfThreads();
134 static void SetGlobalDefaultNumberOfThreads(
int val);
135 static int GetGlobalDefaultNumberOfThreads();
146 void SingleMethodExecute();
153 void MultipleMethodExecute();
180 void TerminateThread(
int threadId);
215 int SpawnedThreadActiveFlag[VTK_MAX_THREADS];
216 std::mutex* SpawnedThreadActiveFlagLock[VTK_MAX_THREADS];
222 void* MultipleData[VTK_MAX_THREADS];
231 VTK_ABI_NAMESPACE_END
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