-
#include "tensorstore/index_space/dim_expression.h"
-
template <DimensionIndex Rank, ContainerKind CKind>
absl::Status tensorstore::DimExpression<Op...>::Resolve(
const IndexDomain<Rank, CKind>& domain,
DimensionIndexBuffer* selection_output) const; Resolves a dimension selection to dimension indices.
For example:
auto transform = IdentityTransform({"x", "y", "z"}); DimensionIndexBuffer buffer; TENSORSTORE_EXPECT_OK(Dims("x", "z").Resolve(transform.domain(), &buffer)); EXPECT_THAT(buffer, ::testing::ElementsAre(0, 2));
- Parameters:¶
- const IndexDomain<Rank, CKind> &domain¶
The domain for which to resolve the dimension selection.
- out
- DimensionIndexBuffer *selection_output¶
Non-null pointer to buffer that will be filled with dimension indices.
- Requires:¶
There is no prior operation in the sequence.
- Error absl::StatusCode::kInvalidArgument:¶
if this dimension selection is not compatible with
domain
.