Skip to content

Commit c169853

Browse files
committed
Fix the ldb in dsytrs and others
1 parent 72bc82d commit c169853

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/lapack_traits/solveh.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,10 @@ impl Solveh_ for $scalar {
3939
unsafe fn solveh(l: MatrixLayout, uplo: UPLO, a: &[Self], ipiv: &Pivot, b: &mut [Self]) -> Result<()> {
4040
let (n, _) = l.size();
4141
let nrhs = 1;
42-
let ldb = 1;
42+
let ldb = match l {
43+
MatrixLayout::C(_) => 1,
44+
MatrixLayout::F(_) => n,
45+
};
4346
let info = $trs(l.lapacke_layout(), uplo as u8, n, nrhs, a, l.lda(), ipiv, b, ldb);
4447
into_result(info, ())
4548
}

0 commit comments

Comments
 (0)