Skip to content

Commit e48c548

Browse files
committed
Specialize on f in jacobian(!)
Required for `--trim` compatibility.
1 parent ab317cd commit e48c548

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/OrdinaryDiffEqDifferentiation/src/derivative_wrappers.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ function Base.showerror(io::IO, e::FirstAutodiffJacError)
7575
Base.showerror(io, e.e)
7676
end
7777

78-
function jacobian(f, x::AbstractArray{<:Number}, integrator)
78+
function jacobian(f::F, x::AbstractArray{<:Number}, integrator) where F
7979
alg = unwrap_alg(integrator, true)
8080

8181
# Update stats.nf
@@ -183,9 +183,9 @@ function jacobian(f, x, integrator)
183183
return jac
184184
end
185185

186-
function jacobian!(J::AbstractMatrix{<:Number}, f, x::AbstractArray{<:Number},
186+
function jacobian!(J::AbstractMatrix{<:Number}, f::F, x::AbstractArray{<:Number},
187187
fx::AbstractArray{<:Number}, integrator::SciMLBase.DEIntegrator,
188-
jac_config)
188+
jac_config) where F
189189
alg = unwrap_alg(integrator, true)
190190

191191
dense = ADTypes.dense_ad(alg_autodiff(alg))

0 commit comments

Comments
 (0)