Skip to content

Commit 5fc0f2d

Browse files
committed
Fix rcond not to use lapack
1 parent efc877d commit 5fc0f2d

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

lax/src/rcond.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,22 @@ macro_rules! impl_rcond_real {
1717
let mut rcond = Self::Real::zero();
1818
let mut info = 0;
1919

20-
let mut work = unsafe { vec_uninit(4 * n as usize) };
20+
let mut work: Vec<Self> = unsafe { vec_uninit(4 * n as usize) };
2121
let mut iwork = unsafe { vec_uninit(n as usize) };
2222
let norm_type = match l {
2323
MatrixLayout::C { .. } => NormType::Infinity,
2424
MatrixLayout::F { .. } => NormType::One,
25-
} as u8;
25+
};
2626
unsafe {
2727
$gecon(
28-
norm_type,
29-
n,
30-
a,
31-
l.lda(),
32-
anorm,
28+
norm_type.as_ptr(),
29+
&n,
30+
AsPtr::as_ptr(a),
31+
&l.lda(),
32+
&anorm,
3333
&mut rcond,
34-
&mut work,
35-
&mut iwork,
34+
AsPtr::as_mut_ptr(&mut work),
35+
iwork.as_mut_ptr(),
3636
&mut info,
3737
)
3838
};
@@ -44,8 +44,8 @@ macro_rules! impl_rcond_real {
4444
};
4545
}
4646

47-
impl_rcond_real!(f32, lapack::sgecon);
48-
impl_rcond_real!(f64, lapack::dgecon);
47+
impl_rcond_real!(f32, lapack_sys::sgecon_);
48+
impl_rcond_real!(f64, lapack_sys::dgecon_);
4949

5050
macro_rules! impl_rcond_complex {
5151
($scalar:ty, $gecon:path) => {

0 commit comments

Comments
 (0)