-
#include "tensorstore/index_space/dimension_identifier.h" -
using tensorstore::DynamicDimSpec =
std::variant<DimensionIndex, std::string, DimRangeSpec>; Specifies a dimension by index or label or a range of dimensions.
For example:
1specifies the single dimension with index 1. ADimensionIndexvalue can specify both existing dimensions as well as dimensions to be added."x"specifies the single dimension with label “x”. A string label cannot be used to specify dimensions to be added.DimRangeSpec{1, 4, 2}specifies the sequence of dimensions{1, 3}. ADimRangeSpeccan specify both existing dimensions as well as dimensions to be added. As described in the documentation ofDimRangeSpec, certain forms ofDimRangeSpecare only valid for specifying existing dimensions or if the new rank is known, as they would be ambiguous for specifying new dimensions.
Related Functions¶
-
absl::Status
tensorstore::NormalizeDynamicDimSpec(const DynamicDimSpec& spec,
span<const std::string> labels,
DimensionIndexBuffer* result);
-
absl::Status tensorstore::NormalizeDynamicDimSpecs(
span<const DynamicDimSpec> specs,
span<const std::string> labels,
DimensionIndexBuffer* result); Equivalent to calling
NormalizeDynamicDimSpec(spec, labels, result)for eachspecinspecs.