Add support for missig hipStreamGetPriority API

Change-Id: I2be4b055e5f977eb6ecad0b1f5f9535e72345fe7
Este commit está contenido en:
Aryan Salmanpour
2020-06-01 13:33:14 -04:00
padre 3375920638
commit bf11ffd175
Se han modificado 4 ficheros con 16 adiciones y 0 borrados
+12
Ver fichero
@@ -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);
}