Template Numerical Library version\ main:9e7b0f4
Loading...
Searching...
No Matches
TNL::Containers::NDArray< Value, SizesHolder, Permutation, Device, Index, Overlaps, Allocator > Class Template Reference

Dynamic N-dimensional array. More...

#include <TNL/Containers/NDArray.h>

Inheritance diagram for TNL::Containers::NDArray< Value, SizesHolder, Permutation, Device, Index, Overlaps, Allocator >:
Collaboration diagram for TNL::Containers::NDArray< Value, SizesHolder, Permutation, Device, Index, Overlaps, Allocator >:

Public Types

using AllocatorType = Allocator
 Allocator type used for allocating the array.

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.

Detailed Description

template<typename Value, typename SizesHolder, typename Permutation = std::make_index_sequence< SizesHolder::getDimension() >, typename Device = Devices::Host, typename Index = typename SizesHolder::IndexType, typename Overlaps = ConstStaticSizesHolder< typename SizesHolder::IndexType, SizesHolder::getDimension(), 0 >, typename Allocator = typename Allocators::Default< Device >::template Allocator< Value >>
class TNL::Containers::NDArray< Value, SizesHolder, Permutation, Device, Index, Overlaps, Allocator >

Dynamic N-dimensional array.

Template Parameters
ValueType of the values stored in the array.
SizesHolderInstance of SizesHolder that will represent the array sizes.
PermutationPermutation that will be applied to indices when accessing the array elements. The identity permutation is used by default.
DeviceType of the device that will be used for running operations on the array.
IndexType of indices used for addressing the array elements.
OverlapsSequence of integers representing the overlaps in each dimension a distributed N-dimensional array.
AllocatorType of the allocator that will be used for allocating elements of the array.

See also the Users' Guide.


The documentation for this class was generated from the following file: