//============================================================================ // Copyright (c) Kitware, Inc. // All rights reserved. // See LICENSE.txt for details. // This software is distributed WITHOUT ANY WARRANTY; without even // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR // PURPOSE. See the above copyright notice for more information. // // Copyright 2014 National Technology & Engineering Solutions of Sandia, LLC (NTESS). // Copyright 2014 UT-Battelle, LLC. // Copyright 2014 Los Alamos National Security. // // Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Under the terms of Contract DE-AC52-06NA25396 with Los Alamos National // Laboratory (LANL), the U.S. Government retains certain rights in // this software. //============================================================================ #ifndef vtk_m_worklet_WorkletMapField_h #define vtk_m_worklet_WorkletMapField_h #include #include #include #include #include #include #include #include #include #include namespace vtkm { namespace worklet { template class DispatcherMapField; /// Base class for worklets that do a simple mapping of field arrays. All /// inputs and outputs are on the same domain. That is, all the arrays are the /// same size. /// class WorkletMapField : public vtkm::worklet::internal::WorkletBase { public: template using Dispatcher = vtkm::worklet::DispatcherMapField; /// \brief A control signature tag for input fields. /// /// This tag takes a template argument that is a type list tag that limits /// the possible value types in the array. /// template struct FieldIn : vtkm::cont::arg::ControlSignatureTagBase { using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArray; using TransportTag = vtkm::cont::arg::TransportTagArrayIn; using FetchTag = vtkm::exec::arg::FetchTagArrayDirectIn; }; /// \brief A control signature tag for output fields. /// /// This tag takes a template argument that is a type list tag that limits /// the possible value types in the array. /// template struct FieldOut : vtkm::cont::arg::ControlSignatureTagBase { using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArray; using TransportTag = vtkm::cont::arg::TransportTagArrayOut; using FetchTag = vtkm::exec::arg::FetchTagArrayDirectOut; }; /// \brief A control signature tag for input-output (in-place) fields. /// /// This tag takes a template argument that is a type list tag that limits /// the possible value types in the array. /// template struct FieldInOut : vtkm::cont::arg::ControlSignatureTagBase { using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArray; using TransportTag = vtkm::cont::arg::TransportTagArrayInOut; using FetchTag = vtkm::exec::arg::FetchTagArrayDirectInOut; }; }; } } // namespace vtkm::worklet #endif //vtk_m_worklet_WorkletMapField_h