From adc9e63df96a0ecff02cf58c28547f36cb90e974 Mon Sep 17 00:00:00 2001 From: Robert Maynard Date: Fri, 23 Aug 2019 10:02:01 -0400 Subject: [PATCH] vtkm::cont::CastAndCall now supports CellSetExtrude --- vtkm/cont/CastAndCall.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/vtkm/cont/CastAndCall.h b/vtkm/cont/CastAndCall.h index dc5eb9aca..f0edb7b55 100644 --- a/vtkm/cont/CastAndCall.h +++ b/vtkm/cont/CastAndCall.h @@ -33,6 +33,7 @@ template class CellSetExplicit; template class CellSetPermutation; +class CellSetExtrude; /// A Generic interface to CastAndCall. The default implementation simply calls /// DynamicObject's CastAndCall, but specializations of this function exist for @@ -106,6 +107,15 @@ void CastAndCall(const vtkm::cont::CellSetPermutation(args)...); } +/// A specialization of CastAndCall for basic CellSetExtrude types, +/// Since the type is already known no deduction is needed. +/// This specialization is used to simplify numerous worklet algorithms +template +void CastAndCall(const vtkm::cont::CellSetExtrude& cellset, Functor&& f, Args&&... args) +{ + f(cellset, std::forward(args)...); +} + /// CastAndCall if the condition is true. template void ConditionalCastAndCall(std::true_type, Args&&... args)