You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/dense.jl
+89-35Lines changed: 89 additions & 35 deletions
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,15 @@
1
1
"""
2
-
AutoChainRules(; ruleconfig)
2
+
AutoChainRules{RC}
3
3
4
4
Struct used to select an automatic differentiation backend based on [ChainRulesCore.jl](https://github.com/JuliaDiff/ChainRulesCore.jl) (see the list [here](https://juliadiff.org/ChainRulesCore.jl/stable/index.html#ChainRules-roll-out-status)).
5
5
6
-
Exported from [ADTypes.jl](https://github.com/SciML/ADTypes.jl).
6
+
Defined by [ADTypes.jl](https://github.com/SciML/ADTypes.jl).
7
+
8
+
# Constructors
9
+
10
+
AutoChainRules(; ruleconfig)
7
11
8
-
# Keyword Arguments
12
+
# Fields
9
13
10
14
- `ruleconfig::RC`: a [`ChainRulesCore.RuleConfig`](https://juliadiff.org/ChainRulesCore.jl/stable/rule_author/superpowers/ruleconfig.html) object.
11
15
"""
@@ -16,24 +20,32 @@ end
16
20
mode(::AutoChainRules) =ForwardOrReverseMode() # specialized in the extension
17
21
18
22
"""
19
-
AutoDiffractor()
23
+
AutoDiffractor
20
24
21
25
Struct used to select the [Diffractor.jl](https://github.com/JuliaDiff/Diffractor.jl) backend for automatic differentiation.
22
26
23
-
Exported from [ADTypes.jl](https://github.com/SciML/ADTypes.jl).
27
+
Defined by [ADTypes.jl](https://github.com/SciML/ADTypes.jl).
28
+
29
+
# Constructors
30
+
31
+
AutoDiffractor()
24
32
"""
25
33
struct AutoDiffractor <:AbstractADTypeend
26
34
27
35
mode(::AutoDiffractor) =ForwardOrReverseMode()
28
36
29
37
"""
30
-
AutoEnzyme(; mode=nothing)
38
+
AutoEnzyme{M}
31
39
32
40
Struct used to select the [Enzyme.jl](https://github.com/EnzymeAD/Enzyme.jl) backend for automatic differentiation.
41
+
42
+
Defined by [ADTypes.jl](https://github.com/SciML/ADTypes.jl).
43
+
44
+
# Constructors
33
45
34
-
Exported from [ADTypes.jl](https://github.com/SciML/ADTypes.jl).
46
+
AutoEnzyme(; mode=nothing)
35
47
36
-
# Keyword Arguments
48
+
# Fields
37
49
38
50
- `mode::M`: can be either
39
51
- an object subtyping `EnzymeCore.Mode` (like `EnzymeCore.Forward` or `EnzymeCore.Reverse`) if a specific mode is required
@@ -46,24 +58,32 @@ end
46
58
mode(::AutoEnzyme) =ForwardOrReverseMode() # specialized in the extension
47
59
48
60
"""
49
-
AutoFastDifferentiation()
61
+
AutoFastDifferentiation
50
62
51
63
Struct used to select the [FastDifferentiation.jl](https://github.com/brianguenter/FastDifferentiation.jl) backend for automatic differentiation.
52
64
53
-
Exported from [ADTypes.jl](https://github.com/SciML/ADTypes.jl).
65
+
Defined by [ADTypes.jl](https://github.com/SciML/ADTypes.jl).
- `fdjtype::T2`: finite difference type for the Jacobian
@@ -78,13 +98,17 @@ end
78
98
mode(::AutoFiniteDiff) =ForwardMode()
79
99
80
100
"""
81
-
AutoFiniteDifferences(; fdm)
101
+
AutoFiniteDifferences{T}
82
102
83
103
Struct used to select the [FiniteDifferences.jl](https://github.com/JuliaDiff/FiniteDifferences.jl) backend for automatic differentiation.
84
104
85
-
Exported from [ADTypes.jl](https://github.com/SciML/ADTypes.jl).
105
+
Defined by [ADTypes.jl](https://github.com/SciML/ADTypes.jl).
106
+
107
+
# Constructors
86
108
87
-
# Keyword Arguments
109
+
AutoFiniteDifferences(; fdm)
110
+
111
+
# Fields
88
112
89
113
- `fdm::T`: a [`FiniteDifferenceMethod`](https://juliadiff.org/FiniteDifferences.jl/stable/pages/api/#FiniteDifferences.FiniteDifferenceMethod)
90
114
"""
@@ -95,15 +119,22 @@ end
95
119
mode(::AutoFiniteDifferences) =ForwardMode()
96
120
97
121
"""
98
-
AutoForwardDiff(; chunksize=nothing, tag=nothing)
122
+
AutoForwardDiff{chunksize,T}
99
123
100
124
Struct used to select the [ForwardDiff.jl](https://github.com/JuliaDiff/ForwardDiff.jl) backend for automatic differentiation.
101
125
102
-
Exported from [ADTypes.jl](https://github.com/SciML/ADTypes.jl).
126
+
Defined by [ADTypes.jl](https://github.com/SciML/ADTypes.jl).
103
127
104
-
# Keyword Arguments
128
+
# Constructors
129
+
130
+
AutoForwardDiff(; chunksize=nothing, tag=nothing)
131
+
132
+
# Type parameters
105
133
106
134
- `chunksize`: the preferred [chunk size](https://juliadiff.org/ForwardDiff.jl/stable/user/advanced/#Configuring-Chunk-Size) to evaluate several derivatives at once
135
+
136
+
# Fields
137
+
107
138
- `tag::T`: a [custom tag](https://juliadiff.org/ForwardDiff.jl/release-0.10/user/advanced.html#Custom-tags-and-tag-checking-1) to handle nested differentiation calls (usually not necessary)
Struct used to select the [PolyesterForwardDiff.jl](https://github.com/JuliaDiff/PolyesterForwardDiff.jl) backend for automatic differentiation.
161
+
# Type parameters
123
162
124
-
Exported from [ADTypes.jl](https://github.com/SciML/ADTypes.jl).
163
+
- `chunksize`: the preferred [chunk size](https://juliadiff.org/ForwardDiff.jl/stable/user/advanced/#Configuring-Chunk-Size) to evaluate several derivatives at once
125
164
126
-
# Keyword Arguments
165
+
# Fields
127
166
128
-
- `chunksize`: the preferred [chunk size](https://juliadiff.org/ForwardDiff.jl/stable/user/advanced/#Configuring-Chunk-Size) to evaluate several derivatives at once
129
167
- `tag::T`: a [custom tag](https://juliadiff.org/ForwardDiff.jl/release-0.10/user/advanced.html#Custom-tags-and-tag-checking-1) to handle nested differentiation calls (usually not necessary)
Struct used to select the [ReverseDiff.jl](https://github.com/JuliaDiff/ReverseDiff.jl) backend for automatic differentiation.
145
183
146
-
Exported from [ADTypes.jl](https://github.com/SciML/ADTypes.jl).
184
+
Defined by [ADTypes.jl](https://github.com/SciML/ADTypes.jl).
185
+
186
+
# Constructors
147
187
148
-
# Keyword Arguments
188
+
AutoReverseDiff(; compile=false)
189
+
190
+
# Fields
149
191
150
192
- `compile::Bool`: whether to [compile the tape](https://juliadiff.org/ReverseDiff.jl/api/#ReverseDiff.compile) prior to differentiation
151
193
"""
@@ -156,24 +198,32 @@ end
156
198
mode(::AutoReverseDiff) =ReverseMode()
157
199
158
200
"""
159
-
AutoSymbolics()
201
+
AutoSymbolics
160
202
161
203
Struct used to select the [Symbolics.jl](https://github.com/JuliaSymbolics/Symbolics.jl) backend for automatic differentiation.
162
204
163
-
Exported from [ADTypes.jl](https://github.com/SciML/ADTypes.jl).
205
+
Defined by [ADTypes.jl](https://github.com/SciML/ADTypes.jl).
206
+
207
+
# Constructors
208
+
209
+
AutoSymbolics()
164
210
"""
165
211
struct AutoSymbolics <:AbstractADTypeend
166
212
167
213
mode(::AutoSymbolics) =SymbolicMode()
168
214
169
215
"""
170
-
AutoTapir()
216
+
AutoTapir
171
217
172
218
Struct used to select the [Tapir.jl](https://github.com/withbayes/Tapir.jl) backend for automatic differentiation.
173
219
174
-
Exported from [ADTypes.jl](https://github.com/SciML/ADTypes.jl).
220
+
Defined by [ADTypes.jl](https://github.com/SciML/ADTypes.jl).
221
+
222
+
# Constructors
175
223
176
-
# Keyword Arguments
224
+
AutoTapir(; safe_mode=true)
225
+
226
+
# Fields
177
227
178
228
- `safe_mode::Bool`: whether to run additional checks to catch errors early. On by default. Turn off to maximise performance if your code runs correctly.
0 commit comments