NDView¶
-
template<typename T, ssize_t Ndim = 2>
class NDView : public aare::ArrayExpr<NDView<T, 2>, 2>¶ Public Functions
-
NDView() = default¶
-
~NDView() = default¶
-
template<typename ...Ix>
inline std::enable_if_t<sizeof...(Ix) == 1 && (Ndim > 1), NDView<T, Ndim - 1>> operator()(Ix... index)¶
-
template<typename ...Ix>
inline std::enable_if_t<sizeof...(Ix) == Ndim, const T&> operator()(Ix... index) const¶
-
inline ssize_t size() const¶
-
inline size_t total_bytes() const¶
-
inline auto &shape() const¶
-
inline auto shape(ssize_t i) const¶
-
void print_all() const¶
-
inline NDView sub_view(ssize_t first, ssize_t last) const¶
Create a subview of a range of the first dimension. This is useful for splitting a batches of frames in parallel processing.
- Parameters:
first – The first index of the subview (inclusive).
last – The last index of the subview (exclusive).
- Throws:
std::runtime_error – if the range is invalid.
- Returns:
A new NDView that is a subview of the current view.
-
NDView() = default¶