-
#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
TensorStore
to have the specifiedinclusive_min
andexclusive_max
bounds.The new bounds are specified in input space of the transform through which
store
operates, but these bounds are mapped back to base, untransformed TensorStore.Options compatible with
ResizeOptions
are 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 ofkImplicit
indicates no change.- span<const Index, UnwrapResultType<StoreResult>::static_rank> exclusive_max¶
Vector of length
store.rank()
specifying the new exclusive max bounds. A bound ofkImplicit
indicates 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.