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

◆ to_ref_if() [2/2]

template<bool Cond, typename T , std::enable_if_t< Cond > * = nullptr>
ref_type_t< T && > stan::math::to_ref_if ( T &&  a)
inline

If the condition is true, evaluates expensive Eigen expressions.

If given expression involves no calculations this is a no-op that should be optimized away.

Template Parameters
Condcondition
Targument type (Eigen expression)
Parameters
aargument
Returns
argument converted to Eigen::Ref

Definition at line 43 of file to_ref.hpp.