Skip to content

Commit 3c178aa

Browse files
fix: revert zero helper in constant-cache fsal init
1 parent 9223824 commit 3c178aa

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

lib/OrdinaryDiffEqCore/src/caches/basic_caches.jl

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,7 @@ ismutablecache(cache::OrdinaryDiffEqMutableCache) = true
88
ismutablecache(cache::OrdinaryDiffEqConstantCache) = false
99

1010
# Don't worry about the potential alloc on a constant cache
11-
# For runtime-unit quantities (DynamicQuantities), `zero(u::AbstractArray)` used to
12-
# call `zero(::Type{eltype(u)})`, which is intentionally undefined. DynamicQuantities
13-
# now defines `zero(::AbstractArray{<:UnionAbstractQuantity})`, so we can rely on
14-
# `zero(u)` here.
15-
@inline _zero_like(u) = zero(u)
16-
get_fsalfirstlast(cache::OrdinaryDiffEqConstantCache, u) = (_zero_like(u), _zero_like(u))
11+
get_fsalfirstlast(cache::OrdinaryDiffEqConstantCache, u) = (zero(u), zero(u))
1712

1813
mutable struct CompositeCache{T, F} <: OrdinaryDiffEqCache
1914
caches::T

0 commit comments

Comments
 (0)