Template Class Array4DView

Class Documentation

template<typename T>
class Array4DView

Lightweight non-owning view of 4D 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, int i3) 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.

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