Skip to content

Commit

Permalink
Create new sparse matrix for R factor in sparse least square solve
Browse files Browse the repository at this point in the history
instead of using a view to avoid slow fallback in back substitution.

Fixes #30288
  • Loading branch information
andreasnoack committed Dec 6, 2018
1 parent 6594acc commit 31d1392
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stdlib/SuiteSparse/src/spqr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ function _ldiv_basic(F::QRSparse, B::StridedVecOrMat)
X[rnk + 1:end, :] .= 0

# Solve R*X = B
LinearAlgebra.ldiv!(UpperTriangular(view(F.R, Base.OneTo(rnk), Base.OneTo(rnk))),
LinearAlgebra.ldiv!(UpperTriangular(F.R[Base.OneTo(rnk), Base.OneTo(rnk)]),
view(X0, Base.OneTo(rnk), :))

# Apply right permutation and extract solution from X
Expand Down

0 comments on commit 31d1392

Please sign in to comment.