Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Christian Butz
VTK
Commits
aee5ac65
Commit
aee5ac65
authored
Jan 25, 2011
by
Dave Partyka
Committed by
Kitware Robot
Jan 25, 2011
Browse files
Merge topic 'vtk-max-threads'
68f2919a
Make VTK_MAX_THREADS configurable and default to 64.
parents
468485c3
68f2919a
Changes
4
Hide whitespace changes
Inline
Side-by-side
CMake/CMakeBackwardCompatibilityC.cmake
View file @
aee5ac65
...
...
@@ -62,6 +62,9 @@ IF(NOT CMAKE_SKIP_COMPATIBILITY_TESTS)
SET
(
CMAKE_USE_SPROC
${
CMAKE_USE_SPROC_INIT
}
CACHE BOOL
"Use sproc libs."
)
SET
(
VTK_MAX_THREADS
"64"
CACHE STRING
"Max number of threads vktMultiThreader will allocate."
)
IF
(
MINGW AND CMAKE_USE_PTHREADS AND CMAKE_USE_WIN32_THREADS
)
MESSAGE
(
STATUS
...
...
@@ -82,5 +85,6 @@ CMAKE_USE_SPROC
CMAKE_USE_WIN32_THREADS
CMAKE_X_CFLAGS
CMAKE_X_LIBS
VTK_MAX_THREADS
)
Common/vtkSystemIncludes.h
View file @
aee5ac65
...
...
@@ -106,29 +106,6 @@
// For volume rendering
#define VTK_MAX_VRCOMP 4
// For multithreading
// The maximum number of threads allowed
#ifdef VTK_USE_SPROC
#define VTK_MAX_THREADS 32
#endif
#ifdef VTK_USE_PTHREADS
#define VTK_MAX_THREADS 32
#endif
#ifdef VTK_USE_WIN32_THREADS
#define VTK_MAX_THREADS 8
#endif
#ifndef VTK_USE_WIN32_THREADS
#ifndef VTK_USE_SPROC
#ifndef VTK_USE_PTHREADS
#define VTK_MAX_THREADS 1
#endif
#endif
#endif
// If VTK_USE_PTHREADS is defined, then the multithreaded
// function is of type void *, and returns NULL
// Otherwise the type is void which is correct for WIN32
...
...
Filtering/vtkImageMultipleInputFilter.h
View file @
aee5ac65
...
...
@@ -14,7 +14,7 @@
=========================================================================*/
// .NAME vtkImageMultipleInputFilter - Generic filter that has N inputs.
// .SECTION Description
// vtkImageMultipleInputFilter is a super class for filters that
// vtkImageMultipleInputFilter is a super class for filters that
// have any number of inputs. Streaming is not available in this class yet.
// .SECTION See Also
...
...
@@ -36,7 +36,7 @@ public:
void
PrintSelf
(
ostream
&
os
,
vtkIndent
indent
);
// Description:
// Set an Input of this filter.
// Set an Input of this filter.
virtual
void
SetInput
(
int
num
,
vtkImageData
*
input
);
// Description:
...
...
@@ -44,7 +44,7 @@ public:
// Expands the list memory if necessary
virtual
void
AddInput
(
vtkImageData
*
input
);
virtual
void
RemoveInput
(
vtkImageData
*
input
);
// Description:
// Get one input to this filter.
vtkImageData
*
GetInput
(
int
num
);
...
...
@@ -52,7 +52,7 @@ public:
// Description:
// Turning bypass on will cause the filter to turn off and
// simply pass the data from the first input (input0) through.
// simply pass the data from the first input (input0) through.
// It is implemented for consistency with vtkImageToImageFilter.
vtkSetMacro
(
Bypass
,
int
);
vtkGetMacro
(
Bypass
,
int
);
...
...
@@ -60,19 +60,19 @@ public:
// Description:
// Get/Set the number of threads to create when rendering
vtkSet
Clamp
Macro
(
NumberOfThreads
,
int
,
1
,
VTK_MAX_THREADS
);
vtkSetMacro
(
NumberOfThreads
,
int
);
vtkGetMacro
(
NumberOfThreads
,
int
);
// Description:
// Putting this here until I merge graphics and imaging streaming.
virtual
int
SplitExtent
(
int
splitExt
[
6
],
int
startExt
[
6
],
virtual
int
SplitExtent
(
int
splitExt
[
6
],
int
startExt
[
6
],
int
num
,
int
total
);
// Description:
// The execute method created by the subclass.
// This is kept public instead of protected since it is called
// from a non-member thread function.
virtual
void
ThreadedExecute
(
vtkImageData
**
inDatas
,
virtual
void
ThreadedExecute
(
vtkImageData
**
inDatas
,
vtkImageData
*
outData
,
int
extent
[
6
],
int
threadId
);
...
...
@@ -87,9 +87,9 @@ protected:
int
NumberOfThreads
;
void
ComputeInputUpdateExtents
(
vtkDataObject
*
output
);
virtual
void
ComputeInputUpdateExtent
(
int
inExt
[
6
],
int
outExt
[
6
],
virtual
void
ComputeInputUpdateExtent
(
int
inExt
[
6
],
int
outExt
[
6
],
int
whichInput
);
...
...
vtkConfigure.h.in
View file @
aee5ac65
...
...
@@ -38,6 +38,7 @@
#cmakedefine VTK_USE_SPROC
#cmakedefine VTK_HP_PTHREADS
#cmakedefine VTK_USE_WIN32_THREADS
# define VTK_MAX_THREADS @VTK_MAX_THREADS@
/* Size of fundamental data types. */
/* Mac OS X uses two data models, ILP32 (in which integers, long integers,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment