Template Numerical Library version\ main:bb09b17
|
Dynamic N-dimensional array. More...
#include <TNL/Containers/NDArray.h>
Public Types | |
using | AllocatorType = Allocator |
Allocator type used for allocating the array. | |
Public Types inherited from TNL::Containers::ConstStaticSizesHolder< typename SizesHolder::IndexType, SizesHolder::getDimension(), 0 > | |
using | IndexType |
Public Member Functions | |
NDArray ()=default | |
Constructs an empty array with zero size. | |
NDArray (const AllocatorType &allocator) | |
Constructs an empty array and sets the provided allocator. | |
NDArray (const NDArray &other, const AllocatorType &allocator) | |
Copy constructor with a specific allocator (makes a deep copy). | |
AllocatorType | getAllocator () const |
Returns the allocator associated with the array. | |
NDArrayStorage & | operator= (const NDArrayStorage &other)=default |
Copy-assignment operator for deep-copying data from another array. Mismatched sizes cause reallocations. | |
template<typename OtherArray > | |
NDArrayStorage & | operator= (const OtherArray &other) |
Templated copy-assignment operator for deep-copying data from another array. | |
NDArrayStorage & | operator= (NDArrayStorage &&) noexcept(false)=default |
Move-assignment operator for acquiring data from rvalues. | |
Public Member Functions inherited from TNL::Containers::ConstStaticSizesHolder< typename SizesHolder::IndexType, SizesHolder::getDimension(), 0 > | |
__cuda_callable__ typename SizesHolder::IndexType | getSize () const |
__cuda_callable__ typename SizesHolder::IndexType | operator[] (typename SizesHolder::IndexType level) const |
Returns the dynamic size along a specific axis. It is always equal to the static size. | |
Additional Inherited Members | |
Static Public Member Functions inherited from TNL::Containers::ConstStaticSizesHolder< typename SizesHolder::IndexType, SizesHolder::getDimension(), 0 > | |
static constexpr std::size_t | getDimension () |
static constexpr std::size_t | getStaticSize () |
static constexpr typename SizesHolder::IndexType | getStaticSize (typename SizesHolder::IndexType level) |
Returns the static size of a specific dimension identified by a runtime parameter level. | |
Dynamic N-dimensional array.
Value | Type of the values stored in the array. |
SizesHolder | Instance of SizesHolder that will represent the array sizes. |
Permutation | Permutation that will be applied to indices when accessing the array elements. The identity permutation is used by default. |
Device | Type of the device that will be used for running operations on the array. |
Index | Type of indices used for addressing the array elements. |
Overlaps | Sequence of integers representing the overlaps in each dimension a distributed N-dimensional array. |
Allocator | Type of the allocator that will be used for allocating elements of the array. |
See also the Users' Guide.