Closed vincentcp closed 5 years ago
Yes. That should be possible. The best way to make this change happen is if you could prepare the PR. It should be a simple one.
The author's of lsqr
give a helpful comment:
# Note that the following three lines are a band aid for a GEMM: X: C := αA'B + βC.
# This is already supported in mul! for sparse and distributed matrices, but not yet dense
mul!(tmpn, adjoint(A), u)
v .= -beta .* v .+ tmpn
The author's of
lsqr
give a helpful comment:
I think I'm missing something. Why would that affect moving the call toadjoint
outside the loop and save the result as e.g. adjA
?
If adjoint(A)
is an expensive operation why do I do need to do it every iteration while its result stays the same?
One can certainly take the adjoint out of the loop. The comment just points at the underlying problem. You (@andreasnoack) wrote this 4 years ago. Maybe it is fixed by now?
Maybe it is fixed by now?
Unfortunate not, see https://github.com/JuliaLang/julia/issues/23919
I have a linear object
A
that allocates some memory when creating the adjoint. When I applylsqr
, this adjoint is created in every iteration.Can
adjoint(A)
be placed outside of the loop?