Skip to content

Commit

Permalink
Merge pull request #87 from bmad-sim/dev-methods
Browse files Browse the repository at this point in the history
change benchmark order
  • Loading branch information
mattsignorelli authored Feb 8, 2024
2 parents ee8b7f8 + e94f4d2 commit 106642e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions benchmark/taylormap.jl
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ function track_ring(z0, k1=0.36, k2l=1.2, kick=zeros(50))
end

function benchmark_GTPSA()
d = Descriptor(4,3,52,3)
d = Descriptor(4,2,52,2)
z = vars(d)
k = params(d)
map = track_ring([z[1], z[2], z[3], z[4]], 0.36+k[1], k[2], k[3:end])
Expand All @@ -94,9 +94,9 @@ function benchmark_ForwardDiff()
m(z) = track_ring([z[1], z[2], z[3], z[4]], 0.36+z[5], z[6], z[7:end])
j = Array{Float64}(undef,4,56)
h = Array{Float64}(undef,224,56)
c = Array{Float64}(undef,12544,56)
#c = Array{Float64}(undef,12544,56)
ForwardDiff.jacobian!(j, m, zeros(56))
ForwardDiff.jacobian!(h, z->ForwardDiff.jacobian(z->m(z), z), zeros(56))
ForwardDiff.jacobian!(c, z->ForwardDiff.jacobian(z->ForwardDiff.jacobian(z->m(z), z), z), zeros(56))
#ForwardDiff.jacobian!(c, z->ForwardDiff.jacobian(z->ForwardDiff.jacobian(z->m(z), z), z), zeros(56))
return j, h #, c
end

0 comments on commit 106642e

Please sign in to comment.