23.05
|
Strides of an item in bytes. More...
#include <Strides.h>
Public Member Functions | |
template<typename... Ts> | |
constexpr | Strides (Ts... strides) |
Constructor to initialize the strides. More... | |
constexpr | Strides (const Strides &)=default |
Allow instances of this class to be copy constructed. More... | |
Strides & | operator= (const Strides &)=default |
Allow instances of this class to be copied. More... | |
constexpr | Strides (Strides &&)=default |
Allow instances of this class to be move constructed. More... | |
Strides & | operator= (Strides &&)=default |
Allow instances of this class to be moved. More... | |
~Strides ()=default | |
Default destructor. More... | |
![]() | |
Dimensions (Ts... dims) | |
Constructor to initialize the tensor shape. More... | |
Dimensions (const Dimensions &)=default | |
Allow instances of this class to be copy constructed. More... | |
Dimensions (Dimensions &&)=default | |
Allow instances of this class to be move constructed. More... | |
Dimensions & | operator= (const Dimensions &)=default |
Allow instances of this class to be copied. More... | |
Dimensions & | operator= (Dimensions &&)=default |
Allow instances of this class to be moved. More... | |
void | set (size_t dimension, uint32_t value, bool increase_dim_unit=true) |
Accessor to set the value of one of the dimensions. More... | |
uint32_t | x () const |
Alias to access the size of the first dimension. More... | |
uint32_t | y () const |
Alias to access the size of the second dimension. More... | |
uint32_t | z () const |
Alias to access the size of the third dimension. More... | |
void | increment (size_t dim, uint32_t step=1) |
Increments the given dimension by a step size, avoiding overflows. More... | |
const uint32_t & | operator[] (size_t dimension) const |
Generic accessor to get the size of any dimension. More... | |
uint32_t & | operator[] (size_t dimension) |
Generic accessor to get the size of any dimension. More... | |
unsigned int | num_dimensions () const |
Returns the effective dimensionality of the tensor. More... | |
void | set_num_dimensions (size_t num_dimensions) |
Set number of dimensions. More... | |
void | collapse (const size_t n, const size_t first=0) |
Collapse dimensions. More... | |
void | collapse_from (size_t start) |
Collapse dimensions starting from a given point. More... | |
void | remove (size_t idx) |
Remove dimension of a given index. More... | |
std::array< uint32_t, num_max_dimensions >::iterator | begin () |
Returns a read/write iterator that points to the first element in the dimension array. More... | |
std::array< uint32_t, num_max_dimensions >::const_iterator | begin () const |
Returns a read-only (constant) iterator that points to the first element in the dimension array. More... | |
std::array< uint32_t, num_max_dimensions >::const_iterator | cbegin () const |
Returns a read-only (constant) iterator that points to the first element in the dimension array. More... | |
std::array< uint32_t, num_max_dimensions >::iterator | end () |
Returns a read/write iterator that points one past the last element in the dimension array. More... | |
std::array< uint32_t, num_max_dimensions >::const_iterator | end () const |
Returns a read-only (constant) iterator that points one past the last element in the dimension array. More... | |
std::array< uint32_t, num_max_dimensions >::const_iterator | cend () const |
Returns a read-only (constant) iterator that points one past the last element in the dimension array. More... | |
Additional Inherited Members | |
![]() | |
static constexpr size_t | num_max_dimensions |
Number of dimensions the tensor has. More... | |
|
inline |
Constructor to initialize the strides.
[in] | strides | Values to initialize the strides. |
Definition at line 46 of file Strides.h.
References Strides::operator=(), and Strides::~Strides().
|
default |
Default destructor.
Referenced by Strides::Strides().
Allow instances of this class to be copied.
Referenced by Strides::Strides().