Template Numerical Library: TNL::Containers::NDArray< Value, SizesHolder, Permutation, Device, Index, Overlaps, Allocator > Class Template Reference

Template Numerical Library version\ main:16b9213d5

Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
TNL::Containers::NDArray< Value, SizesHolder, Permutation, Device, Index, Overlaps, Allocator > Class Template Reference
N-dimensional arrays

Dynamic N-dimensional array. More...

`#include <TNL/Containers/NDArray.h>`

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

## 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

  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.

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

- src/TNL/Containers/NDArray.h