1#ifndef STAN_MATH_REV_FUNCTOR_APPLY_SCALAR_BINARY_HPP
2#define STAN_MATH_REV_FUNCTOR_APPLY_SCALAR_BINARY_HPP
28template <
typename F,
typename T1,
typename T2,
29 require_any_var_matrix_t<T1, T2>* =
nullptr,
30 require_all_matrix_t<T1, T2>* =
nullptr>
33 return std::forward<F>(f)(std::forward<T1>(x), std::forward<T2>(y));
48template <
typename F,
typename T1,
typename T2,
49 require_any_var_matrix_t<T1, T2>* =
nullptr,
50 require_any_std_vector_vt<std::is_integral, T1, T2>* =
nullptr>
53 return std::forward<F>(f)(std::forward<T1>(x), std::forward<T2>(y));
70template <
typename F,
typename T1,
typename T2,
71 require_any_std_vector_vt<is_std_vector, T1, T2>* =
nullptr,
72 require_any_std_vector_st<std::is_integral, T1, T2>* =
nullptr,
73 require_any_var_matrix_t<T1, T2>* =
nullptr>
75 return std::forward<F>(f)(std::forward<T1>(x), std::forward<T2>(y));
93template <
typename F,
typename T1,
typename T2,
94 require_any_stan_scalar_t<T1, T2>* =
nullptr,
95 require_any_var_matrix_t<T1, T2>* =
nullptr>
97 return std::forward<F>(f)(std::forward<T1>(x), std::forward<T2>(y));
auto apply_scalar_binary(F &&f, T1 &&x, T2 &&y)
Base template function for vectorization of binary scalar functions defined by applying a functor to ...
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.
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.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...