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

◆ accumulate_adjoints() [2/6]

template<typename VarVec , require_std_vector_vt< is_var, VarVec > * = nullptr, typename... Pargs>
double * stan::math::accumulate_adjoints ( double *  dest,
VarVec &&  x,
Pargs &&...  args 
)
inline

Accumulate adjoints from std::vector x into storage pointed to by dest, increment the adjoint storage pointer, recursively accumulate the adjoints of the rest of the arguments, and return final position of storage pointer.

Template Parameters
PargsTypes of remaining arguments
Parameters
destPointer to where adjoints are to be accumulated
xA std::vector of vars
argsFurther args to accumulate over
Returns
Final position of adjoint storage pointer

Definition at line 71 of file accumulate_adjoints.hpp.