Skip to content

Commit c9b6d13

Browse files
committed
Handle norm type based on matrix layout
1 parent b6e48b9 commit c9b6d13

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

lax/src/rcond.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,13 @@ macro_rules! impl_rcond_real {
2020

2121
let mut work = vec![Self::zero(); 4 * n as usize];
2222
let mut iwork = vec![0; n as usize];
23+
let norm_type = match l {
24+
MatrixLayout::C { .. } => NormType::Infinity,
25+
MatrixLayout::F { .. } => NormType::One,
26+
} as u8;
2327
unsafe {
2428
$gecon(
25-
NormType::One as u8,
29+
norm_type,
2630
n,
2731
a,
2832
l.lda(),
@@ -53,9 +57,13 @@ macro_rules! impl_rcond_complex {
5357
let mut info = 0;
5458
let mut work = vec![Self::zero(); 2 * n as usize];
5559
let mut rwork = vec![Self::Real::zero(); 2 * n as usize];
60+
let norm_type = match l {
61+
MatrixLayout::C { .. } => NormType::Infinity,
62+
MatrixLayout::F { .. } => NormType::One,
63+
} as u8;
5664
unsafe {
5765
$gecon(
58-
NormType::One as u8,
66+
norm_type,
5967
n,
6068
a,
6169
l.lda(),

0 commit comments

Comments
 (0)