Skip to content
This repository was archived by the owner on Apr 23, 2025. It is now read-only.

Commit 5deb9d9

Browse files
Merge pull request #310 from JuliaDiff/ChrisRackauckas-patch-2
Fix AutoFiniteDiff caching
2 parents 601ff82 + f05b38b commit 5deb9d9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/differentiation/jaches_products.jl

+2-1
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,9 @@ function JacVec(f, u::AbstractArray, p = nothing, t = nothing; fu = nothing,
268268
cache, vecprod, vecprod! = if autodiff isa AutoFiniteDiff
269269
cache1 = similar(fu)
270270
cache2 = similar(u)
271+
cache3 = similar(u)
271272

272-
(cache1, cache2), num_jacvec, num_jacvec!
273+
(cache1, cache2, cache3), num_jacvec, num_jacvec!
273274
elseif autodiff isa AutoForwardDiff
274275
cache1 = Dual{
275276
typeof(ForwardDiff.Tag(tag, eltype(u))), eltype(u), 1

0 commit comments

Comments
 (0)