-
#include "tensorstore/index_space/dim_expression.h"
-
template <typename Dimensions>
auto tensorstore::Dims(const Dimensions& dimensions); -
template <typename... DimensionId>
auto tensorstore::Dims(const DimensionId&... dimensions); Starts a
DimExpression
with the specified dimensions selected (and no operations).The static rank of the dimension selection of the resultant DimExpression is equal to the static extent of
dimensions
.Dimensions may specified by an index in the range
(-input_rank, input_rank)
. Negative dimension indices are normalized by addinginput_rank
. Dimensions may also be specified by a non-empty string label.- Requires:¶
For the single-parameter overload,
Dimensions
isspan
-compatible with aspan::value_type
equal toDimensionIndex
,DimensionIdentifier
, orDynamicDimSpec
.- Requires:¶
For the variadic overload, each
DimensionId
type must be convertible without narrowing toDimensionIndex
,DimensionIdentifier
, orDynamicDimSpec
.- Parameters:¶
- const Dimensions &dimensions¶
- const DimensionId&... dimensions
The dimension identifiers. May also be a braced list, e.g.
Dims({1, 2})
, or a pack, e.g.Dims(1, "x")
.
- Error absl::StatusCode::kInvalidArgument:¶
if a dimension index is outside the valid range, or a specified label is empty or does not equal a dimension label.