10 #ifndef vtk_m_internal_FunctionInterface_h 
   11 #define vtk_m_internal_FunctionInterface_h 
   29 template <
typename OriginalSignature, 
typename Transform>
 
   30 struct FunctionInterfaceStaticTransformType;
 
   97 template <
typename FunctionSignature>
 
   98 class FunctionInterface
 
  100   template <
typename OtherSignature>
 
  101   friend class FunctionInterface;
 
  104   using Signature = FunctionSignature;
 
  113   explicit FunctionInterface(
const detail::ParameterContainer<FunctionSignature>& p)
 
  119   using SigInfo = detail::FunctionSigInfo<FunctionSignature>;
 
  120   using ComponentSig = 
typename SigInfo::Components;
 
  121   using ParameterSig = 
typename SigInfo::Parameters;
 
  123   template <vtkm::IdComponent ParameterIndex>
 
  126     using type = 
typename detail::AtType<ParameterIndex, FunctionSignature>::type;
 
  139   template <
typename Transform>
 
  140   struct StaticTransformType
 
  142     using type = FunctionInterface<
 
  143       typename detail::FunctionInterfaceStaticTransformType<FunctionSignature, Transform>::type>;
 
  191   template <
typename Transform>
 
  192   VTKM_CONT typename StaticTransformType<Transform>::type StaticTransformCont(
 
  193     const Transform& transform)
 
  195     using FuncIface = 
typename StaticTransformType<Transform>::type;
 
  196     using PC = detail::ParameterContainer<typename FuncIface::Signature>;
 
  197     return FuncIface{ detail::DoStaticTransformCont<PC>(transform, this->Parameters) };
 
  200   detail::ParameterContainer<FunctionSignature> Parameters;
 
  215 template <vtkm::IdComponent ParameterIndex, 
typename FunctionSignature>
 
  216 VTKM_EXEC_CONT auto ParameterGet(
const FunctionInterface<FunctionSignature>& fInterface)
 
  217   -> decltype(detail::ParameterGet(fInterface.Parameters,
 
  218                                    vtkm::internal::IndexTag<ParameterIndex>{}))
 
  220   return detail::ParameterGet(fInterface.Parameters, vtkm::internal::IndexTag<ParameterIndex>{});
 
  238 template <
typename R, 
typename... Args>
 
  239 FunctionInterface<R(Args...)> make_FunctionInterface(
const Args&... args)
 
  249   detail::ParameterContainer<R(Args...)> container = { args... };
 
  250   return FunctionInterface<R(Args...)>{ container };
 
  260 #endif //vtk_m_internal_FunctionInterface_h