1 #ifndef STAN_MATH_REV_CORE_CHAINABLE_HPP
2 #define STAN_MATH_REV_CORE_CHAINABLE_HPP
61 static inline void*
operator new(
size_t nbytes) {
75 static inline void operator delete(
void* ) {
chainable()
Construct a chainable object.
Abstract base class for variable implementations that handles memory management and applying the chai...
static stack_alloc memalloc_
virtual void set_zero_adjoint()
Set the value of the adjoint for this chainable to its initial value.
virtual void init_dependent()
Initialize this chainable's adjoint value to make it the dependent variable in a gradient calculation...
virtual ~chainable()
Chainables are not destructible and should go on the function call stack or be allocated with operato...
void * alloc(size_t len)
Return a newly allocated block of memory of the appropriate size managed by the stack allocator...
virtual void chain()
Apply the chain rule to this variable based on the variables on which it depends. ...