Developer Guide and Reference

Contents

n_index_t (needs new content)

Variadic template class n_index_t describes a position inside of the N-dimensional container. Specifically, the number of dimensions and the of index value of each.

Syntax

template<typename... TypeListT> class n_index_t
Description
n_index_t
represents a position inside an n-dimensional space as a sequence of index value for each dimension. The index of each dimension can be represented by different types. This flexibility allows the same interface to be used to declare
n_index_t
with indices that 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 more details, see the Number representation section.
Objects of this class may be used to identify a cell in a container, describe the inclusive lower bounds for
n_bounds()
, n-dimensional position for accessor's
translated_to()
.
The following table provides information about the template arguments for
n_index_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 index 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.
Requirements
: Type must be
int
, or
fixed<NumberT>
, or
aligned<AlignmentT>
.
The following table provides information about the members of
n_index_t