Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
More comments
Browse files Browse the repository at this point in the history
  • Loading branch information
reminisce committed Jul 24, 2017
1 parent af20cd8 commit e59e125
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/ndarray/ndarray.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1131,6 +1131,12 @@ void NDArray::SyncCopyFromNDArray(const NDArray& src, int i, int j) {
}
// The copy operation was pushed to engine to execute.
// Need to wait here for it being completed.
// The reason for pushing the copy operation to engine
// is because when copying data from a sparse tensor
// to the current one, that sparse ndarray's storage_shape/aux_shape
// may not be ready or changed and we need to ensure
// thread safty for reading the correct shape info to allocate
// memory for the current ndarray.
WaitToRead();
}

Expand Down

0 comments on commit e59e125

Please sign in to comment.