Template Numerical Library version\ main:bb09b17
|
Holds static sizes of an N-dimensional array. More...
#include <TNL/Containers/ndarray/StaticSizesHolder.h>
Public Types | |
using | IndexType = Index |
Public Member Functions | |
StaticSizesHolder ()=default | |
Default constructor. | |
template<std::size_t level> | |
__cuda_callable__ Index | getSize () const |
Returns the dynamic size along a specific axis. It is always equal to the static size. | |
__cuda_callable__ Index | operator[] (Index level) const |
Returns the dynamic size along a specific axis. It is always equal to the static size. | |
Static Public Member Functions | |
static constexpr std::size_t | getDimension () |
Returns the dimension of the array, i.e. number of sizes specified in the template parameters. | |
template<std::size_t level> | |
static constexpr std::size_t | getStaticSize () |
Returns the static size of a specific dimension. | |
static constexpr Index | getStaticSize (Index level) |
Returns the static size of a specific dimension identified by a runtime parameter level. | |
Holds static sizes of an N-dimensional array.
The difference from SizesHolder is that zero value in sizes does not indicate a dynamic value, the corresponding size is always zero (both static and dynamic).
Index | Integral type used for the representation of sizes. |
sizes | Sequence of integers specifying static sizes. The number of integers in the sequence specifies the dimension of the array. |