Stan Math Library
4.9.0
Automatic Differentiation
Loading...
Searching...
No Matches
grad.hpp
Go to the documentation of this file.
1
#ifndef STAN_MATH_REV_FUN_GRAD_HPP
2
#define STAN_MATH_REV_FUN_GRAD_HPP
3
4
#include <
stan/math/rev/meta.hpp
>
5
#include <
stan/math/rev/core.hpp
>
6
#include <
stan/math/prim/fun/Eigen.hpp
>
7
8
namespace
stan
{
9
namespace
math {
10
24
inline
void
grad
(
var
& v, Eigen::Matrix<var, Eigen::Dynamic, 1>& x,
25
Eigen::VectorXd& g) {
26
grad
(v.vi_);
27
g = x.adj();
28
}
29
30
}
// namespace math
31
}
// namespace stan
32
#endif
Eigen.hpp
stan::math::var_value< double >
stan::math::grad
static void grad()
Compute the gradient for all variables starting from the end of the AD tape.
Definition
grad.hpp:26
stan
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
Definition
unit_vector_constrain.hpp:15
core.hpp
meta.hpp
stan
math
rev
fun
grad.hpp
[
Stan Home Page
]
© 2011–2019, Stan Development Team.