-
#include "tensorstore/array.h"
-
template <int&... ExplicitArgumentBarrier>
requires (RankConstraint::GreaterOrUnspecified(static_rank, 0))
ArrayView<Element,
RankConstraint::Subtract(static_rank, 1),
array_origin_kind>
tensorstore::Array<ElementTagType,
Rank,
OriginKind,
LayoutContainerKind>::operator[](Index index)
const; Returns a reference to the sub-array obtained by subscripting the first dimension.
Equivalent to
SubArray(*this, {index})
.For efficiency, the returned sub-array does not share ownership of the data and stores a view, rather than a copy, of the layout. To share ownership of the data, use the
SharedSubArray
free function instead.