VTK/Replacing vtkMultiThreader with vtkSMPTools

From KitwarePublic
< VTK
Revision as of 16:59, 13 June 2015 by Dgobbi (talk | contribs) (→‎vtkThreadedImageAlgorithm)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

The following VTK classes rely on vtkMultiThreader, and many of them can be converted to using vtkSMPTools instead:

Common/ExecutionModel/vtkThreadedImageAlgorithm.cxx
Filters/FlowPaths/vtkStreamer.cxx
Filters/Hybrid/vtkImplicitModeller.cxx
Rendering/Core/vtkImageMapper3D.cxx
Rendering/Volume/vtkEncodedGradientEstimator.cxx
Rendering/Volume/vtkFixedPointVolumeRayCastMapper.cxx
Rendering/Volume/vtkUnstructuredGridVolumeRayCastMapper.cxx
Rendering/Volume/vtkVolumeRayCastMapper.cxx
Geovis/Core/vtkGeoSource.cxx
IO/Video/vtkVideoSource.cxx
Web/Core/vtkDataEncoder.cxx

Algorithms that can be converted to vtkSMPTools

vtkThreadedImageAlgorithm

This is the base class for nearly all the VTK imaging filters, and it is probably the most difficult one to convert. Its conversion is the highest priority.

vtkStreamer

This is the base class for vtkStreamLine.

vtkImplicitModeller

Uses multithreading for its internal structured data processing.

vtkImageMapper3D

Uses multithreading for its color mapping operations.

vtkEncodedGradientEstimator

Base class for vtkFiniteDifferenceGradientEstimator, which uses multithreading to compute image gradients.

vtkVolumeRayCastMapper et al.

All of the CPU-based ray cast mappers divide the ray casting among the threads.

Algorithms that cannot be converted to vtkSMPTools

vtkGeoSource

This is not an SMP algorithm, it uses vtkMultiThreader to create a single background thread.

vtkVideoSource

This is not an SMP algorithm, it uses vtkMultiThreader to create a single background thread.

vtkDataEncoder

This is not an SMP algorithm, it uses vtkMultiThreader to create a single background thread.