33 template<
typename T,
int Str
ideUnits = sizeof(T)>
class strided_ptr {
48 m_stride = p.m_stride;
61 constexpr
T&
operator[](ptrdiff_t pos)
const {
return get(pos); }
62 constexpr
T*
data()
const {
return m_ptr; }
63 constexpr ptrdiff_t
stride()
const {
return m_stride; }
66 constexpr
bool operator==(
const T* p)
const {
return m_ptr == p; }
67 constexpr
bool operator!=(
const T* p)
const {
return m_ptr != p; }
121 ptrdiff_t m_stride = 1;
125 constexpr
inline T* getptr(ptrdiff_t pos = 0) const noexcept
127 return (
T*)((
char*)m_ptr + pos * m_stride * StrideUnits);
129 constexpr
inline T&
get(ptrdiff_t pos = 0)
const noexcept
constexpr strided_ptr operator-(ptrdiff_t d) const noexcept
constexpr T * data() const
const strided_ptr & operator=(T *p) noexcept
constexpr T & operator*() const
constexpr T & operator[](ptrdiff_t pos) const
GLint GLenum GLboolean GLsizei stride
constexpr bool operator==(const T *p) const
constexpr strided_ptr(T *ptr=nullptr, ptrdiff_t stride=1) noexcept
const strided_ptr & operator--()
const strided_ptr & operator=(const strided_ptr &p) noexcept
const strided_ptr & operator+=(ptrdiff_t d) noexcept
const strided_ptr operator--(int)
const strided_ptr & operator++()
constexpr strided_ptr(const strided_ptr &p) noexcept
const strided_ptr & operator-=(ptrdiff_t d)
constexpr bool operator!=(const T *p) const
const strided_ptr operator++(int)
#define OIIO_NAMESPACE_END
constexpr strided_ptr operator+(ptrdiff_t d) const noexcept
constexpr ptrdiff_t stride() const
#define OIIO_NAMESPACE_BEGIN