Skip to content

Commit 44b2adb

Browse files
committed
Take complex conjugate
1 parent 76c06d4 commit 44b2adb

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lax/src/cholesky.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,19 @@ macro_rules! impl_cholesky {
6565
let mut info = 0;
6666
if matches!(l, MatrixLayout::C { .. }) {
6767
uplo = uplo.t();
68+
for val in b.iter_mut() {
69+
*val = val.conj();
70+
}
6871
}
6972
unsafe {
7073
$trs(uplo as u8, n, nrhs, a, l.lda(), b, n, &mut info);
7174
}
7275
info.as_lapack_result()?;
76+
if matches!(l, MatrixLayout::C { .. }) {
77+
for val in b.iter_mut() {
78+
*val = val.conj();
79+
}
80+
}
7381
Ok(())
7482
}
7583
}

0 commit comments

Comments
 (0)