1#ifndef STAN_MATH_PRIM_FUN_ELT_DIVIDE_HPP
2#define STAN_MATH_PRIM_FUN_ELT_DIVIDE_HPP
22template <
typename Mat1,
typename Mat2,
23 require_all_eigen_t<Mat1, Mat2>* =
nullptr,
24 require_all_not_st_var<Mat1, Mat2>* =
nullptr>
27 return (m1.array() / m2.array()).matrix();
41template <
typename Mat,
typename Scal, require_matrix_t<Mat>* =
nullptr,
42 require_stan_scalar_t<Scal>* =
nullptr>
58template <
typename Scal,
typename Mat, require_stan_scalar_t<Scal>* =
nullptr,
59 require_eigen_t<Mat>* =
nullptr>
61 return (s / m.array()).matrix();
64template <
typename Scal1,
typename Scal2,
elt_divide_< as_operation_cl_t< T_a >, as_operation_cl_t< T_b > > elt_divide(T_a &&a, T_b &&b)
auto divide(T_a &&a, double d)
Returns the elementwise division of the kernel generator expression.
require_all_t< is_stan_scalar< std::decay_t< Types > >... > require_all_stan_scalar_t
Require all of the types satisfy is_stan_scalar.
void check_matching_dims(const char *function, const char *name1, const T1 &y1, const char *name2, const T2 &y2)
Check if the two containers have the same dimensions.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...