diff --git a/src/operations.jl b/src/operations.jl index da0bfc879..7d218b276 100644 --- a/src/operations.jl +++ b/src/operations.jl @@ -4,9 +4,9 @@ accumulate(Δ, ∂) Return `Δ + ∂` evaluated in a manner that supports ChainRulesCore's -various `AbstractDifferential` types. +various [`AbstractDifferential`](@ref) types. -See also: [`accumulate!`](@ref), [`store!`](@ref), [`AbstractRule`](@ref) +See also: [`accumulate!`](@ref), [`store!`](@ref) """ accumulate(Δ, ∂) = Δ .+ ∂ @@ -16,8 +16,9 @@ accumulate(Δ, ∂) = Δ .+ ∂ Similar to [`accumulate`](@ref), but attempts to compute `Δ + rule(args...)` in-place, storing the result in `Δ`. -Note: this function may not actually store the result in `Δ` if `Δ` is immutable, -so it is best to always call this as `Δ = accumulate!(Δ, ∂)` just in-case. +!!! note + This function may not actually store the result in `Δ` if `Δ` is immutable, + so it is best to always call this as `Δ = accumulate!(Δ, ∂)` just in case. This function is overloadable by using a [`InplaceThunk`](@ref). See also: [`accumulate`](@ref), [`store!`](@ref). @@ -37,6 +38,6 @@ necessary for alternative approaches (e.g. `copyto!(Δ, extern(∂))`) Like [`accumulate`](@ref) and [`accumulate!`](@ref), this function is intended to be customizable for specific rules/input types. -See also: [`accumulate`](@ref), [`accumulate!`](@ref), [`AbstractRule`](@ref) +See also: [`accumulate`](@ref), [`accumulate!`](@ref) """ store!(Δ, ∂) = materialize!(Δ, broadcastable(∂)) diff --git a/src/rule_definition_tools.jl b/src/rule_definition_tools.jl index 39f9d6673..29046ecd7 100644 --- a/src/rule_definition_tools.jl +++ b/src/rule_definition_tools.jl @@ -65,9 +65,9 @@ is equivalent to: (∂f₂_∂x₁, ∂f₂_∂x₂, ...), ...) -For examples, see ChainRulesCore' `rules` directory. +For examples, see ChainRules' `rulesets` directory. -See also: [`frule`](@ref), [`rrule`](@ref), [`AbstractRule`](@ref) +See also: [`frule`](@ref), [`rrule`](@ref). """ macro scalar_rule(call, maybe_setup, partials...) call, setup_stmts, inputs, partials = _normalize_scalarrules_macro_input(