10 #ifndef vtk_m_cont_cuda_internal_MakeThrustIterator_h
11 #define vtk_m_cont_cuda_internal_MakeThrustIterator_h
26 template <
typename PortalType>
27 inline vtkm::exec::cuda::internal::IteratorFromArrayPortal<PortalType> IteratorBegin(
28 const PortalType& portal)
30 vtkm::exec::cuda::internal::IteratorFromArrayPortal<PortalType> iterator(portal);
34 template <
typename PortalType>
35 inline vtkm::exec::cuda::internal::IteratorFromArrayPortal<PortalType> IteratorEnd(
36 const PortalType& portal)
38 vtkm::exec::cuda::internal::IteratorFromArrayPortal<PortalType> iterator(portal);
39 iterator +=
static_cast<std::ptrdiff_t
>(portal.GetNumberOfValues());
44 inline T* IteratorBegin(
const vtkm::exec::cuda::internal::ArrayPortalFromThrust<T>& portal)
46 return portal.GetIteratorBegin();
50 inline T* IteratorEnd(
const vtkm::exec::cuda::internal::ArrayPortalFromThrust<T>& portal)
52 return portal.GetIteratorEnd();
56 inline const T* IteratorBegin(
57 const vtkm::exec::cuda::internal::ConstArrayPortalFromThrust<T>& portal)
59 return portal.GetIteratorBegin();
63 inline const T* IteratorEnd(
const vtkm::exec::cuda::internal::ConstArrayPortalFromThrust<T>& portal)
65 return portal.GetIteratorEnd();
69 inline T* IteratorBegin(
const vtkm::internal::ArrayPortalBasicWrite<T>& portal)
71 return portal.GetIteratorBegin();
75 inline T* IteratorEnd(
const vtkm::internal::ArrayPortalBasicWrite<T>& portal)
77 return portal.GetIteratorEnd();
81 inline const T* IteratorBegin(
const vtkm::internal::ArrayPortalBasicRead<T>& portal)
83 return portal.GetIteratorBegin();
87 inline const T* IteratorEnd(
const vtkm::internal::ArrayPortalBasicRead<T>& portal)
89 return portal.GetIteratorEnd();