@@ -97,50 +97,50 @@ macro_rules! impl_least_squares {
97
97
) *
98
98
unsafe {
99
99
$gelsd(
100
- m,
101
- n,
102
- nrhs,
103
- a_t. as_mut( ) . map( |v| v. as_mut_slice( ) ) . unwrap_or( a) ,
104
- a_layout. lda( ) ,
105
- b_t. as_mut( ) . map( |v| v. as_mut_slice( ) ) . unwrap_or( b) ,
106
- b_layout. lda( ) ,
107
- & mut singular_values,
108
- rcond,
100
+ & m,
101
+ & n,
102
+ & nrhs,
103
+ AsPtr :: as_mut_ptr ( a_t. as_mut( ) . map( |v| v. as_mut_slice( ) ) . unwrap_or( a) ) ,
104
+ & a_layout. lda( ) ,
105
+ AsPtr :: as_mut_ptr ( b_t. as_mut( ) . map( |v| v. as_mut_slice( ) ) . unwrap_or( b) ) ,
106
+ & b_layout. lda( ) ,
107
+ AsPtr :: as_mut_ptr ( & mut singular_values) ,
108
+ & rcond,
109
109
& mut rank,
110
- & mut work_size,
111
- - 1 ,
112
- $( & mut $rwork, ) *
113
- & mut iwork_size,
110
+ AsPtr :: as_mut_ptr ( & mut work_size) ,
111
+ & ( - 1 ) ,
112
+ $( AsPtr :: as_mut_ptr ( & mut $rwork) , ) *
113
+ iwork_size. as_mut_ptr ( ) ,
114
114
& mut info,
115
115
)
116
116
} ;
117
117
info. as_lapack_result( ) ?;
118
118
119
119
// calc
120
120
let lwork = work_size[ 0 ] . to_usize( ) . unwrap( ) ;
121
- let mut work = unsafe { vec_uninit( lwork) } ;
121
+ let mut work: Vec < Self > = unsafe { vec_uninit( lwork) } ;
122
122
let liwork = iwork_size[ 0 ] . to_usize( ) . unwrap( ) ;
123
- let mut iwork = unsafe { vec_uninit( liwork) } ;
123
+ let mut iwork = unsafe { vec_uninit( liwork) } ;
124
124
$(
125
125
let lrwork = $rwork[ 0 ] . to_usize( ) . unwrap( ) ;
126
- let mut $rwork = unsafe { vec_uninit( lrwork) } ;
126
+ let mut $rwork: Vec < Self :: Real > = unsafe { vec_uninit( lrwork) } ;
127
127
) *
128
128
unsafe {
129
129
$gelsd(
130
- m,
131
- n,
132
- nrhs,
133
- a_t. as_mut( ) . map( |v| v. as_mut_slice( ) ) . unwrap_or( a) ,
134
- a_layout. lda( ) ,
135
- b_t. as_mut( ) . map( |v| v. as_mut_slice( ) ) . unwrap_or( b) ,
136
- b_layout. lda( ) ,
137
- & mut singular_values,
138
- rcond,
130
+ & m,
131
+ & n,
132
+ & nrhs,
133
+ AsPtr :: as_mut_ptr ( a_t. as_mut( ) . map( |v| v. as_mut_slice( ) ) . unwrap_or( a) ) ,
134
+ & a_layout. lda( ) ,
135
+ AsPtr :: as_mut_ptr ( b_t. as_mut( ) . map( |v| v. as_mut_slice( ) ) . unwrap_or( b) ) ,
136
+ & b_layout. lda( ) ,
137
+ AsPtr :: as_mut_ptr ( & mut singular_values) ,
138
+ & rcond,
139
139
& mut rank,
140
- & mut work,
141
- lwork as i32 ,
142
- $( & mut $rwork, ) *
143
- & mut iwork,
140
+ AsPtr :: as_mut_ptr ( & mut work) ,
141
+ & ( lwork as i32 ) ,
142
+ $( AsPtr :: as_mut_ptr ( & mut $rwork) , ) *
143
+ iwork. as_mut_ptr ( ) ,
144
144
& mut info,
145
145
) ;
146
146
}
@@ -161,7 +161,7 @@ macro_rules! impl_least_squares {
161
161
} ;
162
162
}
163
163
164
- impl_least_squares ! ( @real, f64 , lapack :: dgelsd ) ;
165
- impl_least_squares ! ( @real, f32 , lapack :: sgelsd ) ;
166
- impl_least_squares ! ( @complex, c64, lapack :: zgelsd ) ;
167
- impl_least_squares ! ( @complex, c32, lapack :: cgelsd ) ;
164
+ impl_least_squares ! ( @real, f64 , lapack_sys :: dgelsd_ ) ;
165
+ impl_least_squares ! ( @real, f32 , lapack_sys :: sgelsd_ ) ;
166
+ impl_least_squares ! ( @complex, c64, lapack_sys :: zgelsd_ ) ;
167
+ impl_least_squares ! ( @complex, c32, lapack_sys :: cgelsd_ ) ;
0 commit comments