From 6115bdd38848e652c71dbc45c01524b0d9869698 Mon Sep 17 00:00:00 2001 From: Steve Bronder Date: Tue, 29 Jun 2021 10:53:30 -0400 Subject: [PATCH] reduces overloads for apply_scalar_binary with var matrix as one of the inputs --- stan/math/rev/functor/apply_scalar_binary.hpp | 24 ++----------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/stan/math/rev/functor/apply_scalar_binary.hpp b/stan/math/rev/functor/apply_scalar_binary.hpp index 24ab80bba9e..6cee58b64f5 100644 --- a/stan/math/rev/functor/apply_scalar_binary.hpp +++ b/stan/math/rev/functor/apply_scalar_binary.hpp @@ -46,28 +46,8 @@ inline auto apply_scalar_binary(const T1& x, const T2& y, const F& f) { * @return var_value object with result of applying functor to inputs. */ template * = nullptr, - require_std_vector_vt* = nullptr> -inline auto apply_scalar_binary(const T1& x, const T2& y, const F& f) { - check_matching_sizes("Binary function", "x", x, "y", y); - return f(x, y); -} - -/** - * Specialisation for use with a one-dimensional std::vector of integer types - * and one `var_value` (row or column). - * - * @tparam T1 Type of first argument to which functor is applied. - * @tparam T2 Type of second argument to which functor is applied. - * @tparam F Type of functor to apply. - * @param x Integer std::vector input to which operation is applied. - * @param y Eigen input to which operation is applied. - * @param f functor to apply to inputs. - * @return Eigen object with result of applying functor to inputs. - */ -template * = nullptr, - require_var_matrix_t* = nullptr> + require_any_var_matrix_t* = nullptr, + require_any_std_vector_vt* = nullptr> inline auto apply_scalar_binary(const T1& x, const T2& y, const F& f) { check_matching_sizes("Binary function", "x", x, "y", y); return f(x, y);