Skip to content

Commit c389236

Browse files
Fix LU deprecation and improve type-stability of MatrixWorkspace
Fixes LoadError: `LU{T, S}(factors::AbstractMatrix{T}, ipiv::AbstractVector{<:Integer}, info::BlasInt) where {T, S}` is deprecated, use `LU{T, S, typeof(ipiv)}(factors, ipiv, info)` instead.` deprecation, and adds missing type parameters on lu and qr in the matrix workspace.
1 parent 08229b7 commit c389236

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/linear_algebra.jl

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ struct MatrixWorkspace{M<:AbstractMatrix{ComplexF64}} <: AbstractMatrix{ComplexF
88
A::M # Matrix
99
d::Vector{Float64} # Inverse of scaling factors
1010
factorized::Base.RefValue{Bool}
11-
lu::LA.LU{ComplexF64,M} # LU Factorization of D * J
12-
qr::LA.QR{ComplexF64,Matrix{ComplexF64}}
11+
lu::LA.LU{ComplexF64,M,Vector{Int}} # LU Factorization of D * J
12+
qr::LA.QR{ComplexF64,Matrix{ComplexF64},Matrix{ComplexF64}}
1313
row_scaling::Vector{Float64}
1414
scaled::Base.RefValue{Bool}
1515
# mixed precision iterative refinement
@@ -38,8 +38,9 @@ function MatrixWorkspace(Â::AbstractMatrix; optimize_data_structure = true)
3838
end
3939
row_scaling = ones(m)
4040
scaled = Ref(false)
41-
42-
lu = LinearAlgebra.LU{eltype(A),typeof(A)}(copy(A), zeros(Int, m), 0)
41+
42+
ipiv = zeros(Int, m)
43+
lu = LinearAlgebra.LU{eltype(A),typeof(A), typeof(ipiv)}(copy(A), ipiv, 0)
4344
r = zeros(ComplexF64, m)
4445
= zeros(ComplexDF64, m)
4546
= zeros(ComplexDF64, n)

0 commit comments

Comments
 (0)