16
16
17
17
# RF Bad fallback: will fail if `A` is just a stand-in
18
18
# This should instead just create the factorization type.
19
- function init_cacheval (alg:: AbstractFactorization , A, b, u, Pl, Pr, maxiters, abstol,
19
+ function init_cacheval (alg:: AbstractFactorization , A, b, u, Pl, Pr, maxiters:: Int , abstol,
20
20
reltol, verbose:: Bool , assumptions:: OperatorAssumptions )
21
21
do_factorization (alg, convert (AbstractMatrix, A), b, u)
22
22
end
@@ -127,22 +127,26 @@ function do_factorization(alg::GenericFactorization, A, b, u)
127
127
return fact
128
128
end
129
129
130
- function init_cacheval (alg:: GenericFactorization{typeof(lu)} , A, b, u, Pl, Pr, maxiters,
130
+ function init_cacheval (alg:: GenericFactorization{typeof(lu)} , A, b, u, Pl, Pr,
131
+ maxiters:: Int ,
131
132
abstol, reltol, verbose:: Bool , assumptions:: OperatorAssumptions )
132
133
ArrayInterfaceCore. lu_instance (convert (AbstractMatrix, A))
133
134
end
134
- function init_cacheval (alg:: GenericFactorization{typeof(lu!)} , A, b, u, Pl, Pr, maxiters,
135
+ function init_cacheval (alg:: GenericFactorization{typeof(lu!)} , A, b, u, Pl, Pr,
136
+ maxiters:: Int ,
135
137
abstol, reltol, verbose:: Bool , assumptions:: OperatorAssumptions )
136
138
ArrayInterfaceCore. lu_instance (convert (AbstractMatrix, A))
137
139
end
138
140
139
141
function init_cacheval (alg:: GenericFactorization{typeof(lu)} ,
140
- A:: StridedMatrix{<:LinearAlgebra.BlasFloat} , b, u, Pl, Pr, maxiters,
142
+ A:: StridedMatrix{<:LinearAlgebra.BlasFloat} , b, u, Pl, Pr,
143
+ maxiters:: Int ,
141
144
abstol, reltol, verbose:: Bool , assumptions:: OperatorAssumptions )
142
145
ArrayInterfaceCore. lu_instance (A)
143
146
end
144
147
function init_cacheval (alg:: GenericFactorization{typeof(lu!)} ,
145
- A:: StridedMatrix{<:LinearAlgebra.BlasFloat} , b, u, Pl, Pr, maxiters,
148
+ A:: StridedMatrix{<:LinearAlgebra.BlasFloat} , b, u, Pl, Pr,
149
+ maxiters:: Int ,
146
150
abstol, reltol, verbose:: Bool , assumptions:: OperatorAssumptions )
147
151
ArrayInterfaceCore. lu_instance (A)
148
152
end
@@ -167,11 +171,12 @@ function init_cacheval(alg::GenericFactorization{typeof(lu!)}, A::Tridiagonal, b
167
171
ArrayInterfaceCore. lu_instance (A)
168
172
end
169
173
170
- function init_cacheval (alg:: GenericFactorization , A:: Diagonal , b, u, Pl, Pr, maxiters,
174
+ function init_cacheval (alg:: GenericFactorization , A:: Diagonal , b, u, Pl, Pr, maxiters:: Int ,
171
175
abstol, reltol, verbose:: Bool , assumptions:: OperatorAssumptions )
172
176
Diagonal (inv .(A. diag))
173
177
end
174
- function init_cacheval (alg:: GenericFactorization , A:: Tridiagonal , b, u, Pl, Pr, maxiters,
178
+ function init_cacheval (alg:: GenericFactorization , A:: Tridiagonal , b, u, Pl, Pr,
179
+ maxiters:: Int ,
175
180
abstol, reltol, verbose:: Bool , assumptions:: OperatorAssumptions )
176
181
ArrayInterfaceCore. lu_instance (A)
177
182
end
@@ -184,14 +189,15 @@ end
184
189
function init_cacheval (alg:: Union {GenericFactorization,
185
190
GenericFactorization{typeof (bunchkaufman!)},
186
191
GenericFactorization{typeof (bunchkaufman)}},
187
- A:: Union{Hermitian, Symmetric} , b, u, Pl, Pr, maxiters, abstol,
192
+ A:: Union{Hermitian, Symmetric} , b, u, Pl, Pr, maxiters:: Int , abstol,
188
193
reltol, verbose:: Bool , assumptions:: OperatorAssumptions )
189
194
BunchKaufman (A. data, Array (1 : size (A, 1 )), A. uplo, true , false , 0 )
190
195
end
191
196
192
197
function init_cacheval (alg:: Union {GenericFactorization{typeof (bunchkaufman!)},
193
198
GenericFactorization{typeof (bunchkaufman)}},
194
- A:: StridedMatrix{<:LinearAlgebra.BlasFloat} , b, u, Pl, Pr, maxiters,
199
+ A:: StridedMatrix{<:LinearAlgebra.BlasFloat} , b, u, Pl, Pr,
200
+ maxiters:: Int ,
195
201
abstol, reltol, verbose:: Bool , assumptions:: OperatorAssumptions )
196
202
if eltype (A) <: Complex
197
203
return bunchkaufman! (Hermitian (A))
216
222
217
223
# Ambiguity handling dispatch
218
224
function init_cacheval (alg:: Union{QRFactorization, SVDFactorization} ,
219
- A:: StridedMatrix{<:LinearAlgebra.BlasFloat} , b, u, Pl, Pr, maxiters,
225
+ A:: StridedMatrix{<:LinearAlgebra.BlasFloat} , b, u, Pl, Pr,
226
+ maxiters:: Int ,
220
227
abstol, reltol, verbose:: Bool , assumptions:: OperatorAssumptions )
221
228
newA = copy (convert (AbstractMatrix, A))
222
229
if newA isa AbstractSparseMatrix
241
248
function init_cacheval (alg:: Union {GenericFactorization,
242
249
GenericFactorization{typeof (cholesky)},
243
250
GenericFactorization{typeof (cholesky!)}},
244
- A:: StridedMatrix{<:LinearAlgebra.BlasFloat} , b, u, Pl, Pr, maxiters,
251
+ A:: StridedMatrix{<:LinearAlgebra.BlasFloat} , b, u, Pl, Pr,
252
+ maxiters:: Int ,
245
253
abstol, reltol, verbose:: Bool , assumptions:: OperatorAssumptions )
246
254
newA = copy (convert (AbstractMatrix, A))
247
255
do_factorization (alg, newA, b, u)
@@ -330,7 +338,7 @@ function RFLUFactorization(; pivot = Val(true), thread = Val(true))
330
338
RFLUFactorization (pivot, thread)
331
339
end
332
340
333
- function init_cacheval (alg:: RFLUFactorization , A, b, u, Pl, Pr, maxiters,
341
+ function init_cacheval (alg:: RFLUFactorization , A, b, u, Pl, Pr, maxiters:: Int ,
334
342
abstol, reltol, verbose:: Bool , assumptions:: OperatorAssumptions )
335
343
ipiv = Vector {LinearAlgebra.BlasInt} (undef, min (size (A)... ))
336
344
ArrayInterfaceCore. lu_instance (convert (AbstractMatrix, A)), ipiv
0 commit comments