//============================================================================ // 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_cuda_internal_MakeThrustIterator_h #define vtk_m_cont_cuda_internal_MakeThrustIterator_h #include #include #include namespace vtkm { namespace cont { namespace cuda { namespace internal { template inline vtkm::exec::cuda::internal::IteratorFromArrayPortal IteratorBegin( const PortalType& portal) { vtkm::exec::cuda::internal::IteratorFromArrayPortal iterator(portal); return iterator; } template inline vtkm::exec::cuda::internal::IteratorFromArrayPortal IteratorEnd( const PortalType& portal) { vtkm::exec::cuda::internal::IteratorFromArrayPortal iterator(portal); iterator += static_cast(portal.GetNumberOfValues()); return iterator; } template inline T* IteratorBegin(const vtkm::exec::cuda::internal::ArrayPortalFromThrust& portal) { return portal.GetIteratorBegin(); } template inline T* IteratorEnd(const vtkm::exec::cuda::internal::ArrayPortalFromThrust& portal) { return portal.GetIteratorEnd(); } template inline const T* IteratorBegin( const vtkm::exec::cuda::internal::ConstArrayPortalFromThrust& portal) { return portal.GetIteratorBegin(); } template inline const T* IteratorEnd(const vtkm::exec::cuda::internal::ConstArrayPortalFromThrust& portal) { return portal.GetIteratorEnd(); } template inline T* IteratorBegin(const vtkm::internal::ArrayPortalBasicWrite& portal) { return portal.GetIteratorBegin(); } template inline T* IteratorEnd(const vtkm::internal::ArrayPortalBasicWrite& portal) { return portal.GetIteratorEnd(); } template inline const T* IteratorBegin(const vtkm::internal::ArrayPortalBasicRead& portal) { return portal.GetIteratorBegin(); } template inline const T* IteratorEnd(const vtkm::internal::ArrayPortalBasicRead& portal) { return portal.GetIteratorEnd(); } } } } } //namespace vtkm::cont::cuda::internal #endif