#include "tensorstore/array.h"
template <int&... ExplicitArgumentBarrier,
         
 typename E,
         
 DimensionIndex R,
         
 ArrayOriginKind O,
         
 ContainerKind C>
SharedArray<std::remove_cv_t<typename ElementTagTraits<E>::Element>,
           
 R,
           
 O>
tensorstore::MakeCopy(const Array<E, R, O, C>source,
                      
IterationConstraints constraints = {
                          
c_order, include_repeated_elements}
);

Returns a copy of the contents of an array.

Parameters:
IterationConstraints constraints = {c_order, include_repeated_elements}

If constraints.has_order_constraint(), the array will be allocated in constraints.order_constraint() order. Otherwise, an order similar to the source order will be used. If constraints.can_skip_repeated_elements(), source dimensions with a byte stride of 0 will have a byte stride of 0 in the new array. Otherwise, they will be allocated normally. The default is c_order and include_repeated_elements.