1 #ifndef STAN_MATH_REV_CORE_GRAD_HPP
2 #define STAN_MATH_REV_CORE_GRAD_HPP
38 typedef std::vector<chainable*>::reverse_iterator it_t;
43 for (it_t it = begin; it < end; ++it) {
static bool empty_nested()
Return true if there is no nested autodiff being executed.
Abstract base class for variable implementations that handles memory management and applying the chai...
static void grad(chainable *vi)
Compute the gradient for all variables starting from the specified root variable implementation.
virtual void init_dependent()
Initialize this chainable's adjoint value to make it the dependent variable in a gradient calculation...
static size_t nested_size()
static std::vector< ChainableT * > var_stack_