Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/cudamatrix/cu-packed-matrix.cc
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ void CuPackedMatrix<Real>::Swap(PackedMatrix<Real> *mat) {
this->Swap(&temp); // now temp is full, *this is empty.
mat->Swap(&temp); // now mat has data from *this, temp has
// data from mat.
this->Swap(mat); // copy data in mat to *this, which is now empty.
this->Swap(&temp); // copy data in mat to *this, which is now empty.
} else { // *this is full but *mat is empty.
mat->Resize(this->num_rows_, kUndefined);
this->CopyToPacked(mat);
Expand Down
4 changes: 2 additions & 2 deletions src/cudamatrix/cu-vector.cc
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ void CuVectorBase<Real>::ApplyCeiling(Real ceiling_val, MatrixIndexT *ceiled_cou
// vector as a matrix with a single row.
::MatrixDim dim = {1, Dim(), 1};
cuda_apply_ceiling(dimGrid, dimBlock, data_, ceiling_val, dim);

CuDevice::Instantiate().AccuProfile("CuVectorBase::ApplyCeilingNoCount", tim);
} else {
if (dim_ == 0) { *ceiled_count = 0; return; }
Expand Down Expand Up @@ -991,7 +991,7 @@ void CuVector<Real>::Swap(Vector<Real> *vec) {
this->Swap(&temp); // now temp is full, *this is empty.
vec->Swap(&temp); // now vec has data from *this, temp has
// data from vec.
Swap(vec); // copy data in vec to *this, which is now empty.
Swap(&temp); // copy data in vec to *this, which is now empty.
} else { // *this is full but *vec is empty.
vec->Resize(this->dim_, kUndefined);
this->CopyToVec(vec);
Expand Down