Closed dpo closed 7 years ago
What if we create hess_op!
? Would it make sense?
It would, but where do we store the temporary vector? And if a user doesn't use hess_op!
, we've allocated an n
-vector for nothing. What's the solution?
hess_op!(nlp, x, temp)
. The user has to create temp
, like he would for other inplace methods.
Ok, that sounds good. Do you want to add that to NLPModels?
ps: you can probably do the same in TRON.
Implementend in https://github.com/JuliaSmoothOptimizers/NLPModels.jl/pull/66
Updated.
Thanks
This cuts the total memory allocated by about a factor of 2. It's a safe thing to do with CG.