JuliaLinearAlgebra / IterativeSolvers.jl

Iterative algorithms for solving linear systems, eigensystems, and singular value problems
MIT License
407 stars 106 forks source link

Reduce allocation in IDRS inner loop #187

Closed samuelpowell closed 6 years ago

samuelpowell commented 6 years ago

This reduces allocations in the IDRS inner loop, ref #186.

mschauer commented 6 years ago

The design comes from a time where https://github.com/Jutho/LinearMaps.jl was not yet a thing and I wanted solve Lyapunov type equations. See https://github.com/mschauer/IDRsSolver.jl/blob/master/src/IDRsSolver.jl#L47 . Aligning the code with the other solvers is a good idea.

haampie commented 6 years ago

Looks good to me! The splatting shouldn't be necessary when LinearMaps is used.

samuelpowell commented 6 years ago

@mschauer ahh yes, that makes sense. Indeed, LinearMaps.jl is incredibly useful for this kind of thing.

@haampie thanks for review.