Skip to content

Commit 5d02585

Browse files
committed
format
1 parent 93665b7 commit 5d02585

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

src/factorization.jl

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,6 @@ function init_cacheval(alg::GenericFactorization{<:RFWrapper},
347347
ArrayInterfaceCore.lu_instance(convert(AbstractMatrix, A))
348348
end
349349

350-
351350
## FastLAPACKFactorizations
352351

353352
struct WorkspaceAndFactors{W, F}
@@ -361,7 +360,7 @@ end
361360
struct FastLUFactorization <: AbstractFactorization end
362361

363362
function init_cacheval(::FastLUFactorization, A, b, u, Pl, Pr,
364-
maxiters, abstol, reltol, verbose)
363+
maxiters, abstol, reltol, verbose)
365364
ws = LUWs(A)
366365
return WorkspaceAndFactors(ws, LinearAlgebra.LU(LAPACK.getrf!(ws, A)...))
367366
end
@@ -373,7 +372,8 @@ function SciMLBase.solve(cache::LinearCache, alg::FastLUFactorization)
373372
if cache.isfresh
374373
# we will fail here if A is a different *size* than in a previous version of the same cache.
375374
# 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)...)
377377
cache = set_cacheval(cache, ws_and_fact)
378378
end
379379
y = ldiv!(cache.u, cache.cacheval.factors, cache.b)
@@ -396,13 +396,13 @@ function FastQRFactorization()
396396
end
397397

398398
function init_cacheval(alg::FastQRFactorization{NoPivot}, A, b, u, Pl, Pr,
399-
maxiters, abstol, reltol, verbose)
399+
maxiters, abstol, reltol, verbose)
400400
ws = QRWYWs(A; blocksize = alg.blocksize)
401401
return WorkspaceAndFactors(ws, LinearAlgebra.QRCompactWY(LAPACK.geqrt!(ws, A)...))
402402
end
403403

404404
function init_cacheval(::FastQRFactorization{ColumnNorm}, A, b, u, Pl, Pr,
405-
maxiters, abstol, reltol, verbose)
405+
maxiters, abstol, reltol, verbose)
406406
ws = QRpWs(A)
407407
return WorkspaceAndFactors(ws, LinearAlgebra.QRPivoted(LAPACK.geqp3!(ws, A)...))
408408
end
@@ -415,14 +415,16 @@ function SciMLBase.solve(cache::LinearCache, alg::FastQRFactorization{P}) where
415415
# we will fail here if A is a different *size* than in a previous version of the same cache.
416416
# it may instead be desirable to resize the workspace.
417417
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)...)
419420
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)...)
421423
else
422424
error("No FastLAPACK Factorization defined for $P")
423425
end
424426
cache = set_cacheval(cache, ws_and_fact)
425427
end
426428
y = ldiv!(cache.u, cache.cacheval.factors, cache.b)
427429
SciMLBase.build_linear_solution(alg, y, nothing, cache)
428-
end
430+
end

0 commit comments

Comments
 (0)