18 #ifndef viskores_exec_CellLocatorMultiplexer_h
19 #define viskores_exec_CellLocatorMultiplexer_h
34 struct FindCellFunctor
36 template <
typename Locator>
42 return locator.FindCell(point, cellId, parametric);
45 template <
typename Locator,
typename LastCell>
50 LastCell& lastCell)
const
52 using ConcreteLastCell =
typename std::decay_t<Locator>::LastCell;
53 if (!lastCell.template IsType<ConcreteLastCell>())
55 lastCell = ConcreteLastCell{};
57 return locator.FindCell(point, cellId, parametric, lastCell.template Get<ConcreteLastCell>());
63 template <
typename... LocatorTypes>
66 viskores::exec::Variant<LocatorTypes...>
Locators;
71 using LastCell = viskores::exec::Variant<
typename LocatorTypes::LastCell...>;
73 template <
typename Locator>
83 return this->Locators.CastAndCall(detail::FindCellFunctor{}, point, cellId, parametric);
91 return this->Locators.CastAndCall(
92 detail::FindCellFunctor{}, point, cellId, parametric, lastCell);
99 #endif //viskores_exec_CellLocatorMultiplexer_h