-
#include "tensorstore/index_interval.h" -
absl::Status tensorstore::ComputeStridedSliceMap(
OptionallyImplicitIndexInterval orig,
IntervalForm interval_form,
Index translate_origin_to,
Index start,
Index stop_or_size,
Index stride,
OptionallyImplicitIndexInterval* new_domain,
Index* output_offset); Computes a mapping from the specified interval back to the original domain.
- Parameters:¶
- OptionallyImplicitIndexInterval orig¶
The original domain.
- IntervalForm interval_form¶
Form of the interval.
- Index translate_origin_to¶
If not equal to
kImplicit, the resultant*new_domainis translated to the specified origin.- Index start¶
The index within
origcorresponding to theinclusive_minin the resultant value of*new_domain. If equal tokImplicit, the lower (ifstride > 0) or upper (ifstride < 0) bound oforigis used.- Index stop_or_size¶
Specifies the inclusive/exclusive stop index or size of the resultant
*new_domain.- Index stride¶
Specifies the stride value.
- out
- OptionallyImplicitIndexInterval *new_domain¶
Non-null pointer to result interval set to the new domain computed by
ExtractStridedSlice, except that it is translated according to the value oftranslate_origin_to.- out
- Index *output_offset¶
Non-null pointer set to the value such that
*output_offset + stride * imaps each valueiin the resultant*new_domainto the corresponding index inorig.
- Error absl::StatusCode::kInvalidArgument:¶
or
absl::StatusCode::kOutOfRangeif the slice is not valid.