4040
4141function DI. pushforward (
4242 f,
43- prep:: FiniteDiffOneArgPushforwardPrep{Nothing} ,
43+ prep:: FiniteDiffOneArgPushforwardPrep{SIG, Nothing} ,
4444 backend:: AutoFiniteDiff ,
4545 x,
4646 tx:: NTuple ,
4747 contexts:: Vararg{DI.Context,C} ,
48- ) where {C}
48+ ) where {SIG, C}
4949 DI. check_prep (f, prep, backend, x, tx, contexts... )
5050 (; relstep, absstep, dir) = prep
5151 step (t:: Number , dx) = f (x .+ t .* dx, map (DI. unwrap, contexts)... )
5959
6060function DI. value_and_pushforward (
6161 f,
62- prep:: FiniteDiffOneArgPushforwardPrep{Nothing} ,
62+ prep:: FiniteDiffOneArgPushforwardPrep{SIG, Nothing} ,
6363 backend:: AutoFiniteDiff ,
6464 x,
6565 tx:: NTuple ,
6666 contexts:: Vararg{DI.Context,C} ,
67- ) where {C}
67+ ) where {SIG, C}
6868 DI. check_prep (f, prep, backend, x, tx, contexts... )
6969 (; relstep, absstep, dir) = prep
7070 step (t:: Number , dx) = f (x .+ t .* dx, map (DI. unwrap, contexts)... )
8686
8787function DI. pushforward (
8888 f,
89- prep:: FiniteDiffOneArgPushforwardPrep{<:JVPCache} ,
89+ prep:: FiniteDiffOneArgPushforwardPrep{SIG, <:JVPCache} ,
9090 backend:: AutoFiniteDiff ,
9191 x,
9292 tx:: NTuple ,
9393 contexts:: Vararg{DI.Context,C} ,
94- ) where {C}
94+ ) where {SIG, C}
9595 DI. check_prep (f, prep, backend, x, tx, contexts... )
9696 (; relstep, absstep, dir) = prep
9797 fc = DI. with_contexts (f, contexts... )
@@ -103,12 +103,12 @@ end
103103
104104function DI. value_and_pushforward (
105105 f,
106- prep:: FiniteDiffOneArgPushforwardPrep{<:JVPCache} ,
106+ prep:: FiniteDiffOneArgPushforwardPrep{SIG, <:JVPCache} ,
107107 backend:: AutoFiniteDiff ,
108108 x,
109109 tx:: NTuple ,
110110 contexts:: Vararg{DI.Context,C} ,
111- ) where {C}
111+ ) where {SIG, C}
112112 DI. check_prep (f, prep, backend, x, tx, contexts... )
113113 (; relstep, absstep, dir) = prep
114114 fc = DI. with_contexts (f, contexts... )
@@ -159,11 +159,11 @@ end
159159
160160function DI. derivative (
161161 f,
162- prep:: FiniteDiffOneArgDerivativePrep{Nothing} ,
162+ prep:: FiniteDiffOneArgDerivativePrep{SIG, Nothing} ,
163163 backend:: AutoFiniteDiff ,
164164 x,
165165 contexts:: Vararg{DI.Context,C} ,
166- ) where {C}
166+ ) where {SIG, C}
167167 DI. check_prep (f, prep, backend, x, contexts... )
168168 (; relstep, absstep, dir) = prep
169169 fc = DI. with_contexts (f, contexts... )
@@ -172,11 +172,11 @@ end
172172
173173function DI. value_and_derivative (
174174 f,
175- prep:: FiniteDiffOneArgDerivativePrep{Nothing} ,
175+ prep:: FiniteDiffOneArgDerivativePrep{SIG, Nothing} ,
176176 backend:: AutoFiniteDiff ,
177177 x,
178178 contexts:: Vararg{DI.Context,C} ,
179- ) where {C}
179+ ) where {SIG, C}
180180 DI. check_prep (f, prep, backend, x, contexts... )
181181 (; relstep, absstep, dir) = prep
182182 fc = DI. with_contexts (f, contexts... )
@@ -193,11 +193,11 @@ end
193193
194194function DI. derivative (
195195 f,
196- prep:: FiniteDiffOneArgDerivativePrep{<:GradientCache} ,
196+ prep:: FiniteDiffOneArgDerivativePrep{SIG, <:GradientCache} ,
197197 backend:: AutoFiniteDiff ,
198198 x,
199199 contexts:: Vararg{DI.Context,C} ,
200- ) where {C}
200+ ) where {SIG, C}
201201 DI. check_prep (f, prep, backend, x, contexts... )
202202 (; relstep, absstep, dir) = prep
203203 fc = DI. with_contexts (f, contexts... )
@@ -207,11 +207,11 @@ end
207207function DI. derivative! (
208208 f,
209209 der,
210- prep:: FiniteDiffOneArgDerivativePrep{<:GradientCache} ,
210+ prep:: FiniteDiffOneArgDerivativePrep{SIG, <:GradientCache} ,
211211 backend:: AutoFiniteDiff ,
212212 x,
213213 contexts:: Vararg{DI.Context,C} ,
214- ) where {C}
214+ ) where {SIG, C}
215215 DI. check_prep (f, prep, backend, x, contexts... )
216216 (; relstep, absstep, dir) = prep
217217 fc = DI. with_contexts (f, contexts... )
@@ -220,11 +220,11 @@ end
220220
221221function DI. value_and_derivative (
222222 f,
223- prep:: FiniteDiffOneArgDerivativePrep{<:GradientCache} ,
223+ prep:: FiniteDiffOneArgDerivativePrep{SIG, <:GradientCache} ,
224224 backend:: AutoFiniteDiff ,
225225 x,
226226 contexts:: Vararg{DI.Context,C} ,
227- ) where {C}
227+ ) where {SIG, C}
228228 DI. check_prep (f, prep, backend, x, contexts... )
229229 fc = DI. with_contexts (f, contexts... )
230230 (; relstep, absstep, dir) = prep
@@ -235,11 +235,11 @@ end
235235function DI. value_and_derivative! (
236236 f,
237237 der,
238- prep:: FiniteDiffOneArgDerivativePrep{<:GradientCache} ,
238+ prep:: FiniteDiffOneArgDerivativePrep{SIG, <:GradientCache} ,
239239 backend:: AutoFiniteDiff ,
240240 x,
241241 contexts:: Vararg{DI.Context,C} ,
242- ) where {C}
242+ ) where {SIG, C}
243243 DI. check_prep (f, prep, backend, x, contexts... )
244244 (; relstep, absstep, dir) = prep
245245 fc = DI. with_contexts (f, contexts... )
0 commit comments