11 #ifndef CUBBYFLOW_ARRAY_VIEW_HPP 12 #define CUBBYFLOW_ARRAY_VIEW_HPP 18 template <
typename T,
size_t N,
typename Derived>
21 template <
typename T,
size_t N>
24 template <
typename T,
size_t N>
25 class ArrayView final :
public ArrayBase<T, N, ArrayView<T, N>>
27 using Base = ArrayBase<T, N, ArrayView<T, N>>;
35 ArrayView(T* ptr,
const Vector<size_t, N>& size);
37 template <
size_t M = N>
38 ArrayView(std::enable_if_t<(M == 1), T*> ptr,
size_t size);
52 void Set(Array<T, N>& other);
56 void Fill(
const T& val);
59 template <
typename T,
size_t N>
61 :
public ArrayBase<const T, N, ArrayView<const T, N>>
72 template <
size_t M = N>
73 ArrayView(std::enable_if_t<(M == 1), T*> ptr,
size_t size);
void Fill(const T &val)
Definition: ArrayView-Impl.hpp:86
Definition: ArrayBase.hpp:19
Definition: ArrayView.hpp:60
ArrayView()
Definition: ArrayView-Impl.hpp:19
void Set(Array< T, N > &other)
Definition: ArrayView-Impl.hpp:74
Vector< size_t, N > m_size
Definition: ArrayBase.hpp:125
Definition: Matrix.hpp:27
Definition: pybind11Utils.hpp:20
Definition: Array-Impl.hpp:19
~ArrayView() override=default
ArrayView & operator=(const ArrayView &other)
Definition: ArrayView-Impl.hpp:57
Generic N-dimensional array class interface.
Definition: Array.hpp:32
Reference At(size_t i)
Definition: ArrayBase-Impl.hpp:138
void SetPtrAndSize(Pointer ptr, size_t ni, Args... args)
Definition: ArrayBase-Impl.hpp:250