Skip to content

Commit

Permalink
Fix a bug in matrix-matrix product
Browse files Browse the repository at this point in the history
The bug resulted in incorrectly set number of columns in the resulting
matrix. This only had effect on vexcl backends with multiple GPUs.
  • Loading branch information
ddemidov committed May 4, 2017
1 parent e3b8e8c commit 840a508
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions amgcl/detail/spgemm.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ void spgemm_saad(const AMatrix &A, const BMatrix &B, CMatrix &C, bool sort = tru
typedef typename backend::value_type<CMatrix>::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
Expand Down Expand Up @@ -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;


Expand Down

0 comments on commit 840a508

Please sign in to comment.