pub fn tensor_line_size_parallel(
supported_line_sizes: impl Iterator<Item = u8>,
shape: &[usize],
strides: &[usize],
axis: usize,
) -> u8Expand description
Find the maximum line size usable for parallel vectorization along the given axis from the supported line sizes or return 1 if vectorization is impossible.
This function is designed to never return a line size above 1 by error, but doesn’t guarantee to always return the actual maximum possible line size. That is, it may be overly strict.
Currently, this checks that the stride of the axis is 1, that it’s shape is divisible by a candidate line size and that the smallest stride that is not 1 is divisible by the vectorization. The last condition ensure that the current axis is contiguous within the next stride.