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

◆ optional_broadcast()

template<bool Colwise, bool Rowwise, typename T , typename = require_all_kernel_expressions_and_none_scalar_t<T>>
optional_broadcast_< as_operation_cl_t< T >, Colwise, Rowwise > stan::math::optional_broadcast ( T &&  a)
inline

Broadcast an expression in specified dimension(s) if the size along that dimension equals 1.

In that case further expressions can use this expression as if it had any size in the broadcast dimension, repeating the values.

Broadcasting evaluates the expression argument multiple times. For performance reasons don't broadcast slow operations. Instead evaluate them in a separate kernel.

Template Parameters
Colwisewhether to broadcast colwise
Rowwisewhether to broadcast rowwise
Ttype of input expression
Parameters
ainput expression
Returns
broadcast expression

Definition at line 203 of file optional_broadcast.hpp.