Commit 326ae2c7 authored by Houtan Bastani's avatar Houtan Bastani

remove unnecessary copy

parent cf333885
module DynareSolvers
......@@ -165,7 +167,7 @@ function trustregion(f!::Function, j!::Function, x0::Vector{Float64}, factor::Fl
n, iter, info = length(x0), 1, 0
xnorm, xnorm0 = one(Float64), one(Float64)
fnorm, fnorm1, fnorm0 = one(Float64), one(Float64), one(Float64)
wa.x .= copy(x0)
wa.x .= x0
# Initial evaluation of the residuals (and compute the norm of the residuals)
f!(wa.fval, wa.x)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment