Change-Id: Ib0813b1065feba4fe9ae861d24cfc6f9c5f580be
Этот коммит содержится в:
Ben Sander
2016-09-04 07:00:59 -05:00
родитель 48b1f7a6ea
Коммит 4e994a3025
7 изменённых файлов: 102 добавлений и 30 удалений
+21
Просмотреть файл
@@ -115,6 +115,27 @@ hipError_t hipStreamWaitEvent(hipStream_t stream, hipEvent_t event, unsigned int
};
//---
hipError_t hipStreamQuery(hipStream_t stream)
{
HIP_INIT_API(stream);
// Use default stream if 0 specified:
if (stream == hipStreamNull) {
ihipCtx_t *device = ihipGetTlsDefaultCtx();
stream = device->_defaultStream;
}
LockedAccessor_StreamCrit_t crit(stream->_criticalData);
int pendingOps = crit->_av.get_pending_async_ops();
hipError_t e = (pendingOps > 0) ? hipErrorNotReady : hipSuccess;
return ihipLogStatus(e);
}
//---
hipError_t hipStreamSynchronize(hipStream_t stream)
{