@@ -29,7 +29,7 @@ macro_rules! impl_cholesky {
29
29
}
30
30
let mut info = 0 ;
31
31
unsafe {
32
- $trf( uplo as u8 , n, a , n, & mut info) ;
32
+ $trf( uplo. as_ptr ( ) , & n, AsPtr :: as_mut_ptr ( a ) , & n, & mut info) ;
33
33
}
34
34
info. as_lapack_result( ) ?;
35
35
if matches!( l, MatrixLayout :: C { .. } ) {
@@ -45,7 +45,7 @@ macro_rules! impl_cholesky {
45
45
}
46
46
let mut info = 0 ;
47
47
unsafe {
48
- $tri( uplo as u8 , n, a , l. lda( ) , & mut info) ;
48
+ $tri( uplo. as_ptr ( ) , & n, AsPtr :: as_mut_ptr ( a ) , & l. lda( ) , & mut info) ;
49
49
}
50
50
info. as_lapack_result( ) ?;
51
51
if matches!( l, MatrixLayout :: C { .. } ) {
@@ -70,7 +70,16 @@ macro_rules! impl_cholesky {
70
70
}
71
71
}
72
72
unsafe {
73
- $trs( uplo as u8 , n, nrhs, a, l. lda( ) , b, n, & mut info) ;
73
+ $trs(
74
+ uplo. as_ptr( ) ,
75
+ & n,
76
+ & nrhs,
77
+ AsPtr :: as_ptr( a) ,
78
+ & l. lda( ) ,
79
+ AsPtr :: as_mut_ptr( b) ,
80
+ & n,
81
+ & mut info,
82
+ ) ;
74
83
}
75
84
info. as_lapack_result( ) ?;
76
85
if matches!( l, MatrixLayout :: C { .. } ) {
@@ -84,7 +93,27 @@ macro_rules! impl_cholesky {
84
93
} ;
85
94
} // end macro_rules
86
95
87
- impl_cholesky ! ( f64 , lapack:: dpotrf, lapack:: dpotri, lapack:: dpotrs) ;
88
- impl_cholesky ! ( f32 , lapack:: spotrf, lapack:: spotri, lapack:: spotrs) ;
89
- impl_cholesky ! ( c64, lapack:: zpotrf, lapack:: zpotri, lapack:: zpotrs) ;
90
- impl_cholesky ! ( c32, lapack:: cpotrf, lapack:: cpotri, lapack:: cpotrs) ;
96
+ impl_cholesky ! (
97
+ f64 ,
98
+ lapack_sys:: dpotrf_,
99
+ lapack_sys:: dpotri_,
100
+ lapack_sys:: dpotrs_
101
+ ) ;
102
+ impl_cholesky ! (
103
+ f32 ,
104
+ lapack_sys:: spotrf_,
105
+ lapack_sys:: spotri_,
106
+ lapack_sys:: spotrs_
107
+ ) ;
108
+ impl_cholesky ! (
109
+ c64,
110
+ lapack_sys:: zpotrf_,
111
+ lapack_sys:: zpotri_,
112
+ lapack_sys:: zpotrs_
113
+ ) ;
114
+ impl_cholesky ! (
115
+ c32,
116
+ lapack_sys:: cpotrf_,
117
+ lapack_sys:: cpotri_,
118
+ lapack_sys:: cpotrs_
119
+ ) ;
0 commit comments