19 using auto_const_t =
typename Base::template auto_const_t<T>;
23 template <
bool OtherIsConst,
typename U>
28 static_assert(!std::is_const_v<T>,
"Ty must be non-const");
34 using ThisViewer = std::conditional_t<IsConst, CViewer, Viewer>;
40 auto_const_t<T>* m_data =
nullptr;
41 size_t m_pitch_bytes = ~0;
42 size_t m_origin_width = 0;
43 size_t m_origin_height = 0;
52 template <
bool OtherIsConst>
54 MUDA_REQUIRES(!OtherIsConst);
61 const Extent2D& extent) MUDA_NOEXCEPT;
66 const Extent2D& extent) MUDA_NOEXCEPT;
70 MUDA_GENERIC auto_const_t<T>* data(
size_t x,
size_t y)
const MUDA_NOEXCEPT;
72 MUDA_GENERIC auto_const_t<T>* data(
size_t flatten_i)
const MUDA_NOEXCEPT;
74 MUDA_GENERIC auto_const_t<T>* origin_data()
const MUDA_NOEXCEPT;
78 MUDA_GENERIC
Extent2D extent()
const MUDA_NOEXCEPT;
80 MUDA_GENERIC
size_t pitch_bytes()
const MUDA_NOEXCEPT;
82 MUDA_GENERIC
Offset2D offset()
const MUDA_NOEXCEPT;
84 MUDA_GENERIC
size_t total_size()
const MUDA_NOEXCEPT;
86 MUDA_GENERIC
CViewer cviewer()
const MUDA_NOEXCEPT;
88 MUDA_GENERIC ThisViewer viewer()
const MUDA_NOEXCEPT;
90 MUDA_HOST
void copy_to(T* host)
const;
92 MUDA_HOST
void fill(
const T& v) MUDA_REQUIRES(!IsConst);
96 MUDA_HOST
void copy_from(
const T* host) MUDA_REQUIRES(!IsConst);
99 MUDA_GENERIC cudaPitchedPtr cuda_pitched_ptr()
const MUDA_NOEXCEPT;