@@ -10,11 +10,12 @@ function build_adaptive_controller_cache(alg::A, ::Type{T}) where {A, T}
1010 return beta1, beta2, qmax, qmin, gamma, qoldinit, qold
1111end
1212
13- @inline function savevalues! (integrator:: DiffEqBase.AbstractODEIntegrator {
13+ @inline function savevalues! (
14+ integrator:: DiffEqBase.AbstractODEIntegrator {
1415 AlgType,
1516 IIP,
1617 S,
17- T,
18+ T
1819 }, ts,
1920 us,
2021 force = false ) where {AlgType <: GPUODEAlgorithm , IIP, S, T}
4546 saved, savedexactly
4647end
4748
48- @inline function DiffEqBase. terminate! (integrator:: DiffEqBase.AbstractODEIntegrator {AlgType,
49+ @inline function DiffEqBase. terminate! (
50+ integrator:: DiffEqBase.AbstractODEIntegrator {AlgType,
4951 IIP, S,
5052 T},
5153 retcode = ReturnCode. Terminated) where {
5254 AlgType < :
5355 GPUODEAlgorithm,
5456 IIP,
5557 S,
56- T,
58+ T
5759}
5860 integrator. retcode = retcode
5961end
6062
61- @inline function apply_discrete_callback! (integrator:: DiffEqBase.AbstractODEIntegrator {
63+ @inline function apply_discrete_callback! (
64+ integrator:: DiffEqBase.AbstractODEIntegrator {
6265 AlgType,
6366 IIP,
64- S, T,
67+ S, T
6568 },
6669 ts, us,
6770 callback:: GPUDiscreteCallback ) where {
7982 integrator. u_modified, saved_in_cb
8083end
8184
82- @inline function apply_discrete_callback! (integrator:: DiffEqBase.AbstractODEIntegrator {
85+ @inline function apply_discrete_callback! (
86+ integrator:: DiffEqBase.AbstractODEIntegrator {
8387 AlgType,
8488 IIP,
85- S, T,
89+ S, T
8690 },
8791 ts, us,
8892 callback:: GPUDiscreteCallback ,
9397 args... )
9498end
9599
96- @inline function apply_discrete_callback! (integrator:: DiffEqBase.AbstractODEIntegrator {
100+ @inline function apply_discrete_callback! (
101+ integrator:: DiffEqBase.AbstractODEIntegrator {
97102 AlgType,
98103 IIP,
99- S, T,
104+ S, T
100105 },
101106 ts, us,
102107 discrete_modified:: Bool ,
@@ -110,10 +115,11 @@ end
110115 discrete_modified || bool, saved_in_cb || saved_in_cb2
111116end
112117
113- @inline function apply_discrete_callback! (integrator:: DiffEqBase.AbstractODEIntegrator {
118+ @inline function apply_discrete_callback! (
119+ integrator:: DiffEqBase.AbstractODEIntegrator {
114120 AlgType,
115121 IIP,
116- S, T,
122+ S, T
117123 },
118124 ts, us,
119125 discrete_modified:: Bool ,
@@ -126,11 +132,12 @@ end
126132 discrete_modified || bool, saved_in_cb || saved_in_cb2
127133end
128134
129- @inline function interpolate (integrator:: DiffEqBase.AbstractODEIntegrator {
135+ @inline function interpolate (
136+ integrator:: DiffEqBase.AbstractODEIntegrator {
130137 AlgType,
131138 IIP,
132139 S,
133- T,
140+ T
134141 },
135142 t) where {AlgType <: GPUODEAlgorithm , IIP, S, T}
136143 θ = (t - integrator. tprev) / integrator. dt
@@ -142,11 +149,12 @@ end
142149 b7θ * integrator. k7)
143150end
144151
145- @inline function _change_t_via_interpolation! (integrator:: DiffEqBase.AbstractODEIntegrator {
152+ @inline function _change_t_via_interpolation! (
153+ integrator:: DiffEqBase.AbstractODEIntegrator {
146154 AlgType,
147155 IIP,
148156 S,
149- T,
157+ T
150158 },
151159 t,
152160 modify_save_endpoint:: Type{Val{T1}} ) where {
155163 IIP,
156164 S,
157165 T,
158- T1,
166+ T1
159167}
160168 # Can get rid of an allocation here with a function
161169 # get_tmp_arr(integrator.cache) which gives a pointer to some
@@ -169,11 +177,12 @@ end
169177 # integrator.dt = integrator.t - integrator.tprev
170178 end
171179end
172- @inline function DiffEqBase. change_t_via_interpolation! (integrator:: DiffEqBase.AbstractODEIntegrator {
180+ @inline function DiffEqBase. change_t_via_interpolation! (
181+ integrator:: DiffEqBase.AbstractODEIntegrator {
173182 AlgType,
174183 IIP,
175184 S,
176- T,
185+ T
177186 },
178187 t,
179188 modify_save_endpoint:: Type{Val{T1}} = Val{
@@ -184,12 +193,13 @@ end
184193 IIP,
185194 S,
186195 T,
187- T1,
196+ T1
188197}
189198 _change_t_via_interpolation! (integrator, t, modify_save_endpoint)
190199end
191200
192- @inline function apply_callback! (integrator:: DiffEqBase.AbstractODEIntegrator {AlgType, IIP,
201+ @inline function apply_callback! (
202+ integrator:: DiffEqBase.AbstractODEIntegrator {AlgType, IIP,
193203 S, T},
194204 callback:: GPUContinuousCallback ,
195205 cb_time, prev_sign, event_idx, ts,
219229 true , saved_in_cb
220230end
221231
222- @inline function handle_callbacks! (integrator:: DiffEqBase.AbstractODEIntegrator {AlgType,
232+ @inline function handle_callbacks! (
233+ integrator:: DiffEqBase.AbstractODEIntegrator {AlgType,
223234 IIP, S, T},
224235 ts, us) where {AlgType <: GPUODEAlgorithm , IIP, S, T}
225236 discrete_callbacks = integrator. callback. discrete_callbacks
232243 if ! (continuous_callbacks isa Tuple{})
233244 event_occurred = false
234245
235- time, upcrossing, event_occurred, event_idx, idx, counter = DiffEqBase. find_first_continuous_callback (integrator,
246+ time, upcrossing, event_occurred, event_idx, idx, counter = DiffEqBase. find_first_continuous_callback (
247+ integrator,
236248 continuous_callbacks... )
237249
238250 if event_occurred
@@ -256,16 +268,18 @@ end
256268 return false , saved_in_cb
257269end
258270
259- @inline function DiffEqBase. find_callback_time (integrator:: DiffEqBase.AbstractODEIntegrator {
271+ @inline function DiffEqBase. find_callback_time (
272+ integrator:: DiffEqBase.AbstractODEIntegrator {
260273 AlgType,
261274 IIP,
262275 S,
263- T,
276+ T
264277 },
265278 callback:: DiffEqGPU.GPUContinuousCallback ,
266279 counter) where {AlgType <: GPUODEAlgorithm ,
267280 IIP, S, T}
268- event_occurred, interp_index, prev_sign, prev_sign_index, event_idx = DiffEqBase. determine_event_occurance (integrator,
281+ event_occurred, interp_index, prev_sign, prev_sign_index, event_idx = DiffEqBase. determine_event_occurance (
282+ integrator,
269283 callback,
270284 counter)
271285
@@ -321,15 +335,16 @@ end
321335 GPUODEAlgorithm,
322336 IIP,
323337 S,
324- T,
338+ T
325339}
326340 return nothing
327341end
328342
329- @inline function DiffEqBase. get_condition (integrator:: DiffEqBase.AbstractODEIntegrator {
343+ @inline function DiffEqBase. get_condition (
344+ integrator:: DiffEqBase.AbstractODEIntegrator {
330345 AlgType,
331346 IIP,
332- S, T,
347+ S, T
333348 },
334349 callback,
335350 abst) where {AlgType <: GPUODEAlgorithm , IIP, S, T
@@ -345,11 +360,12 @@ end
345360end
346361
347362# interp_points = 0 or equivalently nothing
348- @inline function DiffEqBase. determine_event_occurance (integrator:: DiffEqBase.AbstractODEIntegrator {
363+ @inline function DiffEqBase. determine_event_occurance (
364+ integrator:: DiffEqBase.AbstractODEIntegrator {
349365 AlgType,
350366 IIP,
351367 S,
352- T,
368+ T
353369 },
354370 callback:: DiffEqGPU.GPUContinuousCallback ,
355371 counter) where {
0 commit comments