1#ifndef STAN_MATH_REV_CORE_AUTODIFFSTACKSTORAGE_HPP
2#define STAN_MATH_REV_CORE_AUTODIFFSTACKSTORAGE_HPP
18#define STAN_THREADS_DEF __thread
20#define STAN_THREADS_DEF thread_local
24#define STAN_THREADS_DEF
88template <
typename ChainableT,
typename ChainableAllocT>
123 if (!is_initialized) {
124 is_initialized =
true;
129 is_initialized =
true;
139template <
typename ChainableT,
typename ChainableAllocT>
142 ChainableAllocT>::AutodiffStackStorage
An instance of this class provides a memory pool through which blocks of raw memory may be allocated ...
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
std::vector< ChainableAllocT * > var_alloc_stack_
std::vector< size_t > nested_var_alloc_stack_starts_
std::vector< ChainableT * > var_stack_
std::vector< ChainableT * > var_nochain_stack_
std::vector< size_t > nested_var_nochain_stack_sizes_
std::vector< size_t > nested_var_stack_sizes_
AutodiffStackStorage & operator=(const AutodiffStackStorage &)=delete
AutodiffStackSingleton(AutodiffStackSingleton_t const &)=delete
~AutodiffStackSingleton()
AutodiffStackSingleton & operator=(const AutodiffStackSingleton_t &)=delete
static thread_local AutodiffStackStorage * instance_
This struct always provides access to the autodiff stack using the singleton pattern.