#include "tensorstore/contiguous_layout.h"
void tensorstore::ComputeStrides(ContiguousLayoutOrder order,
                                 
ptrdiff_t element_stride,
                                 
span<const Index> shape,
                                 
span<Index> strides);
void tensorstore::ComputeStrides(
    
ContiguousLayoutPermutation<> permutation,
    
ptrdiff_t element_stride,
    
span<const Index> shape,
    
span<Index> strides);

Computes strides for the specified layout order.

Parameters:
ContiguousLayoutOrder order

The layout order.

ptrdiff_t element_stride

The stride of the innermost dimension.

span<const Index> shape

The extents of the array.

span<Index> strides

The output strides array.