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 119 __host__ __device__ __forceinline__
Reference(ValueType* ptr) : ptr(ptr) {}
122 __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 157 template <
typename QualifiedValueType>
159 QualifiedValueType* ptr)
187 template <
typename Distance>
195 template <
typename Distance>
203 template <
typename Distance>
211 template <
typename Distance>
221 return ptr - other.ptr;
225 template <
typename Distance>
234 return (ptr == rhs.ptr);
240 return (ptr != rhs.ptr);
__host__ __device__ __forceinline__ difference_type operator-(self_type other) const
Distance.
Optional outer namespace(s)
__host__ __device__ __forceinline__ self_type & operator+=(Distance n)
Addition assignment.
__host__ __device__ __forceinline__ bool operator!=(const self_type &rhs)
Not equal to.
CacheStoreModifier
Enumeration of cache modifiers for memory store operations.
void value_type
The type of the element the iterator can point to.
__host__ __device__ __forceinline__ self_type operator-(Distance n) const
Subtraction.
OffsetT difference_type
Type to express the result of subtracting one iterator from another.
__host__ __device__ __forceinline__ self_type & operator-=(Distance n)
Subtraction assignment.
friend std::ostream & operator<<(std::ostream &os, const self_type &itr)
ostream operator
__host__ __device__ __forceinline__ reference operator[](Distance n) const
Array subscript.
OffsetT OffsetT
[in] Total number of input data items
A random-access output wrapper for storing array values using a PTX cache-modifier.
CacheModifiedOutputIterator self_type
My own type.
__host__ __device__ __forceinline__ reference operator *() const
Indirection.
__host__ __device__ __forceinline__ bool operator==(const self_type &rhs)
Equal to.
__host__ __device__ __forceinline__ CacheModifiedOutputIterator(QualifiedValueType *ptr)
Constructor.
__host__ __device__ __forceinline__ self_type operator++()
Prefix increment.
void pointer
The type of a pointer to an element the iterator can point to.
__host__ __device__ __forceinline__ self_type operator++(int)
Postfix increment.
__host__ __device__ __forceinline__ self_type operator+(Distance n) const
Addition.
Reference reference
The type of a reference to an element the iterator can point to.
std::random_access_iterator_tag iterator_category
The iterator category.
__device__ __forceinline__ ValueType operator=(ValueType val)
Assignment.
__host__ __device__ __forceinline__ Reference(ValueType *ptr)
Constructor.
Removes const and volatile qualifiers from type Tp.