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
7
8namespace stan {
9namespace math {
10
24inline 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
static void grad()
Compute the gradient for all variables starting from the end of the AD tape.
Definition grad.hpp:26
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...