@@ -347,7 +347,6 @@ function init_cacheval(alg::GenericFactorization{<:RFWrapper},
347
347
ArrayInterfaceCore. lu_instance (convert (AbstractMatrix, A))
348
348
end
349
349
350
-
351
350
# # FastLAPACKFactorizations
352
351
353
352
struct WorkspaceAndFactors{W, F}
361
360
struct FastLUFactorization <: AbstractFactorization end
362
361
363
362
function init_cacheval (:: FastLUFactorization , A, b, u, Pl, Pr,
364
- maxiters, abstol, reltol, verbose)
363
+ maxiters, abstol, reltol, verbose)
365
364
ws = LUWs (A)
366
365
return WorkspaceAndFactors (ws, LinearAlgebra. LU (LAPACK. getrf! (ws, A)... ))
367
366
end
@@ -373,7 +372,8 @@ function SciMLBase.solve(cache::LinearCache, alg::FastLUFactorization)
373
372
if cache. isfresh
374
373
# we will fail here if A is a different *size* than in a previous version of the same cache.
375
374
# it may instead be desirable to resize the workspace.
376
- @set! ws_and_fact. factors = LinearAlgebra. LU (LAPACK. getrf! (ws_and_fact. workspace, A)... )
375
+ @set! ws_and_fact. factors = LinearAlgebra. LU (LAPACK. getrf! (ws_and_fact. workspace,
376
+ A)... )
377
377
cache = set_cacheval (cache, ws_and_fact)
378
378
end
379
379
y = ldiv! (cache. u, cache. cacheval. factors, cache. b)
@@ -396,13 +396,13 @@ function FastQRFactorization()
396
396
end
397
397
398
398
function init_cacheval (alg:: FastQRFactorization{NoPivot} , A, b, u, Pl, Pr,
399
- maxiters, abstol, reltol, verbose)
399
+ maxiters, abstol, reltol, verbose)
400
400
ws = QRWYWs (A; blocksize = alg. blocksize)
401
401
return WorkspaceAndFactors (ws, LinearAlgebra. QRCompactWY (LAPACK. geqrt! (ws, A)... ))
402
402
end
403
403
404
404
function init_cacheval (:: FastQRFactorization{ColumnNorm} , A, b, u, Pl, Pr,
405
- maxiters, abstol, reltol, verbose)
405
+ maxiters, abstol, reltol, verbose)
406
406
ws = QRpWs (A)
407
407
return WorkspaceAndFactors (ws, LinearAlgebra. QRPivoted (LAPACK. geqp3! (ws, A)... ))
408
408
end
@@ -415,14 +415,16 @@ function SciMLBase.solve(cache::LinearCache, alg::FastQRFactorization{P}) where
415
415
# we will fail here if A is a different *size* than in a previous version of the same cache.
416
416
# it may instead be desirable to resize the workspace.
417
417
if P === NoPivot
418
- @set! ws_and_fact. factors = LinearAlgebra. QRCompactWY (LAPACK. geqrt! (ws_and_fact. workspace, A)... )
418
+ @set! ws_and_fact. factors = LinearAlgebra. QRCompactWY (LAPACK. geqrt! (ws_and_fact. workspace,
419
+ A)... )
419
420
elseif P === ColumnNorm
420
- @set! ws_and_fact. factors = LinearAlgebra. QRPivoted (LAPACK. geqp3! (ws_and_fact. workspace, A)... )
421
+ @set! ws_and_fact. factors = LinearAlgebra. QRPivoted (LAPACK. geqp3! (ws_and_fact. workspace,
422
+ A)... )
421
423
else
422
424
error (" No FastLAPACK Factorization defined for $P " )
423
425
end
424
426
cache = set_cacheval (cache, ws_and_fact)
425
427
end
426
428
y = ldiv! (cache. u, cache. cacheval. factors, cache. b)
427
429
SciMLBase. build_linear_solution (alg, y, nothing , cache)
428
- end
430
+ end
0 commit comments