Stream thread-safe checkpoint.

Moving data structures to critical / protected section.
This commit is contained in:
Ben Sander
2016-03-28 09:46:40 -05:00
parent 3aed9d3b19
commit 3f18bab2c7
5 changed files with 171 additions and 129 deletions
+2 -5
View File
@@ -307,17 +307,14 @@ hipError_t hipMemcpy(void* dst, const void* src, size_t sizeBytes, hipMemcpyKind
hipError_t e = hipSuccess;
try {
stream->copySync(dst, src, sizeBytes, kind);
stream->locked_copySync(dst, src, sizeBytes, kind);
}
catch (ihipException ex) {
e = ex._code;
}
if (HIP_LAUNCH_BLOCKING) {
tprintf(DB_SYNC, "LAUNCH_BLOCKING for completion of hipMemcpy\n");
stream->wait();
}
return ihipLogStatus(e);
}