1 #ifndef STAN_MATH_REV_CORE_SET_ZERO_ALL_ADJOINTS_NESTED_HPP 2 #define STAN_MATH_REV_CORE_SET_ZERO_ALL_ADJOINTS_NESTED_HPP 19 throw std::logic_error(
20 "empty_nested() must be false before calling" 21 " set_zero_all_adjoints_nested()");
24 for (
size_t i = (start1 == 0U) ? 0U : (start1 - 1);
30 for (
size_t i = (start2 == 0U) ? 0U : (start2 - 1);
static bool empty_nested()
Return true if there is no nested autodiff being executed.
std::vector< size_t > nested_var_nochain_stack_sizes_
static void set_zero_all_adjoints_nested()
Reset all adjoint values in the top nested portion of the stack to zero.
std::vector< ChainableT * > var_stack_
std::vector< size_t > nested_var_stack_sizes_
static STAN_THREADS_DEF AutodiffStackStorage * instance_
std::vector< ChainableT * > var_nochain_stack_