Skip to content

Commit 6ab9b93

Browse files
committed
Fix
1 parent f5c6ad2 commit 6ab9b93

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

  • DifferentiationInterface/src/second_order

DifferentiationInterface/src/second_order/hvp.jl

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ end
6565

6666
## Forward over anything
6767

68-
struct ForwardOverAnythingPrep{G,PO<:PushforwardPrep,PI<:PushforwardPrep} <: HVPPrep
68+
struct ForwardOverAnythingHVPPrep{G,PO<:PushforwardPrep,PI<:PushforwardPrep} <: HVPPrep
6969
# pushforward of many pushforwards in theory, but pushforward of gradient in practice
7070
grad_buffer::G
7171
outer_pushforward_prep::PO
@@ -91,14 +91,14 @@ function _prepare_hvp_aux(
9191
outer_pushforward_in_prep = prepare_pushforward(
9292
shuffled_gradient!, grad_buffer, outer(backend), x, tx, new_contexts...
9393
)
94-
return ForwardOverAnythingPrep(
94+
return ForwardOverAnythingHVPPrep(
9595
grad_buffer, outer_pushforward_prep, outer_pushforward_in_prep
9696
)
9797
end
9898

9999
function hvp(
100100
f::F,
101-
prep::ForwardOverAnythingPrep,
101+
prep::ForwardOverAnythingHVPPrep,
102102
backend::AbstractADType,
103103
x,
104104
tx::NTuple,
@@ -117,7 +117,7 @@ end
117117
function hvp!(
118118
f::F,
119119
tg::NTuple,
120-
prep::ForwardOverAnythingPrep,
120+
prep::ForwardOverAnythingHVPPrep,
121121
backend::AbstractADType,
122122
x,
123123
tx::NTuple,
@@ -132,7 +132,7 @@ function _hvp_aux!(
132132
::InPlaceSupported,
133133
f::F,
134134
tg::NTuple,
135-
prep::ForwardOverAnythingPrep,
135+
prep::ForwardOverAnythingHVPPrep,
136136
backend::AbstractADType,
137137
x,
138138
tx::NTuple,
@@ -159,7 +159,7 @@ function _hvp_aux!(
159159
::InPlaceNotSupported,
160160
f::F,
161161
tg::NTuple,
162-
prep::ForwardOverAnythingPrep,
162+
prep::ForwardOverAnythingHVPPrep,
163163
backend::AbstractADType,
164164
x,
165165
tx::NTuple,
@@ -183,7 +183,7 @@ end
183183

184184
function gradient_and_hvp(
185185
f::F,
186-
prep::ForwardOverAnythingPrep,
186+
prep::ForwardOverAnythingHVPPrep,
187187
backend::AbstractADType,
188188
x,
189189
tx::NTuple,
@@ -203,7 +203,7 @@ function gradient_and_hvp!(
203203
f::F,
204204
grad,
205205
tg::NTuple,
206-
prep::ForwardOverAnythingPrep,
206+
prep::ForwardOverAnythingHVPPrep,
207207
backend::AbstractADType,
208208
x,
209209
tx::NTuple,
@@ -219,7 +219,7 @@ function _gradient_and_hvp_aux!(
219219
f::F,
220220
grad,
221221
tg::NTuple,
222-
prep::ForwardOverAnythingPrep,
222+
prep::ForwardOverAnythingHVPPrep,
223223
backend::AbstractADType,
224224
x,
225225
tx::NTuple,
@@ -248,7 +248,7 @@ function _gradient_and_hvp_aux!(
248248
f::F,
249249
grad,
250250
tg::NTuple,
251-
prep::ForwardOverAnythingPrep,
251+
prep::ForwardOverAnythingHVPPrep,
252252
backend::AbstractADType,
253253
x,
254254
tx::NTuple,

0 commit comments

Comments
 (0)