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