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

◆ broadcast()

template<bool Colwise, bool Rowwise, typename T , typename = require_all_kernel_expressions_and_none_scalar_t<T>>
auto stan::math::broadcast ( T &&  a)
inline

Broadcast an expression in specified dimension(s).

If broadcasting rowwise, the argument must have a single column. If broadcasting colwise, the argument must have a single row. Further expressions can use this expression as if it had any size in broadcasted dimension, repeating the values.

Broadcasting evaluates the argument expression 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 125 of file broadcast.hpp.