Add isDefaultStream() accessor.

Fix code that checked for stream==nullptr after stream had been
resolved to a "true stream".


[ROCm/clr commit: b2b620c12b]
This commit is contained in:
Ben Sander committed 2017-05-26 13:46:48 -05:00
1 parent 6c3a05ac5b
commit d9587ae2f0
3 files changed
+21 -7

No files matched your search

+2 -2
View File
@@ -146,7 +146,7 @@ hipError_t hipStreamSynchronize(hipStream_t stream)
hipError_t e = hipSuccess;
if (stream == NULL) {
if (stream == hipStreamNull) {
ihipCtx_t *ctx = ihipGetTlsDefaultCtx();
ctx->locked_syncDefaultStream(true/*waitOnSelf*/, true/*syncToHost*/);
} else {
@@ -198,7 +198,7 @@ hipError_t hipStreamGetFlags(hipStream_t stream, unsigned int *flags)
if (flags == NULL) {
return ihipLogStatus(hipErrorInvalidValue);
} else if (stream == NULL) {
} else if (stream == hipStreamNull) {
return ihipLogStatus(hipErrorInvalidResourceHandle);
} else {
*flags = stream->_flags;