Skip to content
Merged
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
7 changes: 2 additions & 5 deletions include/dca/linalg/util/memory.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ struct Memory<GPU> {
}




// Do nothing for non arithmetic types.
template <typename ScalarType>
Expand All @@ -123,10 +123,7 @@ struct Memory<GPU> {
template <typename ScalarType>
static void setToZero(ScalarType* ptr, size_t size, const GpuStream& stream) {
checkRC(cudaMemsetAsync(ptr, 0, size * sizeof(ScalarType), stream));
cudaEvent_t zero_event;
checkRC(cudaEventCreateWithFlags(&zero_event, cudaEventBlockingSync));
checkRC(cudaEventRecord(zero_event, stream));
checkRC(cudaEventSynchronize(zero_event));
checkRC(cudaStreamSynchronize(stream));
}
};
#endif // DCA_HAVE_GPU
Expand Down
Loading