Skip to content

Commit

Permalink
Fixing bug in sparse matrix buffer estimation
Browse files Browse the repository at this point in the history
  • Loading branch information
eldakms committed Aug 12, 2016
1 parent 59fd877 commit 66e4534
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/Math/GPUSparseMatrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,9 @@ class MATH_API GPUSparseMatrix : public BaseMatrix<ElemType>
else if (format == matrixFormatSparseBlockRow)
return (bufferSize - 2 * sizeof(GPUSPARSE_INDEX_TYPE) * numRows) / sizeof(ElemType);
else if (format == matrixFormatSparseCSC)
return (bufferSize - sizeof(GPUSPARSE_INDEX_TYPE) * (numCols + 1)) / (2 * sizeof(ElemType));
return (bufferSize - sizeof(GPUSPARSE_INDEX_TYPE) * (numCols + 1)) / (sizeof(GPUSPARSE_INDEX_TYPE) + sizeof(ElemType));
else if (format == matrixFormatSparseCSR)
return (bufferSize - sizeof(GPUSPARSE_INDEX_TYPE) * (numRows + 1)) / (2 * sizeof(ElemType));
return (bufferSize - sizeof(GPUSPARSE_INDEX_TYPE) * (numRows + 1)) / (sizeof(GPUSPARSE_INDEX_TYPE) + sizeof(ElemType));
else
NOT_IMPLEMENTED;
}
Expand Down

0 comments on commit 66e4534

Please sign in to comment.