#include "tensorstore/index_space/transformed_array.h"
template <typename SourceResult, typename DestResult>
  
requires IsTransformedArrayLike<UnwrapResultType<SourceResult>> &&
          
 IsTransformedArrayLike<UnwrapResultType<DestResult>>
absl::Status
tensorstore::CopyTransformedArray(const SourceResultsource,
                                  
const DestResultdest);

Copies from one transformed array to another, possibly converting the data type.

Parameters:
const SourceResult &source

The source transformed array.

const DestResult &dest

The destination transformed array.

Returns:

absl::Status() on success.

Error absl::StatusCode::kInvalidArgument:

if source and dest do not have the same rank.

Error absl::StatusCode::kOutOfRange:

if source and dest do not have compatible domains.

Error absl::StatusCode::kOutOfRange:

if an index array contains an out-of-bounds index.

Error absl::StatusCode::kInvalidArgument:

if integer overflow occurs computing output indices.

Error absl::StatusCode::kInvalidArgument:

if source.dtype() is not equal to, or cannot be converted to, dest.dtype()