[vtk-developers] vtkDepthSortPolyData modernization
Burlen Loring
burlen.loring at gmail.com
Fri Nov 13 12:00:15 EST 2015
Hi Will,
Your recent post mentioning changing std::sort to vtkSMPTools::Sort()
had me thinking about that, and also about giving the gift of code. In
the algorithm there are 3 distinct parts, computing the depths, sorting,
and building the output. Each of of those could be parallelized. I'm
willing to try it. Thanks for the suggestion!
Burlen
On 11/12/2015 10:20 AM, Will Schroeder wrote:
> Burlen I would use vtkSMPTools::Sort(). Under the hood it uses
> std::sort when VTK is built in VTK_SMP_IMPLEMENTATION_TYPE=Sequential
> mode (default). But when built with VTK_SMP_IMPLEMENTATION_TYPE=TBB,
> etc. you'll see significant parallelization benefits.
>
> W
>
> On Wed, Nov 11, 2015 at 12:04 PM, Burlen Loring
> <burlen.loring at gmail.com <mailto:burlen.loring at gmail.com>> wrote:
>
> Hi All,
>
> Would anyone be willing to review this patch?
> https://gitlab.kitware.com/vtk/vtk/merge_requests/844
>
> I was profiling VisIt and noticed that vtkDepthSortPolyData (in
> spite of its limitations it is used by VisIt for transparent
> rendering) made use of qsort and about 1/2 the time was spent by
> qsort. std::sort is known to be faster because of the possibility
> of the compiler to inline the comparisons. Updating qsort to
> std::sort seemed like an easy way to make it faster. As I worked
> the profiler pointed out a number of other fairly easy things to
> improve and overall the class is now ~3x faster for two of the
> modes and ~2x faster for the other. I enumerated the changes in
> the commit message and have added a cxx test to improve the test
> coverage.
>
> If you have the time, please take a look, and let me know if you
> have any feedback on it.
>
> Thanks
> Burlen
>
>
> _______________________________________________
> Powered by www.kitware.com <http://www.kitware.com>
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Search the list archives at:
> http://markmail.org/search/?q=vtk-developers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtk-developers
>
>
>
>
> --
> William J. Schroeder, PhD
> Kitware, Inc.
> 28 Corporate Drive
> Clifton Park, NY 12065
> will.schroeder at kitware.com <mailto:will.schroeder at kitware.com>
> http://www.kitware.com
> (518) 881-4902
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20151113/96386631/attachment.html>
More information about the vtk-developers
mailing list