1 #ifndef STAN_MATH_REV_CORE_GRAD_HPP 2 #define STAN_MATH_REV_CORE_GRAD_HPP 38 typedef std::vector<vari*>::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.
The variable implementation base class.
static void grad(vari *vi)
Compute the gradient for all variables starting from the specified root variable implementation.
static size_t nested_size()
void init_dependent()
Initialize the adjoint for this (dependent) variable to 1.
static std::vector< ChainableT * > var_stack_