Skip to content

Commit f2fd1dc

Browse files
committed
Add comment for stride calculation in blas mat-vec mul
Comment by jturner314 in PR #585
1 parent 5e32de2 commit f2fd1dc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/linalg/impl_linalg.rs

+4
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,10 @@ pub fn general_mat_vec_mul<A, S1, S2, S3>(
609609
($ty:ty, $gemv:ident) => {
610610
if let Some(layout) = blas_layout::<$ty, _>(&a) {
611611
if blas_compat_1d::<$ty, _>(&x) && blas_compat_1d::<$ty, _>(&y) {
612+
// Determine stride between rows or columns. Note that the stride is
613+
// adjusted to at least `k` or `m` to handle the case of a matrix with a
614+
// trivial (length 1) dimension, since the stride for the trivial dimension
615+
// may be arbitrary.
612616
let a_trans = CblasNoTrans;
613617
let a_stride = match layout {
614618
CBLAS_LAYOUT::CblasRowMajor => {

0 commit comments

Comments
 (0)