-
#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 inconstraints.order_constraint()
order. Otherwise, an order similar to the source order will be used. Ifconstraints.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 isc_order
andinclude_repeated_elements
.