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

◆ accumulate_adjoints() [3/6]

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

Accumulate adjoints from x (a std::vector of containers containing vars) 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
VecContainerthe type of a standard container holding var containers.
PargsTypes of remaining arguments
Parameters
destPointer to where adjoints are to be accumulated
xA std::vector of containers holding vars
argsFurther args to accumulate over
Returns
Final position of adjoint storage pointer

Definition at line 96 of file accumulate_adjoints.hpp.