1 #ifndef STAN_MATH_REV_CORE_RECOVER_MEMORY_HPP 2 #define STAN_MATH_REV_CORE_RECOVER_MEMORY_HPP 20 throw std::logic_error(
21 "empty_nested() must be true" 22 " before calling recover_memory()");
static bool empty_nested()
Return true if there is no nested autodiff being executed.
std::vector< ChainableT * > var_stack_
static STAN_THREADS_DEF AutodiffStackStorage * instance_
void recover_all()
Recover all the memory used by the stack allocator.
std::vector< ChainableT * > var_nochain_stack_
static void recover_memory()
Recover memory used for all variables for reuse.
std::vector< ChainableAllocT * > var_alloc_stack_