Stan Math Library
4.9.0
Automatic Differentiation
|
var_value< plain_type_t< T > > stan::math::make_callback_var | ( | T && | value, |
F && | functor | ||
) |
Creates a new var initialized with a callback_vari with a given value and reverse-pass callback functor.
The callback functor will be passed a reference to the constructed vari.
All captured values must be trivially destructible or they will leak memory. to_arena()
function can be used to ensure that.
T | type of value |
F | type of callable |
value | value of the vari |
functor | functor or other callable to call in the reverse pass |
Definition at line 61 of file callback_vari.hpp.