diff --git a/include/hcc_detail/hip_runtime_api.h b/include/hcc_detail/hip_runtime_api.h index 2b1b116c6e..a08974f8b5 100644 --- a/include/hcc_detail/hip_runtime_api.h +++ b/include/hcc_detail/hip_runtime_api.h @@ -397,9 +397,12 @@ hipError_t hipChooseDevice(int *device, hipDeviceProp_t* prop); /** * @brief Return last error returned by any HIP runtime API call and resets the stored error code to #hipSuccess * + * @returns return code from last HIP called from the active host thread + * * Returns the last error that has been returned by any of the runtime calls in the same host thread, * and then resets the saved error to #hipSuccess. * + * @see hipGetErrorString, hipGetLastError, hipPeakAtLastError, hipError_t */ hipError_t hipGetLastError(void); @@ -412,8 +415,7 @@ hipError_t hipGetLastError(void); * Returns the last error that has been returned by any of the runtime calls in the same host thread. * Unlike hipGetLastError, this function does not reset the saved error code. * - * - * + * @see hipGetErrorString, hipGetLastError, hipPeakAtLastError, hipError_t */ hipError_t hipPeekAtLastError(void); diff --git a/src/hip_error.cpp b/src/hip_error.cpp index d9c6dd9aa9..97fcaaf714 100644 --- a/src/hip_error.cpp +++ b/src/hip_error.cpp @@ -25,9 +25,7 @@ THE SOFTWARE. //------------------------------------------------------------------------------------------------- // Error Handling //--- -/** - * @returns return code from last HIP called from the active host thread. - */ + hipError_t hipGetLastError() { HIP_INIT_API(); @@ -38,8 +36,6 @@ hipError_t hipGetLastError() return e; } - -//--- hipError_t hipPeekAtLastError() { HIP_INIT_API(); @@ -48,7 +44,6 @@ hipError_t hipPeekAtLastError() return ihipLogStatus(tls_lastHipError); } -//--- const char *hipGetErrorName(hipError_t hip_error) { HIP_INIT_API(hip_error); @@ -56,12 +51,6 @@ const char *hipGetErrorName(hipError_t hip_error) return ihipErrorString(hip_error); } - -/** - * @warning : hipGetErrorString returns string from hipGetErrorName - */ - -//--- const char *hipGetErrorString(hipError_t hip_error) { HIP_INIT_API(hip_error);