1#ifndef STAN_MATH_REV_CORE_GRAD_HPP
2#define STAN_MATH_REV_CORE_GRAD_HPP
29 for (
size_t i = end; i-- > beginning;) {
50template <
typename Vari>
51static void grad(Vari* vi) {
static bool empty_nested()
Return true if there is no nested autodiff being executed.
static size_t nested_size()
static void grad()
Compute the gradient for all variables starting from the end of the AD tape.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
std::vector< ChainableT * > var_stack_
static thread_local AutodiffStackStorage * instance_