Add support for missig hipStreamGetPriority API

Change-Id: I2be4b055e5f977eb6ecad0b1f5f9535e72345fe7
This commit is contained in:
Aryan Salmanpour
2020-06-01 13:33:14 -04:00
والد 39ee03f64c
کامیت 4a1536701f
4فایلهای تغییر یافته به همراه16 افزوده شده و 0 حذف شده
+12
مشاهده پرونده
@@ -339,3 +339,15 @@ hipError_t hipExtStreamCreateWithCUMask(hipStream_t* stream, uint32_t cuMaskSize
HIP_RETURN(ihipStreamCreate(stream, hipStreamDefault, amd::CommandQueue::Priority::Normal, cuMaskv));
}
// ================================================================================================
hipError_t hipStreamGetPriority(hipStream_t stream, int* priority) {
HIP_INIT_API(hipStreamGetPriority, stream, priority);
if ((priority != nullptr) && (stream != nullptr)) {
*priority = static_cast<int>(reinterpret_cast<hip::Stream*>(stream)->Priority());
} else {
HIP_RETURN(hipErrorInvalidValue);
}
HIP_RETURN(hipSuccess);
}