#include "tensorstore/array.h"
template <typename Element, Index N0>
SharedArray<Element, 1> tensorstore::MakeArray(Element (&array)[N0]);
template <typename Element, Index N0>
SharedArray<Element, 1>
tensorstore::MakeArray(const Element (&array)[N0]);
template <typename Element, Index N0, Index N1>
SharedArray<Element, 2>
tensorstore::MakeArray(Element (&array)[N0][N1]);
template <typename Element, Index N0, Index N1>
SharedArray<Element, 2>
tensorstore::MakeArray(const Element (&array)[N0][N1]);

Returns a SharedArray containing a copy of the specified C array.

Note

Only the rank-1 and rank-2 overloads are shown, but C arrays with up to 6 dimensions are supported.

Parameters:
Element (&array)[N0]
const Element (&array)[N0]
Element (&array)[N0][N1]
const Element (&array)[N0][N1]

The C array to be copied. May be specified as a (nested) braced list, e.g. MakeArray({{1, 2, 3}, {4, 5, 6}}).