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

◆ to_arena() [2/6]

template<typename T , require_not_same_t< T, arena_t< T > > * = nullptr, require_not_container_t< T > * = nullptr, require_not_matrix_cl_t< T > * = nullptr>
arena_t< T > stan::math::to_arena ( 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.

This overload is used for kernel generator expressions. It also handles any other types that do not have a special overload for them.

Template Parameters
Ttype of scalar
Parameters
aargument
Returns
argument

Definition at line 28 of file to_arena.hpp.