//============================================================================ // 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. //============================================================================ #ifndef vtk_m_cont_arg_TransportTagBitField_h #define vtk_m_cont_arg_TransportTagBitField_h #include #include namespace vtkm { namespace cont { namespace arg { struct TransportTagBitFieldIn { }; struct TransportTagBitFieldOut { }; struct TransportTagBitFieldInOut { }; template struct Transport { using ExecObjectType = typename vtkm::cont::BitField::template ExecutionTypes::PortalConst; template VTKM_CONT ExecObjectType operator()(vtkm::cont::BitField& field, const InputDomainType&, vtkm::Id, vtkm::Id, vtkm::cont::Token& token) const { return field.PrepareForInput(Device{}, token); } }; template struct Transport { using ExecObjectType = typename vtkm::cont::BitField::template ExecutionTypes::Portal; template VTKM_CONT ExecObjectType operator()(vtkm::cont::BitField& field, const InputDomainType&, vtkm::Id, vtkm::Id, vtkm::cont::Token& token) const { // This behaves similarly to WholeArray tags, where "Out" maps to InPlace // since we don't want to reallocate or enforce size restrictions. return field.PrepareForInPlace(Device{}, token); } }; template struct Transport { using ExecObjectType = typename vtkm::cont::BitField::template ExecutionTypes::Portal; template VTKM_CONT ExecObjectType operator()(vtkm::cont::BitField& field, const InputDomainType&, vtkm::Id, vtkm::Id, vtkm::cont::Token& token) const { return field.PrepareForInPlace(Device{}, token); } }; } } } // namespace vtkm::cont::arg #endif //vtk_m_cont_arg_TransportTagBitField_h