When storing a log, solvers reserve memory with reserve!. By default no type information is passed to this method which, then, converts the history into Float64.
This is not the expected behaviour when using non traditional types (for instrumentation purpose) and can lead to problems if their silent convertion into Float64 is not detected by the programmer.
When storing a log, solvers reserve memory with
reserve!
. By default no type information is passed to this method which, then, converts the history intoFloat64
.This is not the expected behaviour when using non traditional types (for instrumentation purpose) and can lead to problems if their silent convertion into
Float64
is not detected by the programmer.I submited a PR which fixes the issue for most solver : https://github.com/JuliaMath/IterativeSolvers.jl/pull/263
I did not modify
lsqr.jl
,lsmr.jl
andsvdl.jl
as the modification was less straightforward but they should probably be modified in the same way.Overall I think that
reserve!
should always stipulate the expected type to avoid regression on this issue.