10 #ifndef vtk_m_cont_CellLocatorChooser_h 
   11 #define vtk_m_cont_CellLocatorChooser_h 
   28 template <
typename CellSetType, 
typename CoordinateSystemArrayType>
 
   29 struct CellLocatorChooserImpl
 
   37 struct CellLocatorChooserImpl<
vtkm::cont::CellSetStructured<3>, UniformArray>
 
   42 using RectilinearArray =
 
   48 struct CellLocatorChooserImpl<
vtkm::cont::CellSetStructured<3>, RectilinearArray>
 
   62 template <
typename CellSetType, 
typename CoordinateSystemArrayType>
 
   69 struct CastAndCallCellLocatorChooserFunctor
 
   71   template <
typename CellLocatorType, 
typename Functor, 
typename... Args>
 
   77     CellLocatorType locator;
 
   78     locator.SetCellSet(cellSet);
 
   79     locator.SetCoordinates(coordinateSystem);
 
   81     functor(locator, std::forward<Args>(args)...);
 
   84   template <
typename CellSetType, 
typename Functor, 
typename... Args>
 
   85   void operator()(
const CellSetType& cellSet,
 
   90     this->CallFunctorWithLocator<vtkm::cont::CellLocatorTwoLevel>(
 
   91       cellSet, coordinateSystem, std::forward<Functor>(functor), std::forward<Args>(args)...);
 
   94   template <
typename Functor, 
typename... Args>
 
  100     auto coordArray = coordinateSystem.
GetData();
 
  103       this->CallFunctorWithLocator<vtkm::cont::CellLocatorUniformGrid>(
 
  104         cellSet, coordinateSystem, std::forward<Functor>(functor), std::forward<Args>(args)...);
 
  108       this->CallFunctorWithLocator<vtkm::cont::CellLocatorRectilinearGrid>(
 
  109         cellSet, coordinateSystem, std::forward<Functor>(functor), std::forward<Args>(args)...);
 
  113       this->CallFunctorWithLocator<vtkm::cont::CellLocatorTwoLevel>(
 
  114         cellSet, coordinateSystem, std::forward<Functor>(functor), std::forward<Args>(args)...);
 
  129 template <
typename CellSetType, 
typename Functor, 
typename... Args>
 
  136                           detail::CastAndCallCellLocatorChooserFunctor{},
 
  138                           std::forward<Functor>(functor),
 
  139                           std::forward<Args>(args)...);
 
  149 template <
typename Functor, 
typename... Args>
 
  156                                 std::forward<Functor>(functor),
 
  157                                 std::forward<Args>(args)...);
 
  163 #endif //vtk_m_cont_CellLocatorChooser_h