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

Computes the offset of a given index vector in C or Fortran order.

This is the inverse of GetContiguousIndices.

Parameters:
span<const I> shape

Shape for which to compute the offset.

span<const I> indices

Indices for which to compute the offset.

Dchecks:

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