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

◆ to_arena() [6/6]

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

Converts given argument into a type that has any dynamic allocation on AD stack.

Std vectors are copied into another std vector with custom allocator that uses AD stack.

This overload works on vectors with simple scalars that don't need to be converthed themselves.

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

Std vectors are copied into another std vector with custom allocator that uses AD stack.

This overload works on vectors with scalars that also need conversion.

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

Definition at line 109 of file to_arena.hpp.