-
#include "tensorstore/index_space/transformed_array.h"
-
template <ArrayOriginKind OriginKind = offset_origin>
auto tensorstore::Materialize(
TransformArrayConstraints constraints = skip_repeated_elements); Materializes the transformed array as a strided array.
Refer to the documentation for
TransformArray
. Depending onconstraints
and whether the transform uses index arrays, the returned array may be newly allocated or point to a sub-region of the existing array. In the latter case, the returned array is only valid as long as the existing array despite being stored as aSharedArray
.Example:
auto materialized_array = array | AllDims().Diagonal() | Materialize();
- Template Parameters:¶
- ArrayOriginKind OriginKind = offset_origin¶
Specifies whether to retain the origin offset.
- Parameters:¶
- TransformArrayConstraints constraints = skip_repeated_elements¶
If
constraints == std::nullopt
, the returned array may refer to the existing array data.