-
#include "tensorstore/index_space/alignment.h"
-
absl::Status tensorstore::AlignDimensionsTo(
IndexDomainView<> source,
IndexDomainView<> target,
span<DimensionIndex> source_matches,
DomainAlignmentOptions options = DomainAlignmentOptions::all); Same as
AlignDomainTo
, but instead of computing thealignment
transform, simply setssource_matches[i] = j
, ifsource
dimensioni
matches to target dimensionj
, and setssource_matches[i] = -1
ifsource
dimensioni
is unmatched.- Parameters:¶
- IndexDomainView<> source¶
Source domain.
- IndexDomainView<> target¶
Target domain.
- out
- span<DimensionIndex> source_matches¶
Array of length
source.rank()
, set to the matches on success. In the case of an error, the contents is unspecified.- DomainAlignmentOptions options = DomainAlignmentOptions::all¶
Specifies the transformations that are permitted. By default, all transformations (permutation, translation, broadcasting) are permitted.
- Dchecks:¶
source.valid()
- Dchecks:¶
target.valid()
- Dchecks:¶
source_matches.size() == source.rank()
- Returns:¶
absl::Status()
on success.- Error absl::StatusCode::kInvalidArgument:¶
if matching fails.