#include "tensorstore/contiguous_layout.h"
template <ContiguousLayoutOrder Order = c_order, typename I = Index>
void tensorstore::GetContiguousIndices(I offset,
                                       
span<const I> shape,
                                       
span<I> indices);

Computes the indices corresponding to a given linear offset for the specified shape and Order.

This is the inverse of GetContiguousOffset.

Parameters:
I offset

Offset for which to the compute the indices. Must satisfy 0 <= offset && offset < ProductOfExtents(shape).

span<const I> shape

Shape for which to compute the indices.

out
span<I> indices

Indices to be set.

Dchecks:

shape.size() == indices.size()