Automatic Differentiation
 
Loading...
Searching...
No Matches
accumulate_adjoints.hpp File Reference
#include <stan/math/prim/meta.hpp>
#include <stan/math/rev/meta.hpp>
#include <stan/math/rev/core/var.hpp>
#include <utility>
#include <vector>

Go to the source code of this file.

Namespaces

namespace  stan
 The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation from C or the boost::math::lgamma implementation.
 
namespace  stan::math
 Matrices and templated mathematical functions.
 

Functions

template<typename... Pargs>
double * stan::math::accumulate_adjoints (double *dest, const var &x, Pargs &&... args)
 Accumulate adjoints from 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<typename VarVec , require_std_vector_vt< is_var, VarVec > * = nullptr, typename... Pargs>
double * stan::math::accumulate_adjoints (double *dest, VarVec &&x, Pargs &&... args)
 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<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)
 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<typename EigT , require_eigen_vt< is_var, EigT > * = nullptr, typename... Pargs>
double * stan::math::accumulate_adjoints (double *dest, EigT &&x, Pargs &&... args)
 Accumulate adjoints from x (an Eigen type 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<typename Arith , require_st_arithmetic< Arith > * = nullptr, typename... Pargs>
double * stan::math::accumulate_adjoints (double *dest, Arith &&x, Pargs &&... args)
 Ignore arithmetic types.
 
double * stan::math::accumulate_adjoints (double *dest)
 End accumulate_adjoints recursion and return pointer.