[vtk-developers] vtkAbstractTransform and thread safety

David Lonie david.lonie at kitware.com
Wed May 29 17:13:24 EDT 2013


On Wed, May 29, 2013 at 4:57 PM, David Gobbi <david.gobbi at gmail.com> wrote:

> I agree that the critical sections are probably not necessary.  But
> instead of removing them completely, it might be best to add a
> boolean method to specify whether they are to be used.
>

Sounds good, and this modification still gives a big boost to performance.
I'll update my patch.


> I suspect that another thing that is slowing down vtkGlyph3D and
> many other algorithms is the fact that vtkDataArray::GetTuple(),
> and therefore vtkPoints::GetPoints() which uses it, involves a
> virtual method call.  For hot code paths like
> vtkLinearTransform::TransformPoints() as defined in
> vtkLinearTransform.cxx, a SafeDownCast to vtkFloatArray or
> vtkDoubleArray would allow the use of the inlined GetTupleValue()
> and SetTupleValue() methods.
>

Thanks for the pointer, I'll take a look at this next.

Dave
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20130529/99cb7c13/attachment.html>


More information about the vtk-developers mailing list