Fixed bug where the dense matrix was not passed by reference
This commit is contained in:
Родитель
adf48a8eb7
Коммит
4b253744f2
|
@ -392,7 +392,7 @@ CPUSparseMatrix<ElemType> CPUSparseMatrix<ElemType>::ColumnSlice(size_t startCol
|
|||
}
|
||||
|
||||
template <class ElemType>
|
||||
void CPUSparseMatrix<ElemType>::AssignColumnSliceToDense(CPUMatrix<ElemType> slice, size_t startColumn, size_t numCols) const
|
||||
void CPUSparseMatrix<ElemType>::AssignColumnSliceToDense(CPUMatrix<ElemType>& slice, size_t startColumn, size_t numCols) const
|
||||
{
|
||||
if (startColumn + numCols > m_numCols)
|
||||
InvalidArgument("The slice (%d+%d) is out of range of the source matrix (%d).", (int) startColumn, (int) numCols, (int) m_numCols);
|
||||
|
|
|
@ -98,7 +98,7 @@ public:
|
|||
|
||||
CPUSparseMatrix<ElemType> ColumnSlice(size_t startColumn, size_t numCols) const;
|
||||
CPUMatrix<ElemType> CopyColumnSliceToDense(size_t startColumn, size_t numCols) const;
|
||||
void AssignColumnSliceToDense(CPUMatrix<ElemType> slice, size_t startColumn, size_t numCols) const;
|
||||
void AssignColumnSliceToDense(CPUMatrix<ElemType>& slice, size_t startColumn, size_t numCols) const;
|
||||
|
||||
CPUMatrix<ElemType> DiagonalToDense() const;
|
||||
|
||||
|
|
|
@ -2168,7 +2168,7 @@ GPUSparseMatrix<ElemType> GPUSparseMatrix<ElemType>::ColumnSlice(size_t startCol
|
|||
|
||||
|
||||
template <class ElemType>
|
||||
void GPUSparseMatrix<ElemType>::AssignColumnSliceToDense(GPUMatrix<ElemType> slice, size_t startColumn, size_t numCols) const
|
||||
void GPUSparseMatrix<ElemType>::AssignColumnSliceToDense(GPUMatrix<ElemType>& slice, size_t startColumn, size_t numCols) const
|
||||
{
|
||||
int m = (int) GetNumRows();
|
||||
int n = (int) GetNumCols();
|
||||
|
|
|
@ -306,7 +306,7 @@ public:
|
|||
|
||||
GPUSparseMatrix<ElemType> ColumnSlice(size_t startColumn, size_t numCols) const;
|
||||
GPUMatrix<ElemType> CopyColumnSliceToDense(size_t startColumn, size_t numCols) const;
|
||||
void AssignColumnSliceToDense(GPUMatrix<ElemType> slice, size_t startColumn, size_t numCols) const;
|
||||
void AssignColumnSliceToDense(GPUMatrix<ElemType>& slice, size_t startColumn, size_t numCols) const;
|
||||
|
||||
GPUMatrix<ElemType> DiagonalToDense() const;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче