29 size_t m_pitch_bytes = 0;
30 size_t m_pitch_bytes_area = 0;
31 Extent3D m_extent = Extent3D::Zero();
32 Extent3D m_capacity = Extent3D::Zero();
48 void copy_to(std::vector<T>& host)
const;
49 void copy_from(
const std::vector<T>& host);
52 void resize(
Extent3D new_size,
const T& value);
56 void fill(
const T& v);
58 Dense3D<T> viewer() MUDA_NOEXCEPT {
return view().viewer(); }
59 CDense3D<T> cviewer()
const MUDA_NOEXCEPT {
return view().viewer(); }
63 return view().subview(offset, extent);
68 m_data, m_pitch_bytes, m_pitch_bytes_area, Offset3D::Zero(), m_extent};
74 return view().subview(offset, extent);
80 m_data, m_pitch_bytes, m_pitch_bytes_area, Offset3D::Zero(), m_extent};
86 auto extent()
const MUDA_NOEXCEPT {
return m_extent; }
87 auto capacity()
const MUDA_NOEXCEPT {
return m_capacity; }
88 auto pitch_bytes()
const MUDA_NOEXCEPT {
return m_pitch_bytes; }
89 auto pitch_bytes_area()
const MUDA_NOEXCEPT {
return m_pitch_bytes_area; }
90 auto total_size()
const MUDA_NOEXCEPT
92 return m_extent.width() * m_extent.height() * m_extent.depth();
94 T* data() MUDA_NOEXCEPT {
return m_data; }
95 const T* data()
const MUDA_NOEXCEPT {
return m_data; }