Stan Math Library
4.9.0
Automatic Differentiation
Loading...
Searching...
No Matches
nested_size.hpp
Go to the documentation of this file.
1
#ifndef STAN_MATH_REV_CORE_NESTED_SIZE_HPP
2
#define STAN_MATH_REV_CORE_NESTED_SIZE_HPP
3
4
#include <
stan/math/rev/core/chainablestack.hpp
>
5
#include <cstdlib>
6
7
namespace
stan
{
8
namespace
math {
9
10
static
inline
size_t
nested_size
() {
11
return
ChainableStack::instance_
->
var_stack_
.size()
12
-
ChainableStack::instance_
->
nested_var_stack_sizes_
.back();
13
}
14
15
}
// namespace math
16
}
// namespace stan
17
#endif
chainablestack.hpp
stan::math::nested_size
static size_t nested_size()
Definition
nested_size.hpp:10
stan
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
Definition
unit_vector_constrain.hpp:15
stan::math::AutodiffStackSingleton::AutodiffStackStorage::var_stack_
std::vector< ChainableT * > var_stack_
Definition
autodiffstackstorage.hpp:104
stan::math::AutodiffStackSingleton::AutodiffStackStorage::nested_var_stack_sizes_
std::vector< size_t > nested_var_stack_sizes_
Definition
autodiffstackstorage.hpp:110
stan::math::AutodiffStackSingleton::instance_
static thread_local AutodiffStackStorage * instance_
Definition
autodiffstackstorage.hpp:118
stan
math
rev
core
nested_size.hpp
[
Stan Home Page
]
© 2011–2019, Stan Development Team.