Skip to content

Commit df30082

Browse files
format
1 parent 8704130 commit df30082

File tree

2 files changed

+18
-9
lines changed

2 files changed

+18
-9
lines changed

ext/DiffEqBaseReverseDiffExt.jl

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,29 +63,33 @@ end
6363

6464
# `ReverseDiff.TrackedArray`
6565
function DiffEqBase.solve_up(prob::DiffEqBase.DEProblem,
66-
sensealg::Union{DiffEqBase.AbstractOverloadingSensitivityAlgorithm,
66+
sensealg::Union{
67+
DiffEqBase.AbstractOverloadingSensitivityAlgorithm,
6768
Nothing}, u0::ReverseDiff.TrackedArray,
6869
p::ReverseDiff.TrackedArray, args...; kwargs...)
6970
ReverseDiff.track(DiffEqBase.solve_up, prob, sensealg, u0, p, args...; kwargs...)
7071
end
7172

7273
function DiffEqBase.solve_up(prob::DiffEqBase.DEProblem,
73-
sensealg::Union{DiffEqBase.AbstractOverloadingSensitivityAlgorithm,
74+
sensealg::Union{
75+
DiffEqBase.AbstractOverloadingSensitivityAlgorithm,
7476
Nothing}, u0, p::ReverseDiff.TrackedArray,
7577
args...; kwargs...)
7678
ReverseDiff.track(DiffEqBase.solve_up, prob, sensealg, u0, p, args...; kwargs...)
7779
end
7880

7981
function DiffEqBase.solve_up(prob::DiffEqBase.DEProblem,
80-
sensealg::Union{DiffEqBase.AbstractOverloadingSensitivityAlgorithm,
82+
sensealg::Union{
83+
DiffEqBase.AbstractOverloadingSensitivityAlgorithm,
8184
Nothing}, u0::ReverseDiff.TrackedArray, p,
8285
args...; kwargs...)
8386
ReverseDiff.track(DiffEqBase.solve_up, prob, sensealg, u0, p, args...; kwargs...)
8487
end
8588

8689
# `AbstractArray{<:ReverseDiff.TrackedReal}`
8790
function DiffEqBase.solve_up(prob::DiffEqBase.DEProblem,
88-
sensealg::Union{DiffEqBase.AbstractOverloadingSensitivityAlgorithm,
91+
sensealg::Union{
92+
DiffEqBase.AbstractOverloadingSensitivityAlgorithm,
8993
Nothing},
9094
u0::AbstractArray{<:ReverseDiff.TrackedReal},
9195
p::AbstractArray{<:ReverseDiff.TrackedReal}, args...;
@@ -95,15 +99,17 @@ function DiffEqBase.solve_up(prob::DiffEqBase.DEProblem,
9599
end
96100

97101
function DiffEqBase.solve_up(prob::DiffEqBase.DEProblem,
98-
sensealg::Union{DiffEqBase.AbstractOverloadingSensitivityAlgorithm,
102+
sensealg::Union{
103+
DiffEqBase.AbstractOverloadingSensitivityAlgorithm,
99104
Nothing}, u0,
100105
p::AbstractArray{<:ReverseDiff.TrackedReal},
101106
args...; kwargs...)
102107
DiffEqBase.solve_up(prob, sensealg, u0, reduce(vcat, p), args...; kwargs...)
103108
end
104109

105110
function DiffEqBase.solve_up(prob::DiffEqBase.DEProblem,
106-
sensealg::Union{DiffEqBase.AbstractOverloadingSensitivityAlgorithm,
111+
sensealg::Union{
112+
DiffEqBase.AbstractOverloadingSensitivityAlgorithm,
107113
Nothing},
108114
u0::AbstractArray{<:ReverseDiff.TrackedReal}, p,
109115
args...; kwargs...)

ext/DiffEqBaseTrackerExt.jl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,21 +62,24 @@ end
6262
@inline DiffEqBase.ODE_DEFAULT_NORM(u::Tracker.TrackedReal, t::Tracker.TrackedReal) = abs(u)
6363

6464
function DiffEqBase.solve_up(prob::DiffEqBase.DEProblem,
65-
sensealg::Union{DiffEqBase.AbstractOverloadingSensitivityAlgorithm,
65+
sensealg::Union{
66+
DiffEqBase.AbstractOverloadingSensitivityAlgorithm,
6667
Nothing}, u0::Tracker.TrackedArray,
6768
p::Tracker.TrackedArray, args...; kwargs...)
6869
Tracker.track(DiffEqBase.solve_up, prob, sensealg, u0, p, args...; kwargs...)
6970
end
7071

7172
function DiffEqBase.solve_up(prob::DiffEqBase.DEProblem,
72-
sensealg::Union{DiffEqBase.AbstractOverloadingSensitivityAlgorithm,
73+
sensealg::Union{
74+
DiffEqBase.AbstractOverloadingSensitivityAlgorithm,
7375
Nothing}, u0::Tracker.TrackedArray, p, args...;
7476
kwargs...)
7577
Tracker.track(DiffEqBase.solve_up, prob, sensealg, u0, p, args...; kwargs...)
7678
end
7779

7880
function DiffEqBase.solve_up(prob::DiffEqBase.DEProblem,
79-
sensealg::Union{DiffEqBase.AbstractOverloadingSensitivityAlgorithm,
81+
sensealg::Union{
82+
DiffEqBase.AbstractOverloadingSensitivityAlgorithm,
8083
Nothing}, u0, p::Tracker.TrackedArray, args...;
8184
kwargs...)
8285
Tracker.track(DiffEqBase.solve_up, prob, sensealg, u0, p, args...; kwargs...)

0 commit comments

Comments
 (0)