Skip to content

Commit 0da7b47

Browse files
authored
Update julia_interface.jl
1 parent 39681a0 commit 0da7b47

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/julia_interface.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -700,12 +700,10 @@ function NLPModels.hess_coord!(
700700
@lencheck nlp.meta.ncon y
701701
@lencheck nlp.meta.nnzh vals
702702

703-
# Resize workspace vector on demand if needed (Issue #392 - double buffering)
704703
if length(nlp.hess_coord_vals) < nlp.meta.nnzh
705704
resize!(nlp.hess_coord_vals, nlp.meta.nnzh)
706705
end
707706

708-
# Use preallocated vector instead of allocating
709707
NLPModels.hess_coord!(nlp, Vector{T}(x), convert(Vector{T}, y),
710708
view(nlp.hess_coord_vals, 1:nlp.meta.nnzh), obj_weight = obj_weight)
711709
vals .= view(nlp.hess_coord_vals, 1:nlp.meta.nnzh)

0 commit comments

Comments
 (0)