pub fn optimal_align(
shape: usize,
elem_size: usize,
buffer_align: usize,
) -> usizeExpand description
Calculates a best-effort heuristic for the alignment of row-aligned tensors.
Prefers contiguous alignments for unit dimensions, 16-byte minimum alignment for non-unit,
scaling with input size up to buffer_align.