Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ grad() [2/5]

static void stan::math::grad ( )
inlinestatic

Compute the gradient for all variables starting from the end of the AD tape.

This function does not recover memory. The chain rule is applied working down the stack from the last vari created on the AD tape and then calling each vari's chain() method in turn.

This function computes a nested gradient only going back as far as the last nesting.

This function does not recover any memory from the computation.

Definition at line 26 of file grad.hpp.