[HIP] Clean-up deprecated HIP error codes

hipErrorMemoryAllocation -> hipErrorOutOfMemory
hipErrorInitializationError -> hipErrorNotInitialized
hipErrorMapBufferObjectFailed -> hipErrorMapFailed
hipErrorInvalidResourceHandle -> hipErrorInvalidHandle
This commit is contained in:
Evgeny Mankov
2019-12-23 17:01:35 +03:00
parent 9544682e2c
commit 4921678b6c
13 changed files with 112 additions and 118 deletions
+6 -6
View File
@@ -133,7 +133,7 @@ hipError_t hipStreamWaitEvent(hipStream_t stream, hipEvent_t event, unsigned int
hipError_t e = hipSuccess;
if (event == nullptr) {
e = hipErrorInvalidResourceHandle;
e = hipErrorInvalidHandle;
} else {
auto ecd = event->locked_copyCrit();
@@ -189,7 +189,7 @@ hipError_t hipStreamSynchronize(hipStream_t stream) {
//---
/**
* @return #hipSuccess, #hipErrorInvalidResourceHandle
* @return #hipSuccess, #hipErrorInvalidHandle
*/
hipError_t hipStreamDestroy(hipStream_t stream) {
HIP_INIT_API(hipStreamDestroy, stream);
@@ -199,7 +199,7 @@ hipError_t hipStreamDestroy(hipStream_t stream) {
//--- Drain the stream:
if (stream == NULL) {
if (!HIP_FORCE_NULL_STREAM) {
e = hipErrorInvalidResourceHandle;
e = hipErrorInvalidHandle;
}
} else {
stream->locked_wait();
@@ -210,7 +210,7 @@ hipError_t hipStreamDestroy(hipStream_t stream) {
ctx->locked_removeStream(stream);
delete stream;
} else {
e = hipErrorInvalidResourceHandle;
e = hipErrorInvalidHandle;
}
}
@@ -225,7 +225,7 @@ hipError_t hipStreamGetFlags(hipStream_t stream, unsigned int* flags) {
if (flags == NULL) {
return ihipLogStatus(hipErrorInvalidValue);
} else if (stream == hipStreamNull) {
return ihipLogStatus(hipErrorInvalidResourceHandle);
return ihipLogStatus(hipErrorInvalidHandle);
} else {
*flags = stream->_flags;
return ihipLogStatus(hipSuccess);
@@ -240,7 +240,7 @@ hipError_t hipStreamGetPriority(hipStream_t stream, int* priority) {
if (priority == NULL) {
return ihipLogStatus(hipErrorInvalidValue);
} else if (stream == hipStreamNull) {
return ihipLogStatus(hipErrorInvalidResourceHandle);
return ihipLogStatus(hipErrorInvalidHandle);
} else {
#if defined(__HCC__) && (__hcc_major__ < 3) && (__hcc_minor__ < 3)
*priority = 0;