Function autodiff
const fn autodiff<F, G, T: crate::marker::Tuple, R>(f: F, df: G, args: T) -> R
Generates the LLVM body for the automatic differentiation of f using Enzyme,
with df as the derivative function and args as its arguments.
Used internally as the body of df when expanding the #[autodiff_forward]
and #[autodiff_reverse] attribute macros.
Type Parameters:
F: The original function to differentiate. Must be a function item.G: The derivative function. Must be a function item.T: A tuple of arguments passed todf.R: The return type of the derivative function.
This shows where the autodiff intrinsic is used during macro expansion:
expands to: