Template Class Array3DView

Class Documentation

template<typename T>
class Array3DView

Lightweight non-owning view of 3D array data.

Public Functions

inline T *data() noexcept

Return pointer to the data.

inline const T *data() const noexcept

Return const pointer to the data.

inline int extent(int dim) const noexcept

Return the array extent in each dimension.

inline int size() const noexcept

Return the total size of the array.

inline T &operator()(int i0, int i1, int i2) const noexcept

Return reference to the element at the given indices.

inline T &operator[](int idx) const noexcept

Return reference to the element at the given linear index.

Array3DView(const Array3DView&) noexcept = default
Array3DView &operator=(const Array3DView&) noexcept = default