Visible to Intel only — GUID: GUID-8855D212-245B-46D8-ACE8-805F48101AE4
Visible to Intel only — GUID: GUID-8855D212-245B-46D8-ACE8-805F48101AE4
Shape
Variadic template class n_extent_t describes the shape of the n_dimensional container. Specifically, the number of dimensions the size of each.
template<typename... TypeListT>
class n_extent_t
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 |
---|---|
|
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 |
---|---|
|
Number of dimensions. |
|
Index of last dimension, row. |
|
Requirements: Every type in TypeListT is default constructible. Effects: Construct n_extent_t, uses default values of each type in TypeListT for the dimesnion sizes. In general, only correctly initialized when every type is a fixed<NumberT> |
|
Effects: Construct n_exent_t, copying size of each dimension from a_other. |
|
Effects: Construct n_exent_t, initializing each dimension with the corresponding value from the list of a_values passed as an argument. In use, a_values is a comma separate list of values whose length and types are defined by TypeListT. |
|
Requirements: DimenstionT >=0 and DimensiontT < rank. Effects: Determine the exent of DimensionT. Returns: In the type declared by the DimensionT position of 0-based TypeListT, the extent of the specified DimensionT |
|
Requirements: DimenstionT >=0 and DimensiontT <= rank. Effects: Construct a n_extent_t with a lower rank by copying the righmost DimensionT values from this instance. Returns: n_exent[get<rank - DimensionT>()] [get<rank + 1 - DimensionT>()] [get<…>()] [get<row_dimension>()] |
|
Requirements: rank of a_other is the same as this instance's. Effects: Compare size of each dimension for equality. Only compares numeric values, not the types of each dimension. Returns:true if all dimensions are numerically equal, false otherwise. |
|
Requirements: rank of a_other is the same as this instance's. Effects: Compare size of each dimension for inequality. Only compares numeric values, not the types of each dimension. Returns:true if any dimensions are numerically different, false otherwise. |
|
Returns: Number of elements specified by extent Effects: Calculates the number of cells represented by the current extent values of each dimension by multiplying them all together. Returns: get<0>()*get<1>()*get<…>()*get<rank-1>() |
The following table provides information on the friend functions of n_extent_t.
Friend function |
Description |
---|---|
|
Effects: Append string representation of a_extents' values to a_output_stream Returns: Reference to a_output_stream for chained calls. |
- n_extent_generator
To facilitate simpler and clearer creation of n_extent_t objects.