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

◆ colwise_prod()

template<typename T , require_all_kernel_expressions_t< T > * = nullptr>
auto stan::math::colwise_prod ( T &&  a)
inline

Column wise product - reduction of a kernel generator expression.

So as to be efficient column wise reductions are only done partially. That means instead of 1 row kernel output will have a few rows that need to be reduced to obtain the final result (actually it is 1 result per work group run - roughly 16 times the number of compute units on the OpenCL device). This can be done in a separate kernel or after copying to CPU. Also column wise reductions can not be used as arguments to other operations - they can only be evaluated.

Template Parameters
Ttype of input expression
Parameters
athe expression to reduce
Returns
prod

Definition at line 268 of file colwise_reduction.hpp.