Skip to content

Commit 6cf02e7

Browse files
committed
fix benchmark
1 parent 96a8ba4 commit 6cf02e7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

benchmark/benchmarks.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@ using TimerNLPModels
66
const SUITE = BenchmarkGroup()
77

88
for n in [100, 1000]
9-
g = zeros(T, n)
9+
g = zeros(n)
1010
SUITE["grad! ref"]["$n"] = @benchmarkable grad!(nlp, get_x0(nlp), $g) setup = (nlp = OptimizationProblems.ADNLPProblems.arglina(n = $n), timed_nlp = TimerNLPModel(nlp))
1111
SUITE["grad! tim"]["$n"] = @benchmarkable grad!(timed_nlp, get_x0(nlp), $g) setup = (nlp = OptimizationProblems.ADNLPProblems.arglina(n = $n), timed_nlp = TimerNLPModel(nlp))
1212
end
1313
for n in [100, 1000]
1414
Hv = zeros(T, n)
15-
SUITE["hprod!"]["$n"] = @benchmarkable hprod!(nlp, get_x0(nlp), get_x0(nlp), $Hv) setup = (nlp = OptimizationProblems.ADNLPProblems.arglina(n = $n))
15+
SUITE["hprod! ref"]["$n"] = @benchmarkable hprod!(nlp, get_x0(nlp), get_x0(nlp), $Hv) setup = (nlp = OptimizationProblems.ADNLPProblems.arglina(n = $n), timed_nlp = TimerNLPModel(nlp))
16+
SUITE["hprod! tim"]["$n"] = @benchmarkable hprod!(timed_nlp, get_x0(nlp), get_x0(nlp), $Hv) setup = (nlp = OptimizationProblems.ADNLPProblems.arglina(n = $n), timed_nlp = TimerNLPModel(nlp))
1617
end

0 commit comments

Comments
 (0)