contiguous_strides

Function contiguous_strides 

Source
pub fn contiguous_strides(shape: &[usize]) -> Vec<usize>
Expand description

Computes the strides for a contiguous tensor with the given shape.

In a contiguous row-major tensor, the stride for each dimension equals the product of all dimension sizes to its right.