Developer Guide and Reference

Contents

Shape

Variadic template class n_extent_t describes the shape of the n_dimensional container. Specifically, the number of dimensions the size of each.

Syntax

template<typename... TypeListT> class n_extent_t
Description
n_extent_t
represents the shape of a container as a sequence of sizes for each dimension. The size of each dimension can be represented by different types. This flexibility allows the same interface to be used to declare
n_extents_t
whose dimensions are fully known at compile time with
fixed<int NumberT>
, or to be only known at runtime with
int
, or only known at runtime but with a guarantee will be a multiple of an alignment with
aligned<int Alignment>
. For details, see the Number representation section.
The following table provides information on the template arguments for
n_extent_t
.
Template Argument
Description
typename... TypeListT
Comma separated list of types, where the number of types provided controls how many dimensions there are. Each type in the list identifies how the size of the corresponding dimension is to be represented. The order of the dimensions is the same order as C++ subscripts declaring a multi-dimensional array, from leftmost to rightmost.
Type must be
int
,
fixed<NumberT>
, or
aligned<AlignmentT>
. for each value describing corresponding dimensions size (extent) in regular order of C++ subscripts - from outer to inner.
The following table provides information on the members of
n_extent_t
Member
Description
static constexpr int rank;
Number of dimensions.
static constexpr int row_dime