Skip to content

vtkm::ListForEach can handle passing any number of extra arguments

Rather than requiring all the arguments to be placed as member variables to the functor you can now pass extra arguments that will be added to the functor call signature.

So for example:

  vtkm::ForEach(functor, vtkm::TypeListTagCommon(), double{42.0}, int{42});

will be converted into:

  functor(vtkm::Int32, double, int)
  functor(vtkm::Int64, double, int)
  functor(vtkm::Float32, double, int)
  functor(vtkm::Float64, double, int)
  ...
Edited by Robert Maynard

Merge request reports

Loading