39 #include "../thread/thread_load.cuh"
40 #include "../thread/thread_store.cuh"
41 #include "../util_device.cuh"
42 #include "../util_namespace.cuh"
44 #if (THRUST_VERSION >= 100700)
46 #include <thrust/iterator/iterator_facade.h>
47 #include <thrust/iterator/iterator_traits.h>
48 #endif // THRUST_VERSION
108 typename Offset = ptrdiff_t>
119 __host__ __device__ __forceinline__ Reference(ValueType* ptr) : ptr(ptr) {}
122 __host__ __device__ __forceinline__ ValueType operator =(ValueType val)
124 ThreadStore<MODIFIER>(ptr, val);
138 #if (THRUST_VERSION >= 100700)
140 typedef typename thrust::detail::iterator_facade_category<
141 thrust::device_system_tag,
142 thrust::random_access_traversal_tag,
148 #endif // THRUST_VERSION
182 return Reference(ptr);
186 template <
typename Distance>
194 template <
typename Distance>
202 template <
typename Distance>
210 template <
typename Distance>
220 return ptr - other.ptr;
224 template <
typename Distance>
227 return Reference(ptr + n);
233 return (ptr == rhs.ptr);
239 return (ptr != rhs.ptr);