Add isDefaultStream() accessor.

Fix code that checked for stream==nullptr after stream had been
resolved to a "true stream".
This commit is contained in:
Ben Sander
2017-05-25 10:37:03 -05:00
rodzic 1dce01f9bb
commit b251d72917
3 zmienionych plików z 21 dodań i 7 usunięć
+2 -2
Wyświetl plik
@@ -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;