-
-
Notifications
You must be signed in to change notification settings - Fork 70
Make FastLapackInterface.jl an extension as well #572
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
docs/src/solvers/solvers.md
Outdated
be faster than the Base.LinearAlgebra version. | ||
be faster than the Base.LinearAlgebra version. In practice, with the way we wrap the solvers, | ||
we do not see a performance benefit and in fact benchmarks tend to show this inhibits | ||
performance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
performance. | |
performance. |
maxiters::Int, abstol, reltol, verbose::Bool, | ||
assumptions::OperatorAssumptions) | ||
ws = LUWs(A) | ||
return WorkspaceAndFactors(ws, LinearSolve.ArrayInterface.lu_instance(convert(AbstractMatrix, A))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
return WorkspaceAndFactors(ws, LinearSolve.ArrayInterface.lu_instance(convert(AbstractMatrix, A))) | |
return WorkspaceAndFactors( | |
ws, LinearSolve.ArrayInterface.lu_instance(convert(AbstractMatrix, A))) |
return WorkspaceAndFactors(ws, LinearSolve.ArrayInterface.lu_instance(convert(AbstractMatrix, A))) | ||
end | ||
|
||
function SciMLBase.solve!(cache::LinearSolve.LinearCache, alg::FastLUFactorization; kwargs...) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
function SciMLBase.solve!(cache::LinearSolve.LinearCache, alg::FastLUFactorization; kwargs...) | |
function SciMLBase.solve!( | |
cache::LinearSolve.LinearCache, alg::FastLUFactorization; kwargs...) |
if cache.isfresh | ||
# we will fail here if A is a different *size* than in a previous version of the same cache. | ||
# it may instead be desirable to resize the workspace. | ||
LinearSolve.@set! ws_and_fact.factors = LinearAlgebra.LU(LAPACK.getrf!(ws_and_fact.workspace, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
LinearSolve.@set! ws_and_fact.factors = LinearAlgebra.LU(LAPACK.getrf!(ws_and_fact.workspace, | |
LinearSolve.@set! ws_and_fact.factors = LinearAlgebra.LU(LAPACK.getrf!( | |
ws_and_fact.workspace, |
SciMLBase.build_linear_solution(alg, y, nothing, cache) | ||
end | ||
|
||
function LinearSolve.init_cacheval(alg::FastQRFactorization{NoPivot}, A::AbstractMatrix, b, u, Pl, Pr, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
function LinearSolve.init_cacheval(alg::FastQRFactorization{NoPivot}, A::AbstractMatrix, b, u, Pl, Pr, | |
function LinearSolve.init_cacheval( | |
alg::FastQRFactorization{NoPivot}, A::AbstractMatrix, b, u, Pl, Pr, |
return WorkspaceAndFactors(ws, | ||
LinearSolve.ArrayInterface.qr_instance(convert(AbstractMatrix, A))) | ||
end | ||
function LinearSolve.init_cacheval(::FastQRFactorization{ColumnNorm}, A::AbstractMatrix, b, u, Pl, Pr, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
function LinearSolve.init_cacheval(::FastQRFactorization{ColumnNorm}, A::AbstractMatrix, b, u, Pl, Pr, | |
function LinearSolve.init_cacheval( | |
::FastQRFactorization{ColumnNorm}, A::AbstractMatrix, b, u, Pl, Pr, |
assumptions::OperatorAssumptions) | ||
ws = QRpWs(A) | ||
return WorkspaceAndFactors(ws, | ||
LinearSolve.ArrayInterface.qr_instance(convert(AbstractMatrix, A))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
LinearSolve.ArrayInterface.qr_instance(convert(AbstractMatrix, A))) | |
LinearSolve.ArrayInterface.qr_instance(convert(AbstractMatrix, A))) |
|
||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
end | |
end |
No description provided.