-
#include "tensorstore/index_space/index_transform.h" -
absl::Status tensorstore::PropagateInputDomainResizeToOutput(
IndexTransformView<> transform,
span<const Index> requested_input_inclusive_min,
span<const Index> requested_input_exclusive_max,
bool can_resize_tied_bounds,
span<Index> output_inclusive_min_constraint,
span<Index> output_exclusive_max_constraint,
span<Index> new_output_inclusive_min,
span<Index> new_output_exclusive_max,
bool* is_noop); Propagates a resize request on the input domain to the output space.
- Parameters:¶
- IndexTransformView<> transform¶
The index transform.
- span<const Index> requested_input_inclusive_min¶
Requested new inclusive min bounds on the input domain. A bound of
kImplicitindicates no change.- span<const Index> requested_input_exclusive_max¶
Requested new exclusive max bounds on the input domain. A bound of
kImplicitindicates no change.- bool can_resize_tied_bounds¶
If
true, fails if the resize would potentially affect any positions not within the output range oftransform.- out
- span<Index> output_inclusive_min_constraint¶
Set to constraints on the inclusive_min bounds of the output space that must be satisfied in order for the resize to not affect positions outside the output range of
transform. Each value not equal tokImplicitmust match the corresponding existingIndexInterval::inclusive_minbound. Ifcan_resize_tied_bounds == true, all values are set equalkImplicit.- out
- span<Index> output_exclusive_max_constraint¶
Set to constraints on the exclusive_max bounds of the output space that must be satisfied in order for the resize to not affect positions outside the output range of
transform. Each value not equal tokImplicitmust match the corresponding existingIndexInterval::exclusive_minbound. Ifcan_resize_tied_bounds == true, all values are set equalkImplicit.- out
- span<Index> new_output_inclusive_min¶
Set to the new
IndexInterval::inclusive_minbounds for the output space. A bound ofkImplicitindicates no change.- out
- span<Index> new_output_inclusive_min¶
Set to the new
IndexInterval::exclusive_maxbounds for the output space. A bound ofkImplicitindicates no change.- out
- bool *is_noop¶
Must be non-null. Upon successful return,
*is_noopis set totrueif all bounds innew_output_inclusive_minandnew_output_exclusive_maxarekImplicit, and is set tofalseotherwise.
- Returns:¶
absl::Status()on success.- Error absl::StatusCode::kFailedPrecondition:¶
if
can_resize_tied_bounds == falseand the resize would affect positions outside the range oftransform.- Error absl::StatusCode::kInvalidArgument:¶
if the requested bound are invalid or incompatible with
transform.- Error absl::StatusCode::kInvalidArgument:¶
if integer overflow occurs.