#include "tensorstore/tensorstore.h"
template <ArrayOriginKind OriginKind = offset_origin,
         
 typename SourceTensorstore>
Future<
    
SharedArray<typename UnwrapResultType<SourceTensorstore>::Element,
               
 UnwrapResultType<SourceTensorstore>::static_rank,
               
 OriginKind>>
tensorstore::Read(SourceTensorstore&source,
                  
ReadIntoNewArrayOptions options);
template <ArrayOriginKind OriginKind = offset_origin,
         
 typename SourceTensorstore,
         
 typename... Option>
  
requires IsCompatibleOptionSequence<ReadIntoNewArrayOptions,
                                     
 Option...>
Future<
    
SharedArray<typename UnwrapResultType<SourceTensorstore>::Element,
               
 UnwrapResultType<SourceTensorstore>::static_rank,
               
 OriginKind>>
tensorstore::Read(SourceTensorstore&sourceOption&&... option);

Copies from a source TensorStore to a newly-allocated target Array.

Options compatible with ReadIntoNewArrayOptions are specified in any order after source. The meaning of each option is determined by its type.

Supported option types are:

Example:

TensorReader<int32_t, 3> store = ...;
auto array = Read(
    store | AllDims().SizedInterval({100, 200}, {25, 30}))
    .value();
Template Parameters:
ArrayOriginKind OriginKind = offset_origin

If equal to offset_origin (the default), the returned array has the same origin as source. Otherwise, the returned array is translated to have an origin of zero for all dimensions.

Parameters:
SourceTensorstore &&source

Source TensorStore object that supports reading. May be Result-wrapped.

ReadIntoNewArrayOptions options

Any option compatible with ReadIntoNewArrayOptions.

Returns:

A future that becomes ready when the read has completed successfully or has failed.

struct tensorstore::ReadIntoNewArrayOptions;

Options for tensorstore::Read into new array.