-
#include "tensorstore/tensorstore.h" -
template <typename StoreResult>
Future<UnwrapResultType<StoreResult>> tensorstore::Resize(
StoreResult store,
span<const Index, UnwrapResultType<StoreResult>::static_rank>
inclusive_min,
span<const Index, UnwrapResultType<StoreResult>::static_rank>
exclusive_max,
ResizeOptions options); -
template <typename StoreResult, typename... Option>
requires IsCompatibleOptionSequence<ResizeOptions, Option...>
Future<UnwrapResultType<StoreResult>> tensorstore::Resize(
StoreResult store,
span<const Index, UnwrapResultType<StoreResult>::static_rank>
inclusive_min,
span<const Index, UnwrapResultType<StoreResult>::static_rank>
exclusive_max,
Option&&... option); Resizes a
TensorStoreto have the specifiedinclusive_minandexclusive_maxbounds.The new bounds are specified in input space of the transform through which
storeoperates, but these bounds are mapped back to base, untransformed TensorStore.Options compatible with
ResizeOptionsare specified in any order afterstore. The meaning of each option is determined by its type.Supported option types are:
Example:
TensorStore<int32_t, 3> store = ...; store = Resize( store, tensorstore::span<const Index, 3>({kImplicit, 5, 3}), tensorstore::span<const Index, 3>({kImplicit, 20, kImplicit}), expand_only).value();- Parameters:¶
- StoreResult store¶
The TensorStore to resize.
- span<const Index, UnwrapResultType<StoreResult>::static_rank> inclusive_min¶
Vector of length
store.rank()specifying the new inclusive min bounds. A bound ofkImplicitindicates no change.- span<const Index, UnwrapResultType<StoreResult>::static_rank> exclusive_max¶
Vector of length
store.rank()specifying the new exclusive max bounds. A bound ofkImplicitindicates no change.- ResizeOptions options¶
Any option compatible with
ResizeOptions.
- Returns:¶
A future that becomes ready once the resize operation has completed (successfully or unsuccessfully).
Related Types¶
- enum class tensorstore::ResizeMode;
Bitvector specifying resize options.
- struct tensorstore::ResizeOptions;
Specifies options for resize operations.