1#ifndef STAN_MATH_REV_FUNCTOR_REVERSE_PASS_CALLBACK_HPP
2#define STAN_MATH_REV_FUNCTOR_REVERSE_PASS_CALLBACK_HPP
Abstract base class that all vari_value and it's derived classes inherit.
void reverse_pass_callback(F &&functor)
Puts a callback on the autodiff stack to be called in reverse pass.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
std::vector< ChainableT * > var_stack_
static thread_local AutodiffStackStorage * instance_
void set_zero_adjoint() final
reverse_pass_callback_vari(F &&rev_functor)
void chain() final
Apply the chain rule to this variable based on the variables on which it depends.