nk 1.0.0
C++ Numerical Computing Runtime
Loading...
Searching...
No Matches
nk::Dims Struct Reference

Public Member Functions

 Dims (size_t r, size_t c)
 Dims (size_t r, size_t c, size_t p)
 Dims (const size_t *dims, int nd)
 Dims (const Dims &o)
 Dims (Dims &&o) noexcept
Dims & operator= (const Dims &o)
Dims & operator= (Dims &&o) noexcept
int ndims () const noexcept
int ndim () const noexcept
size_t rows () const noexcept
size_t cols () const noexcept
size_t pages () const noexcept
size_t dim (int i) const noexcept
size_t dimSize (int i) const noexcept
size_t numel () const noexcept
bool isScalar () const noexcept
bool isEmpty () const noexcept
bool isVector () const noexcept
bool is3D () const noexcept
size_t sub2ind (size_t r, size_t c) const noexcept
size_t sub2ind (size_t r, size_t c, size_t p) const noexcept
size_t sub2indChecked (size_t r, size_t c) const
size_t sub2indChecked (size_t r, size_t c, size_t p) const
bool operator== (const Dims &o) const noexcept
bool operator!= (const Dims &o) const noexcept

Static Public Attributes

static constexpr int kInlineCap = 4
static constexpr int kMaxRank = 32

Detailed Description

Definition at line 29 of file dims.hpp.

Member Function Documentation

◆ cols()

size_t nk::Dims::cols ( ) const
inlinenoexcept

Definition at line 51 of file dims.hpp.

◆ dim()

size_t nk::Dims::dim ( int i) const
inlinenoexcept

Definition at line 54 of file dims.hpp.

◆ dimSize()

size_t nk::Dims::dimSize ( int i) const
inlinenoexcept

Definition at line 62 of file dims.hpp.

◆ is3D()

bool nk::Dims::is3D ( ) const
inlinenoexcept

Definition at line 81 of file dims.hpp.

◆ isEmpty()

bool nk::Dims::isEmpty ( ) const
inlinenoexcept

Definition at line 76 of file dims.hpp.

◆ isScalar()

bool nk::Dims::isScalar ( ) const
inlinenoexcept

Definition at line 75 of file dims.hpp.

◆ isVector()

bool nk::Dims::isVector ( ) const
inlinenoexcept

Definition at line 77 of file dims.hpp.

◆ ndim()

int nk::Dims::ndim ( ) const
inlinenoexcept

Definition at line 49 of file dims.hpp.

◆ ndims()

int nk::Dims::ndims ( ) const
inlinenoexcept

Definition at line 48 of file dims.hpp.

◆ numel()

size_t nk::Dims::numel ( ) const
inlinenoexcept

Definition at line 64 of file dims.hpp.

◆ operator!=()

bool nk::Dims::operator!= ( const Dims & o) const
inlinenoexcept

Definition at line 95 of file dims.hpp.

◆ pages()

size_t nk::Dims::pages ( ) const
inlinenoexcept

Definition at line 52 of file dims.hpp.

◆ rows()

size_t nk::Dims::rows ( ) const
inlinenoexcept

Definition at line 50 of file dims.hpp.

◆ sub2ind() [1/2]

size_t nk::Dims::sub2ind ( size_t r,
size_t c ) const
inlinenoexcept

Definition at line 83 of file dims.hpp.

◆ sub2ind() [2/2]

size_t nk::Dims::sub2ind ( size_t r,
size_t c,
size_t p ) const
inlinenoexcept

Definition at line 87 of file dims.hpp.

Member Data Documentation

◆ kInlineCap

int nk::Dims::kInlineCap = 4
staticconstexpr

Definition at line 31 of file dims.hpp.

◆ kMaxRank

int nk::Dims::kMaxRank = 32
staticconstexpr

Definition at line 35 of file dims.hpp.


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