Skip to content

Commit cf2b72d

Browse files
committed
fixed size zero multiply
1 parent d9284e8 commit cf2b72d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

stan/math/prim/fun/multiply.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ template <typename Mat1, typename Mat2,
9292
typename = require_not_eigen_row_and_col_t<Mat1, Mat2>>
9393
inline auto multiply(const Mat1& m1, const Mat2& m2)
9494
-> decltype((m1 * m2).eval()) {
95-
check_multiplicable("multiply", "m1", m1, "m2", m2);
95+
check_size_match("multiply", "Columns of m1", m1.cols(), "Rows of m2",
96+
m2.rows());
9697
#ifdef STAN_OPENCL
9798
if (m1.rows() * m1.cols() * m2.cols()
9899
> opencl_context.tuning_opts().multiply_dim_prod_worth_transfer) {

0 commit comments

Comments
 (0)