1#ifndef STAN_MATH_OPENCL_PRIM_COLUMNS_DOT_PRODUCT_HPP
2#define STAN_MATH_OPENCL_PRIM_COLUMNS_DOT_PRODUCT_HPP
25template <
typename T_a,
typename T_b,
26 require_all_kernel_expressions_and_none_scalar_t<T_a, T_b>* =
nullptr>
33 res =
constant(res_scal(0), 1, a.cols());
38 while (res.
rows() > 1) {
Represents an arithmetic matrix on the OpenCL device.
elt_multiply_< as_operation_cl_t< T_a >, as_operation_cl_t< T_b > > elt_multiply(T_a &&a, T_b &&b)
auto constant(const T a, int rows, int cols)
Matrix of repeated values in kernel generator expressions.
auto colwise_sum(T &&a)
Column wise sum - reduction of a kernel generator expression.
typename value_type< T >::type value_type_t
Helper function for accessing underlying type.
bool size_zero(const T &x)
Returns 1 if input is of length 0, returns 0 otherwise.
void check_matching_sizes(const char *function, const char *name1, const T_y1 &y1, const char *name2, const T_y2 &y2)
Check if two structures at the same size.
auto columns_dot_product(const T_a &a, const T_b &b)
Returns the dot product of columns of the specified matrices.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...