Commit 9e63d0c
committed
Guard DDE full_cache resize against already-resized aliased arrays
The DDE resize! function first resizes ode_integrator.u and
ode_integrator.k elements, then iterates full_cache(cache) to resize
all cache arrays. Some cache arrays are aliased to the already-resized
arrays (e.g., cache.u === ode_integrator.u, cache.fsalfirst ===
integrator.k[1]). On Julia 1.10 x86, calling resize! on an
already-resized array that shares data triggers "cannot resize array
with shared data". Add a length guard to skip arrays already at the
target length.
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>1 parent f41d8ec commit 9e63d0c
1 file changed
+6
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
230 | 234 | | |
231 | | - | |
| 235 | + | |
232 | 236 | | |
| 237 | + | |
233 | 238 | | |
234 | 239 | | |
235 | 240 | | |
| |||
0 commit comments