CubbyFlow::ArrayView< T, N > Class Template Reference
Generic N-dimensional array class interface. More...
#include <Core/Array/Array.hpp>
Inheritance diagram for CubbyFlow::ArrayView< T, N >:
Public Member Functions | |
ArrayView () | |
ArrayView (T *ptr, const Vector< size_t, N > &size) | |
template<size_t M = N> | |
ArrayView (std::enable_if_t<(M==1), T *> ptr, size_t size) | |
ArrayView (Array< T, N > &other) | |
~ArrayView () override=default | |
ArrayView (const ArrayView &other) | |
ArrayView (ArrayView &&other) noexcept | |
ArrayView & | operator= (const ArrayView &other) |
ArrayView & | operator= (ArrayView &&other) noexcept |
void | Set (Array< T, N > &other) |
void | Set (const ArrayView &other) |
void | Fill (const T &val) |
Public Member Functions inherited from CubbyFlow::ArrayBase< T, N, ArrayView< T, N > > | |
size_t | Index (size_t i) const |
size_t | Index (size_t i, Args... args) const |
size_t | Index (const Vector< size_t, N > &idx) const |
Pointer | data () |
ConstPointer | data () const |
const Vector< size_t, N > & | Size () const |
std::enable_if_t<(M > 0), size_t > | Width () const |
std::enable_if_t<(M > 0), size_t > | Width () const |
std::enable_if_t<(M > 1), size_t > | Height () const |
std::enable_if_t<(M > 1), size_t > | Height () const |
std::enable_if_t<(M > 2), size_t > | Depth () const |
std::enable_if_t<(M > 2), size_t > | Depth () const |
bool | IsEmpty () const |
size_t | Length () const |
Iterator | begin () |
ConstIterator | begin () const |
Iterator | end () |
ConstIterator | end () const |
Iterator | rbegin () |
ConstIterator | rbegin () const |
Iterator | rend () |
ConstIterator | rend () const |
Reference | At (size_t i) |
ConstReference | At (size_t i) const |
Reference | At (size_t i, Args... args) |
ConstReference | At (size_t i, Args... args) const |
Reference | At (const Vector< size_t, N > &idx) |
ConstReference | At (const Vector< size_t, N > &idx) const |
T & | At (size_t i, Args... args) |
const T & | At (size_t i, Args... args) const |
Reference | operator[] (size_t i) |
ConstReference | operator[] (size_t i) const |
Reference | operator() (size_t i, Args... args) |
ConstReference | operator() (size_t i, Args... args) const |
Reference | operator() (const Vector< size_t, N > &idx) |
ConstReference | operator() (const Vector< size_t, N > &idx) const |
T & | operator() (size_t i, Args... args) |
const T & | operator() (size_t i, Args... args) const |
Additional Inherited Members | |
Public Types inherited from CubbyFlow::ArrayBase< T, N, ArrayView< T, N > > | |
using | Derived = ArrayView< T, N > |
using | ValueType = T |
using | Reference = T & |
using | ConstReference = const T & |
using | Pointer = T * |
using | ConstPointer = const T * |
using | Iterator = T * |
using | ConstIterator = const T * |
Protected Member Functions inherited from CubbyFlow::ArrayBase< T, N, ArrayView< T, N > > | |
ArrayBase () | |
ArrayBase (const ArrayBase &other) | |
ArrayBase (ArrayBase &&other) noexcept | |
virtual | ~ArrayBase ()=default |
ArrayBase & | operator= (const ArrayBase &other) |
ArrayBase & | operator= (ArrayBase &&other) noexcept |
void | SetPtrAndSize (Pointer ptr, size_t ni, Args... args) |
void | SetPtrAndSize (Pointer data, Vector< size_t, N > size) |
void | SwapPtrAndSize (ArrayBase &other) |
void | ClearPtrAndSize () |
Protected Attributes inherited from CubbyFlow::ArrayBase< T, N, ArrayView< T, N > > | |
Pointer | m_ptr |
Vector< size_t, N > | m_size |
Detailed Description
template<typename T, size_t N>
class CubbyFlow::ArrayView< T, N >
Generic N-dimensional array class interface.
This class provides generic template class for N-dimensional array where N must be either 1, 2 or 3. This particular class exists to provide generic interface for 1, 2 or 3 dimensional arrays using template specialization only, but it cannot create any instance by itself.
- Template Parameters
-
T - Real number type. N - Dimension.
Constructor & Destructor Documentation
◆ ArrayView() [1/6]
template<typename T , size_t N>
CubbyFlow::ArrayView< T, N >::ArrayView | ( | ) |
◆ ArrayView() [2/6]
template<typename T, size_t N>
CubbyFlow::ArrayView< T, N >::ArrayView | ( | T * | ptr, |
const Vector< size_t, N > & | size | ||
) |
◆ ArrayView() [3/6]
template<typename T, size_t N>
template<size_t M>
CubbyFlow::ArrayView< T, N >::ArrayView | ( | std::enable_if_t<(M==1), T *> | ptr, |
size_t | size | ||
) |
◆ ArrayView() [4/6]
template<typename T, size_t N>
CubbyFlow::ArrayView< T, N >::ArrayView | ( | Array< T, N > & | other | ) |
◆ ~ArrayView()
template<typename T, size_t N>
|
overridedefault |
◆ ArrayView() [5/6]
template<typename T, size_t N>
CubbyFlow::ArrayView< T, N >::ArrayView | ( | const ArrayView< T, N > & | other | ) |
◆ ArrayView() [6/6]
template<typename T, size_t N>
|
noexcept |
Member Function Documentation
◆ Fill()
template<typename T, size_t N>
void CubbyFlow::ArrayView< T, N >::Fill | ( | const T & | val | ) |
◆ operator=() [1/2]
template<typename T , size_t N>
ArrayView< T, N > & CubbyFlow::ArrayView< T, N >::operator= | ( | const ArrayView< T, N > & | other | ) |
◆ operator=() [2/2]
template<typename T , size_t N>
|
noexcept |
◆ Set() [1/2]
template<typename T, size_t N>
void CubbyFlow::ArrayView< T, N >::Set | ( | Array< T, N > & | other | ) |
◆ Set() [2/2]
template<typename T, size_t N>
void CubbyFlow::ArrayView< T, N >::Set | ( | const ArrayView< T, N > & | other | ) |
The documentation for this class was generated from the following files:
- Core/Array/Array.hpp
- Core/Array/ArrayView.hpp
- Core/Array/ArrayView-Impl.hpp