Skip to content

Commit a7509fb

Browse files
authored
Update rules.jl with better docs for forward (#2729)
1 parent 3bb5fe8 commit a7509fb

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

lib/EnzymeCore/src/rules.jl

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,17 @@ import Base: unwrapva, isvarargtype, unwrap_unionall, rewrap_unionall
1414
"""
1515
forward(fwdconfig, func::Annotation{typeof(f)}, RT::Type{<:Annotation}, args::Annotation...)
1616
17-
Calculate the forward derivative. The first argument is a [`FwdConfig](@ref) object
17+
Calculate the forward derivative. The first argument is a [`FwdConfig`](@ref) object
1818
describing parameters of the differentiation.
19-
The second argument `func` is the callable for which the rule applies to.
20-
Either wrapped in a [`Const`](@ref)), or a [`Duplicated`](@ref) if it is a closure.
21-
The third argument is the return type annotation, and all other arguments are the annotated function arguments.
19+
The second argument `func` is the callable to which the rule applies,
20+
either wrapped in a [`Const`](@ref)), or a [`Duplicated`](@ref) if it is a closure.
21+
The third argument is the return type annotation, and all other arguments are the annotated arguments
22+
to the function `f`.
23+
24+
Valid types for `RT` are:
25+
- [`Duplicated`](@ref)
26+
- [`DuplicatedNoNeed`](@ref)
27+
- [`Const`](@ref)
2228
"""
2329
function forward end
2430

0 commit comments

Comments
 (0)