Template Numerical Library version\ main:7249e99
Loading...
Searching...
No Matches
TNL::Containers::LocalBeginsHolder< SizesHolder, ConstValue > Struct Template Reference

Wrapper for local begins in DistributedNDArray. More...

#include <TNL/Containers/ndarray/LocalBeginsHolder.h>

Inheritance diagram for TNL::Containers::LocalBeginsHolder< SizesHolder, ConstValue >:
[legend]
Collaboration diagram for TNL::Containers::LocalBeginsHolder< SizesHolder, ConstValue >:
[legend]

Public Member Functions

template<std::size_t level>
__cuda_callable__ SizesHolder::IndexType getSize () const
template<std::size_t level>
__cuda_callable__ void setSize (typename SizesHolder::IndexType newSize)
Public Member Functions inherited from TNL::Containers::SizesHolder< Index, sizes >
__cuda_callable__ constexpr SizesHolder ()
 Default constructor.
template<typename... Indices, std::enable_if_t< sizeof...(Indices)==sizeof...(sizes), bool > = true>
 SizesHolder (Indices... _sizes)
 Constructs the holder from given pack of sizes.
template<std::size_t level>
__cuda_callable__ Index getSize () const
 Returns the dynamic size along a specific axis.
__cuda_callable__ bool operator!= (const SizesHolder &other) const
 Compares the sizes with another instance of the holder.
__cuda_callable__ bool operator== (const SizesHolder &other) const
 Compares the sizes with another instance of the holder.
__cuda_callable__ Index & operator[] (Index level)
 Dynamic non-const accessor for the dynamic size along a specific axis.
__cuda_callable__ const Index & operator[] (Index level) const
 Dynamic accessor for the dynamic size along a specific axis.
template<std::size_t level>
__cuda_callable__ void setSize (Index size)
 Sets the dynamic size along a specific axis.

Static Public Member Functions

template<std::size_t dimension>
static constexpr std::size_t getStaticSize ()
Static Public Member Functions inherited from TNL::Containers::SizesHolder< Index, sizes >
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.

Additional Inherited Members

Public Types inherited from TNL::Containers::SizesHolder< Index, sizes >
using IndexType = Index
Static Protected Member Functions inherited from TNL::Containers::SizesHolder< Index, sizes >
static constexpr std::size_t countDynamicSizes ()
 Returns the number of dynamic sizes that need to be stored at runtime.
static constexpr std::size_t getDynamicSizeIndex (std::size_t level)
 Returns the index of given level in the array of dynamic sizes.
template<std::size_t level>
static constexpr bool isStaticSize ()
 Checks if given level corresponds to a static size.
Protected Attributes inherited from TNL::Containers::SizesHolder< Index, sizes >
StaticArray< countDynamicSizes(), Index > dynamicSizes

Detailed Description

template<typename SizesHolder, std::size_t ConstValue = 0>
struct TNL::Containers::LocalBeginsHolder< SizesHolder, ConstValue >

Wrapper for local begins in DistributedNDArray.

Static sizes cannot be distributed, so begins are always the constant value specified by ConstValue (0 by default).


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