Return Values
Return values are error codes, which are defined in the enumeration type HmppResult and show the execution status of a library function.
There is no buffer to store the final error status. The caller needs to determine whether to check the error code when the function returns a value.
Table 1 describes the error codes.
Value |
Description |
|---|---|
0 |
HMPP_STS_NO_ERR: No error occurs. |
1~199 |
Common errors in the image and signal libraries, for example, null pointer or incorrect size |
200~299 |
Common alarms for the image and signal libraries, for example, unsupported mode or operation length overflow |
300~399 |
Common alarms for the image and signal libraries (without changing the code process). Such alarms will be reported for operations including division by zero or negative root extraction. |
400~599 |
Signal library error |
600~799 |
Image library error |
800 and above |
Audio library error |
A non-zero error code does not indicate that the function execution is not complete. Determine the situation according to the function processing logic.
- Using HMPPS_Div_32f as an example:
When the constant 0 is used as a divisor for calculation, the function execution is not interrupted. The result of the division is set to the maximum value of the data type of the source vector, that is, FLT_MAX. The function returns the status code HMPP_STS_DIV_BY_ZERO.