diff --git a/amgcl/detail/spgemm.hpp b/amgcl/detail/spgemm.hpp index c6b76535..832d346c 100644 --- a/amgcl/detail/spgemm.hpp +++ b/amgcl/detail/spgemm.hpp @@ -66,7 +66,7 @@ void spgemm_saad(const AMatrix &A, const BMatrix &B, CMatrix &C, bool sort = tru typedef typename backend::value_type::type Val; typedef ptrdiff_t Idx; - C.set_size(A.nrows, B.nrows); + C.set_size(A.nrows, B.ncols); C.ptr[0] = 0; #pragma omp parallel @@ -450,7 +450,7 @@ void spgemm_rmerge(const AMatrix &A, const BMatrix &B, CMatrix &C) { tmp_val[i].resize(2 * max_row_width); } - C.set_size(A.nrows, B.nrows); + C.set_size(A.nrows, B.ncols); C.ptr[0] = 0;