Skip to content

Commit

Permalink
Make zero in place
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmoses committed Jun 6, 2024
1 parent f74c137 commit ee3bffb
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/EnzymeCore/src/EnzymeCore.jl
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,14 @@ function autodiff_deferred_thunk end
Recursively make a zero'd copy of the value `prev` of type `T`. The argument `copy_if_inactive` specifies
what to do if the type `T` is guaranteed to be inactive, use the primal (the default) or still copy the value.
"""
function make_zero end
function make_zero

"""
make_zero!(prev::T)::T
Recursively set a variables differentiable fields to zero. Only applicable for mutable types `T`.
"""
function make_zero! end

"""
make_zero(prev::T)
Expand Down

0 comments on commit ee3bffb

Please sign in to comment.