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

◆ rowwise_optional_broadcast()

template<typename T , typename = require_all_kernel_expressions_and_none_scalar_t<T>>
auto stan::math::rowwise_optional_broadcast ( T &&  a)
inline

Broadcast an expression in rowwise dimmension if the number of columns equals to 1.

In that case further expressions can use this expression as if had any number of columns, repeating the values.

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

Template Parameters
Ttype of input expression
Parameters
ainput expression
Returns
broadcast expression

Definition at line 223 of file optional_broadcast.hpp.