From 840a508698d409f37a65cef6733d00aa675d4a7d Mon Sep 17 00:00:00 2001 From: Denis Demidov Date: Thu, 4 May 2017 10:46:55 +0300 Subject: [PATCH] Fix a bug in matrix-matrix product The bug resulted in incorrectly set number of columns in the resulting matrix. This only had effect on vexcl backends with multiple GPUs. --- amgcl/detail/spgemm.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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;