Skip to content

Commit b9ff025

Browse files
committed
Move fill!
1 parent ba5b7c4 commit b9ff025

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Nonlinear/ReverseAD/forward_over_reverse.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ function _eval_hessian_chunk(
101101
d.input_ϵ[(idx-1)*CHUNK+s] = ex.seed_matrix[r, offset+s-1]
102102
end
103103
end
104-
fill!(d.output_ϵ, 0.0)
105104
_hessian_slice_inner(d, ex, Val(CHUNK))
106105
fill!(d.input_ϵ, 0.0)
107106
# collect directional derivatives
@@ -118,6 +117,7 @@ end
118117
function _hessian_slice_inner(d, ex, ::Val{CHUNK}) where {CHUNK}
119118
T = ForwardDiff.Partials{CHUNK,Float64} # This is our element type.
120119
input_ϵ = _reinterpret_unsafe(T, d.input_ϵ)
120+
fill!(d.output_ϵ, 0.0)
121121
output_ϵ = _reinterpret_unsafe(T, d.output_ϵ)
122122
subexpr_forward_values_ϵ =
123123
_reinterpret_unsafe(T, d.subexpression_forward_values_ϵ)

0 commit comments

Comments
 (0)