Skip to content

Commit

Permalink
Remove extra allocation
Browse files Browse the repository at this point in the history
No need to specify the stats within R2 for the moment as we are interested by the allocations of ```solve!```
  • Loading branch information
MohamedLaghdafHABIBOULLAH authored and dpo committed Sep 9, 2024
1 parent c388384 commit c37c512
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/R2_alg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ function R2(reg_nlp::AbstractRegularizedNLPModel; kwargs...)
kwargs_dict = Dict(kwargs...)
max_iter = pop!(kwargs_dict, :max_iter, 10000)
solver = R2Solver(reg_nlp, max_iter = max_iter)
stats = GenericExecutionStats(reg_nlp.model, solver_specific = Dict{Symbol, Union{Float64, Vector{Float64}, Vector{Int64}}}())
stats = GenericExecutionStats(reg_nlp.model)
cb =
(nlp, solver, stats) -> begin
solver.Fobj_hist[stats.iter + 1] = stats.solver_specific[:smooth_obj]
Expand Down

0 comments on commit c37c512

Please sign in to comment.