Skip to content
6 changes: 3 additions & 3 deletions src/implementations/lq.jl
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ function lq_via_qr!(A::AbstractMatrix, L::AbstractMatrix, Q::AbstractMatrix,
qr_alg::AbstractAlgorithm)
m, n = size(A)
minmn = min(m, n)
At = adjoint!(similar(A'), A)
At = adjoint!(similar(A'), A)::AbstractMatrix
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aha, this is where the type assert was added. Is this only JET that complains, or was there really a type instability or type inference issue? I cannot see how asserting an abstract type would help with anything.

Qt = (A === Q) ? At : similar(Q')
Lt = similar(L')
if size(Q) == (n, n)
Expand All @@ -197,9 +197,9 @@ end
function lq_null_via_qr!(A::AbstractMatrix, N::AbstractMatrix, qr_alg::AbstractAlgorithm)
m, n = size(A)
minmn = min(m, n)
At = adjoint!(similar(A'), A)
At = adjoint!(similar(A'), A)::AbstractMatrix
Nt = similar(N')
Nt = qr_null!(At, Nt, qr_alg)
!isempty(N) && adjoint!(N, Nt)
return N
end
end