18 #ifndef viskores_cont_cuda_internal_MakeThrustIterator_h
19 #define viskores_cont_cuda_internal_MakeThrustIterator_h
34 template <
typename PortalType>
35 inline viskores::exec::cuda::internal::IteratorFromArrayPortal<PortalType> IteratorBegin(
36 const PortalType& portal)
38 viskores::exec::cuda::internal::IteratorFromArrayPortal<PortalType> iterator(portal);
42 template <
typename PortalType>
43 inline viskores::exec::cuda::internal::IteratorFromArrayPortal<PortalType> IteratorEnd(
44 const PortalType& portal)
46 viskores::exec::cuda::internal::IteratorFromArrayPortal<PortalType> iterator(portal);
47 iterator +=
static_cast<std::ptrdiff_t
>(portal.GetNumberOfValues());
52 inline T* IteratorBegin(
const viskores::exec::cuda::internal::ArrayPortalFromThrust<T>& portal)
54 return portal.GetIteratorBegin();
58 inline T* IteratorEnd(
const viskores::exec::cuda::internal::ArrayPortalFromThrust<T>& portal)
60 return portal.GetIteratorEnd();
64 inline const T* IteratorBegin(
65 const viskores::exec::cuda::internal::ConstArrayPortalFromThrust<T>& portal)
67 return portal.GetIteratorBegin();
71 inline const T* IteratorEnd(
72 const viskores::exec::cuda::internal::ConstArrayPortalFromThrust<T>& portal)
74 return portal.GetIteratorEnd();
78 inline T* IteratorBegin(
const viskores::internal::ArrayPortalBasicWrite<T>& portal)
80 return portal.GetIteratorBegin();
84 inline T* IteratorEnd(
const viskores::internal::ArrayPortalBasicWrite<T>& portal)
86 return portal.GetIteratorEnd();
90 inline const T* IteratorBegin(
const viskores::internal::ArrayPortalBasicRead<T>& portal)
92 return portal.GetIteratorBegin();
96 inline const T* IteratorEnd(
const viskores::internal::ArrayPortalBasicRead<T>& portal)
98 return portal.GetIteratorEnd();