40 #ifndef ECUDA_PTR_STRIDING_PTR_HPP
41 #define ECUDA_PTR_STRIDING_PTR_HPP
45 #include "../global.hpp"
46 #include "../type_traits.hpp"
47 #include "../utility.hpp"
77 template<typename T,typename P=typename ecuda::add_pointer<T>::type>
100 template<
typename U,
typename Q>
103 #ifdef ECUDA_CPP11_AVAILABLE
108 ptr = std::move(src.ptr);
109 stride = std::move(src.stride);
137 template<
typename T2,
typename P2>
__HOST__ __DEVICE__ inline bool operator< ( const striding_ptr<T2,P2>& other )
const {
return ptr < other.ptr; }
139 template<
typename T2,
typename P2>
__HOST__ __DEVICE__ inline bool operator<=( const striding_ptr<T2,P2>& other )
const {
return ptr <= other.ptr; }
142 template<
typename U,
typename V>
143 friend std::basic_ostream<U,V>& operator<<( std::basic_ostream<U,V>& out,
const striding_ptr& ptr )
145 out <<
"striding_ptr(ptr=" << ptr.ptr <<
";stride=" << ptr.stride <<
")";
std::ptrdiff_t difference_type
__DEVICE__ const_reference operator*() const
__HOST__ __DEVICE__ striding_ptr & operator+=(int x)
__HOST__ __DEVICE__ bool operator!=(const striding_ptr< T2, P2 > &other) const
__HOST__ __DEVICE__ striding_ptr operator++(int)
__HOST__ __DEVICE__ striding_ptr(const striding_ptr &src)
__HOST__ __DEVICE__ striding_ptr & operator++()
__HOST__ __DEVICE__ size_type get_stride() const
__HOST__ __DEVICE__ striding_ptr & operator--()
__DEVICE__ const_reference operator[](std::size_t i) const
__HOST__ __DEVICE__ bool operator>(const striding_ptr< T2, P2 > &other) const
__HOST__ __DEVICE__ striding_ptr(const striding_ptr< U, Q > &src)
__HOST__ __DEVICE__ bool operator>=(const striding_ptr< T2, P2 > &other) const
__HOST__ __DEVICE__ striding_ptr(pointer ptr=pointer(), size_type stride=0)
A specialized pointer to striding memory.
const T & const_reference
__DEVICE__ reference operator*()
__HOST__ __DEVICE__ striding_ptr operator-(int x) const
__DEVICE__ reference operator[](std::size_t i)
__HOST__ __DEVICE__ striding_ptr operator+(int x) const
__DEVICE__ pointer operator->() const
__HOST__ __DEVICE__ bool operator==(const striding_ptr< T2, P2 > &other) const
__HOST__ __DEVICE__ striding_ptr & operator-=(int x)
__HOST__ __DEVICE__ striding_ptr operator--(int)
friend class striding_ptr