[vtk-developers] RFC: STL algos and C++11 for-range syntax with vtkDataArrays

Will Schroeder will.schroeder at kitware.com
Fri Nov 9 10:19:37 EST 2018


Great blog, thanks for the clear explanations and evaluations. It's a great
resource for folks trying to keep up with VTK.

As the blog hints at, one concern which is readily apparent when perusing
VTK source code is the number of options available to do the same thing.
I'd really like to see consolidation at some point. Many of our *core*
algorithms like contouring (whether you are looking at marching cubes,
synchronized templates or flying edges) use the old template macro
dispatch, while classes like vtkContourGrid use virtual methods etc. and so
on. If you are a budding visualization enthusiast or algorithm
writer/developer this can be quite confusing, as the code is increasingly
peppered with complexity -- a potential barrier to new developers and
community growth.

Finally, the examples used in the blog to demonstrate the different
iterators are necessarily simple. However I'd like to see how these various
approaches work in more complex algorithms when data flies in many
simultaneous directions :-)

But maybe the reality is that we need multiple options for good reasons
e.g., to address increasing computing complexity.... but I'd like to
explicitly agree this is the case rather than leaving a trail of alternate
implementations. So is there a roadmap for consolidation etc?

Best,


On Thu, Nov 8, 2018 at 5:21 PM Allie Vacanti <allison.vacanti at kitware.com>
wrote:

> Hi folks,
>
> I've written a set of STL-compatible utilities that allow vtkDataArrays to
> be efficiently used with STL algorithms as well as with C++11 for-range
> syntax. This consists of TupleRanges, which iterate through an array
> tuple-by-tuple and component-by-component, and ValueRanges, which iterate
> element-by-element using AOS-ordering.
>
> I've linked a blog post describing them in more detail, and a merge
> request available to play with / review / nitpick for anyone interested in
> doing so =)
>
> https://blog.kitware.com/c11-for-range-support-in-vtk/
> https://gitlab.kitware.com/vtk/vtk/merge_requests/4826
>
> Allie
> _______________________________________________
> Powered by 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:
> https://public.kitware.com/mailman/listinfo/vtk-developers
>
>

-- 
William J. Schroeder, PhD
Kitware, Inc. - Building the World's Technical Computing Software
28 Corporate Drive
Clifton Park, NY 12065
will.schroeder at kitware.com
http://www.kitware.com
(518) 881-4902
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/vtk-developers/attachments/20181109/ec2ffd25/attachment-0001.html>


More information about the vtk-developers mailing list