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

Commit c4d835a

Browse files
vpuri3ChrisRackauckas
authored andcommitted
resize u, f as well
1 parent 552cbc7 commit c4d835a

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

src/differentiation/jaches_products.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,10 @@ function (L::FwdModeAutoDiffVecProd)(dv, v, p, t)
229229
end
230230

231231
function Base.resize!(L::FwdModeAutoDiffVecProd, n::Integer)
232+
233+
static_hasmethod(resize!, typeof((L.f, n))) && resize!(L.f, n)
234+
resize!(L.u, n)
235+
232236
for v in L.cache
233237
resize!(v, n)
234238
end

src/differentiation/vecjac_products.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ function (L::RevModeAutoDiffVecProd{ad, true, false})(dv, v, p, t) where {ad}
8888
end
8989

9090
function Base.resize!(L::RevModeAutoDiffVecProd, n::Integer)
91+
92+
static_hasmethod(resize!, typeof((L.f, n))) && resize!(L.f, n)
93+
resize!(L.u, n)
94+
9195
for v in L.cache
9296
resize!(v, n)
9397
end

0 commit comments

Comments
 (0)