Skip to content

Commit

Permalink
Add docstring for guess_activity (#1955)
Browse files Browse the repository at this point in the history
  • Loading branch information
gdalle authored Oct 11, 2024
1 parent ad86689 commit 1bbcaa9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/compiler.jl
Original file line number Diff line number Diff line change
Expand Up @@ -856,6 +856,11 @@ end
return rt == Enzyme.Compiler.AnyState || rt == Enzyme.Compiler.DupState
end

"""
Enzyme.guess_activity(::Type{T}, mode::Enzyme.Mode)
Try to guess the most appropriate [`Annotation`](@ref) for arguments of type `T` passed to [`autodiff`](@ref) with a given `mode`.
"""
@inline Enzyme.guess_activity(::Type{T}, mode::Enzyme.Mode) where {T} =
guess_activity(T, convert(API.CDerivativeMode, mode))

Expand Down

0 comments on commit 1bbcaa9

Please sign in to comment.