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

◆ to_arena() [4/6]

template<typename T , require_eigen_t< T > * = nullptr, require_not_same_t< T, arena_t< T > > * = nullptr>
arena_t< T > stan::math::to_arena ( const T &  a)
inline

Converts given argument into a type that either has any dynamic allocation on AD stack or schedules its destructor to be called when AD stack memory is recovered.

Converts eigen types to arena_matrix.

Template Parameters
Ttype of argument
Parameters
aargument
Returns
argument copied/evaluated on AD stack

Definition at line 67 of file to_arena.hpp.