| Stan Math Library 2.6.3 probability, sampling & optimization

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros
start_nested.hpp
Go to the documentation of this file.
1 #ifndef STAN_MATH_REV_CORE_START_NESTED_HPP
2 #define STAN_MATH_REV_CORE_START_NESTED_HPP
3
4 #include <stan/math/rev/core/chainablestack.hpp>
5
6 namespace stan {
7 namespace math {
8
13 static inline void start_nested() {
14 ChainableStack::nested_var_stack_sizes_
15 .push_back(ChainableStack::var_stack_.size());
16 ChainableStack::nested_var_nochain_stack_sizes_
17 .push_back(ChainableStack::var_nochain_stack_.size());
18 ChainableStack::nested_var_alloc_stack_starts_
19 .push_back(ChainableStack::var_alloc_stack_.size());
20 ChainableStack::memalloc_.start_nested();
21 }
22
23 }
24 }
25 #endif
stan::math::AutodiffStackStorage::memalloc_
static stack_alloc memalloc_
Definition: autodiffstackstorage.hpp:16
stan::math::AutodiffStackStorage::var_alloc_stack_
static std::vector< ChainableAllocT * > var_alloc_stack_
Definition: autodiffstackstorage.hpp:15
stan::math::AutodiffStackStorage::var_nochain_stack_
static std::vector< ChainableT * > var_nochain_stack_
Definition: autodiffstackstorage.hpp:14
stan::math::AutodiffStackStorage::nested_var_nochain_stack_sizes_
static std::vector< size_t > nested_var_nochain_stack_sizes_
Definition: autodiffstackstorage.hpp:20
stan::math::AutodiffStackStorage::nested_var_stack_sizes_
static std::vector< size_t > nested_var_stack_sizes_
Definition: autodiffstackstorage.hpp:19
stan::math::size
int size(const std::vector< T > &x)
Definition: size.hpp:11
stan::math::stack_alloc::start_nested
void start_nested()
Store current positions before doing nested operation so can recover back to start.
Definition: stack_alloc.hpp:211
chainablestack.hpp
stan::math::AutodiffStackStorage::var_stack_
static std::vector< ChainableT * > var_stack_
Definition: autodiffstackstorage.hpp:13
stan::math::start_nested
static void start_nested()
Record the current position so that recover_memory_nested() can find it.
Definition: start_nested.hpp:13
stan::math::AutodiffStackStorage::nested_var_alloc_stack_starts_
static std::vector< size_t > nested_var_alloc_stack_starts_
Definition: autodiffstackstorage.hpp:21

[ Stan Home Page ] © 2011–2015, Stan Development Team.