Skip to content

Commit 40b581f

Browse files
Merge pull request #529 from ChrisRackauckas-Claude/fff-strategy-batched-evals
Use FFF strategy API for sorted-batch evaluators (fixes n ≫ m regression)
2 parents 96ab7c8 + e22f5d6 commit 40b581f

8 files changed

Lines changed: 1375 additions & 111 deletions

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ BenchmarkTools = "1"
3838
ChainRulesCore = "1.25"
3939
EnumX = "1.0.4"
4040
FillArrays = "1.13"
41-
FindFirstFunctions = "1.3"
41+
FindFirstFunctions = "2"
4242
FiniteDifferences = "0.12.31"
4343
ForwardDiff = "0.10.37, 1"
4444
LinearAlgebra = "1.10"

src/DataInterpolations.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ using LinearAlgebra, RecipesBase
88
using PrettyTables
99
using ForwardDiff
1010
using EnumX
11-
import FindFirstFunctions: searchsortedfirstcorrelated, searchsortedlastcorrelated,
12-
Guesser
11+
import FindFirstFunctions
12+
import FindFirstFunctions: Guesser
1313

1414
@enumx ExtrapolationType None Constant Linear Extension Periodic Reflective
1515

src/integral_inverses.jl

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,19 @@ Can be easily constructed with `invert_integral(A::LinearInterpolation{<:Abstrac
3333
- `t` : Given by `A.I` (the cumulative integral of `A`)
3434
- `A` : The `LinearInterpolation` object
3535
"""
36-
struct LinearInterpolationIntInv{uType, tType, itpType, T} <:
36+
struct LinearInterpolationIntInv{uType, tType, itpType, T, propsType} <:
3737
AbstractIntegralInverseInterpolation{T}
3838
u::uType
3939
t::tType
4040
extrapolation_left::ExtrapolationType.T
4141
extrapolation_right::ExtrapolationType.T
4242
iguesser::Guesser{tType}
43+
t_props::propsType
4344
itp::itpType
4445
function LinearInterpolationIntInv(u, t, A, extrapolation_left, extrapolation_right)
45-
return new{typeof(u), typeof(t), typeof(A), eltype(u)}(
46-
u, t, extrapolation_left, extrapolation_right, Guesser(t), A
46+
t_props = FindFirstFunctions.SearchProperties(t)
47+
return new{typeof(u), typeof(t), typeof(A), eltype(u), typeof(t_props)}(
48+
u, t, extrapolation_left, extrapolation_right, Guesser(t), t_props, A
4749
)
4850
end
4951
end
@@ -93,19 +95,21 @@ Can be easily constructed with `invert_integral(A::ConstantInterpolation{<:Abstr
9395
- `t` : Given by `A.I` (the cumulative integral of `A`)
9496
- `A` : The `ConstantInterpolation` object
9597
"""
96-
struct ConstantInterpolationIntInv{uType, tType, itpType, T} <:
98+
struct ConstantInterpolationIntInv{uType, tType, itpType, T, propsType} <:
9799
AbstractIntegralInverseInterpolation{T}
98100
u::uType
99101
t::tType
100102
extrapolation_left::ExtrapolationType.T
101103
extrapolation_right::ExtrapolationType.T
102104
iguesser::Guesser{tType}
105+
t_props::propsType
103106
itp::itpType
104107
function ConstantInterpolationIntInv(
105108
u, t, A, extrapolation_left, extrapolation_right
106109
)
107-
return new{typeof(u), typeof(t), typeof(A), eltype(u)}(
108-
u, t, extrapolation_left, extrapolation_right, Guesser(t), A
110+
t_props = FindFirstFunctions.SearchProperties(t)
111+
return new{typeof(u), typeof(t), typeof(A), eltype(u), typeof(t_props)}(
112+
u, t, extrapolation_left, extrapolation_right, Guesser(t), t_props, A
109113
)
110114
end
111115
end

0 commit comments

Comments
 (0)