Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ grad() [1/5]

void stan::math::grad ( var v,
var_value< matrix_cl< double > > &  x,
Eigen::VectorXd &  g 
)
inline

Propagate chain rule to calculate gradients starting from the specified variable.

Resizes the input vector to be the correct size.

The grad() function does not itself recover any memory. use recover_memory() or recover_memory_nested() to recover memory.

Parameters
[in]vValue of function being differentiated
[in]xVariables being differentiated with respect to
[out]gGradient, d/dx v, evaluated at x.

Definition at line 22 of file grad.hpp.