Skip to content

Commit 5b1fe9e

Browse files
Keep improving fallbacks
1 parent df0f9dd commit 5b1fe9e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

ext/LinearSolveSparseArraysExt.jl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,19 @@ const PREALLOCATED_UMFPACK = SparseArrays.UMFPACK.UmfpackLU(SparseMatrixCSC(0, 0
7272
Int[], Float64[]))
7373

7474
function LinearSolve.init_cacheval(
75-
alg::Union{LUFactorization, GenericLUFactorization}, A::AbstractSparseArray{<:Number, <:Integer}, b, u,
75+
alg::Union{LUFactorization, QRFactorization, GenericLUFactorization}, A::AbstractSparseArray{<:Number, <:Integer}, b, u,
7676
Pl, Pr,
7777
maxiters::Int, abstol, reltol,
7878
verbose::Bool, assumptions::OperatorAssumptions)
7979
nothing
8080
end
8181

82+
function init_cacheval(alg::QRFactorization, A::SparseMatrixCSC{Float64, Int}, b, u, Pl, Pr,
83+
maxiters::Int, abstol, reltol, verbose::Bool,
84+
assumptions::OperatorAssumptions)
85+
ArrayInterface.qr_instance(convert(AbstractMatrix, A), alg.pivot)
86+
end
87+
8288
function LinearSolve.init_cacheval(
8389
alg::UMFPACKFactorization, A::AbstractArray, b, u,
8490
Pl, Pr,

0 commit comments

Comments
 (0)