Template Numerical Library version\ main:94209208
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | List of all members
TNL::Containers::StaticSizesHolder< Index, sizes > Class Template Reference

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.
 

Detailed Description

template<typename Index, Index... sizes>
class TNL::Containers::StaticSizesHolder< Index, sizes >

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).

Template Parameters
IndexIntegral type used for the representation of sizes.
sizesSequence of integers specifying static sizes. The number of integers in the sequence specifies the dimension of the array.

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