1#ifndef STAN_MATH_PRIM_FUN_ELT_MULTIPLY_HPP
2#define STAN_MATH_PRIM_FUN_ELT_MULTIPLY_HPP
24template <
typename Mat1,
typename Mat2,
25 require_all_eigen_t<Mat1, Mat2>* =
nullptr,
26 require_all_not_st_var<Mat1, Mat2>* =
nullptr>
28 decltype(
auto) m1_ref =
to_ref(std::forward<Mat1>(m1));
29 decltype(
auto) m2_ref =
to_ref(std::forward<Mat2>(m2));
32 [](
auto&& m1_,
auto&& m2_) {
return m1_.cwiseProduct(m2_); },
33 std::forward<decltype(m1_ref)>(m1_ref),
34 std::forward<decltype(m2_ref)>(m2_ref));
48template <
typename Scalar1,
typename Scalar2,
66template <
typename T1,
typename T2, require_any_matrix_t<T1, T2>* =
nullptr,
67 require_any_stan_scalar_t<T1, T2>* =
nullptr>
69 return multiply(std::forward<T1>(A), std::forward<T2>(B));
elt_multiply_< as_operation_cl_t< T_a >, as_operation_cl_t< T_b > > elt_multiply(T_a &&a, T_b &&b)
require_all_t< is_stan_scalar< std::decay_t< Types > >... > require_all_stan_scalar_t
Require all of the types satisfy is_stan_scalar.
auto multiply(Mat1 &&m1, Mat2 &&m2)
Return the product of the specified matrices.
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.
auto make_holder(F &&func, Args &&... args)
Calls given function with given arguments.
ref_type_t< T && > to_ref(T &&a)
This evaluates expensive Eigen expressions.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...