1#ifndef STAN_MATH_OPENCL_PRIM_GP_DOT_PROD_COV_HPP
2#define STAN_MATH_OPENCL_PRIM_GP_DOT_PROD_COV_HPP
24template <
typename T_x,
typename T_sigma,
25 require_all_prim_or_rev_kernel_expression_t<T_x>* =
nullptr,
26 require_stan_scalar_t<T_sigma>* =
nullptr>
28 const char* fun =
"gp_dot_prod_cov(OpenCL)";
32 check_cl(fun,
"x", x_val,
"not NaN") = !isnan(x_val);
48template <
typename T_x,
typename T_y,
typename T_sigma,
52 const char* fun =
"gp_dot_prod_cov(OpenCL)";
57 check_cl(fun,
"x", x_val,
"not NaN") = !isnan(x_val);
58 check_cl(fun,
"y", y_val,
"not NaN") = !isnan(y_val);
auto check_cl(const char *function, const char *var_name, T &&y, const char *must_be)
Constructs a check on opencl matrix or expression.
addition_< as_operation_cl_t< T_a >, as_operation_cl_t< T_b > > add(T_a &&a, T_b &&b)
auto transpose(Arg &&a)
Transposes a kernel generator expression.
auto gp_dot_prod_cov(const T_x &x, const T_sigma sigma)
Dot product kernel on the GPU.
require_all_t< is_prim_or_rev_kernel_expression< std::decay_t< Types > >... > require_all_prim_or_rev_kernel_expression_t
Require type satisfies is_prim_or_rev_kernel_expression.
require_t< is_stan_scalar< std::decay_t< T > > > require_stan_scalar_t
Require type satisfies is_stan_scalar.
void check_nonnegative(const char *function, const char *name, const T_y &y)
Check if y is non-negative.
T value_of(const fvar< T > &v)
Return the value of the specified variable.
void check_finite(const char *function, const char *name, const T_y &y)
Return true if all values in y are finite.
fvar< T > square(const fvar< T > &x)
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...