23.11
|
#include <array>
#include <string>
Go to the source code of this file.
Data Structures | |
class | Status |
Status class. More... | |
Namespaces | |
arm_compute | |
Copyright (c) 2017-2023 Arm Limited. | |
Macros | |
#define | ARM_COMPUTE_UNUSED(...) ::arm_compute::ignore_unused(__VA_ARGS__) |
To avoid unused variables warnings. More... | |
#define | ARM_COMPUTE_CREATE_ERROR(error_code, msg) arm_compute::create_error_msg(error_code, __func__, __FILE__, __LINE__, msg) |
Creates an error with a given message. More... | |
#define | ARM_COMPUTE_CREATE_ERROR_LOC(error_code, func, file, line, msg) arm_compute::create_error_msg(error_code, func, file, line, msg) |
Creates an error on location with a given message. More... | |
#define | ARM_COMPUTE_CREATE_ERROR_LOC_VAR(error_code, func, file, line, msg, ...) |
Creates an error on location with a given message. More... | |
#define | ARM_COMPUTE_RETURN_ERROR_MSG(...) |
An error is returned with the given description. More... | |
#define | ARM_COMPUTE_RETURN_ON_ERROR(status) |
Checks if a status contains an error and returns it. More... | |
#define | ARM_COMPUTE_THROW_ON_ERROR(error) error.throw_if_error(); |
Checks if an error value is valid if not throws an exception with the error. More... | |
#define | ARM_COMPUTE_RETURN_ERROR_ON_MSG_VAR(cond, msg, ...) |
If the condition is true, an error is returned. More... | |
#define | ARM_COMPUTE_RETURN_ERROR_ON_MSG(cond, msg) |
If the condition is true, an error is returned. More... | |
#define | ARM_COMPUTE_RETURN_ERROR_ON_LOC_MSG_VAR(cond, func, file, line, msg, ...) |
If the condition is true, an error is thrown. More... | |
#define | ARM_COMPUTE_RETURN_ERROR_ON_LOC_MSG(cond, func, file, line, msg) |
If the condition is true, an error is thrown. More... | |
#define | ARM_COMPUTE_RETURN_ERROR_ON(cond) ARM_COMPUTE_RETURN_ERROR_ON_MSG(cond, #cond) |
If the condition is true, an error is returned. More... | |
#define | ARM_COMPUTE_RETURN_ERROR_ON_LOC(cond, func, file, line) ARM_COMPUTE_RETURN_ERROR_ON_LOC_MSG(cond, func, file, line, #cond) |
If the condition is true, an error is returned. More... | |
#define | ARM_COMPUTE_THROW_ERROR(func, file, line, msg) |
Print the given message then throw an std::runtime_error. More... | |
#define | ARM_COMPUTE_THROW_ERROR_VAR(func, file, line, msg, ...) |
Print the given message then throw an std::runtime_error. More... | |
#define | ARM_COMPUTE_ERROR_VAR(msg, ...) ARM_COMPUTE_THROW_ERROR_VAR(__func__, __FILE__, __LINE__, msg, __VA_ARGS__) |
Print the given message then throw an std::runtime_error. More... | |
#define | ARM_COMPUTE_ERROR(msg) ARM_COMPUTE_THROW_ERROR(__func__, __FILE__, __LINE__, msg) |
Print the given message then throw an std::runtime_error. More... | |
#define | ARM_COMPUTE_ERROR_LOC_VAR(func, file, line, msg, ...) ARM_COMPUTE_THROW_ERROR_VAR(func, file, line, msg, __VA_ARGS__) |
Print the given message then throw an std::runtime_error. More... | |
#define | ARM_COMPUTE_ERROR_LOC(func, file, line, msg) ARM_COMPUTE_THROW_ERROR(func, file, line, msg) |
Print the given message then throw an std::runtime_error. More... | |
#define | ARM_COMPUTE_EXIT_ON_MSG(cond, msg) |
If the condition is true, the given message is printed and program exits. More... | |
#define | ARM_COMPUTE_EXIT_ON_MSG_VAR(cond, msg, ...) |
If the condition is true, the given message is printed and program exits. More... | |
#define | ARM_COMPUTE_ERROR_THROW_ON(status) |
#define | ARM_COMPUTE_ERROR_ON_MSG(cond, msg) |
#define | ARM_COMPUTE_ERROR_ON_MSG_VAR(cond, msg, ...) |
#define | ARM_COMPUTE_ERROR_ON_LOC_MSG(cond, func, file, line, ...) |
#define | ARM_COMPUTE_CONST_ON_ERROR(cond, val, msg) val |
#define | ARM_COMPUTE_ERROR_ON(cond) ARM_COMPUTE_ERROR_ON_MSG(cond, #cond) |
If the condition is true then an error message is printed and an exception thrown. More... | |
#define | ARM_COMPUTE_ERROR_ON_LOC(cond, func, file, line) ARM_COMPUTE_ERROR_ON_LOC_MSG(cond, func, file, line, "%s", #cond) |
If the condition is true then an error message is printed and an exception thrown. More... | |
#define | ARM_COMPUTE_THROW(ex) throw(ex) |
Enumerations | |
enum | ErrorCode { OK, RUNTIME_ERROR, UNSUPPORTED_EXTENSION_USE } |
Available error codes. More... | |
Functions | |
template<typename... T> | |
void | ignore_unused (T &&...) |
Ignores unused arguments. More... | |
Status | create_error (ErrorCode error_code, std::string msg) |
Creates an error containing the error message. More... | |
Status | create_error_msg (ErrorCode error_code, const char *func, const char *file, int line, const char *msg) |
Creates an error and the error message. More... | |
void | throw_error (Status err) |
Throw an std::runtime_error. More... | |
#define ARM_COMPUTE_CREATE_ERROR | ( | error_code, | |
msg | |||
) | arm_compute::create_error_msg(error_code, __func__, __FILE__, __LINE__, msg) |
#define ARM_COMPUTE_CREATE_ERROR_LOC | ( | error_code, | |
func, | |||
file, | |||
line, | |||
msg | |||
) | arm_compute::create_error_msg(error_code, func, file, line, msg) |
Creates an error on location with a given message.
[in] | error_code | Error code. |
[in] | func | Function in which the error occurred. |
[in] | file | File in which the error occurred. |
[in] | line | Line in which the error occurred. |
[in] | msg | Message to display before abandoning. |
#define ARM_COMPUTE_CREATE_ERROR_LOC_VAR | ( | error_code, | |
func, | |||
file, | |||
line, | |||
msg, | |||
... | |||
) |
Creates an error on location with a given message.
Accepts a message format and a variable list of arguments matching the format description.
[in] | error_code | Error code. |
[in] | func | Function in which the error occurred. |
[in] | file | File in which the error occurred. |
[in] | line | Line in which the error occurred. |
[in] | msg | Error description message format. |
[in] | ... | List of arguments matching the format description. |
#define ARM_COMPUTE_ERROR | ( | msg | ) | ARM_COMPUTE_THROW_ERROR(__func__, __FILE__, __LINE__, msg) |
#define ARM_COMPUTE_ERROR_LOC | ( | func, | |
file, | |||
line, | |||
msg | |||
) | ARM_COMPUTE_THROW_ERROR(func, file, line, msg) |
#define ARM_COMPUTE_ERROR_LOC_VAR | ( | func, | |
file, | |||
line, | |||
msg, | |||
... | |||
) | ARM_COMPUTE_THROW_ERROR_VAR(func, file, line, msg, __VA_ARGS__) |
Print the given message then throw an std::runtime_error.
Accepts a message format and a variable list of arguments matching the format description.
[in] | func | Function in which the error occurred. |
[in] | file | File in which the error occurred. |
[in] | line | Line in which the error occurred. |
[in] | msg | Error description message format. |
[in] | ... | List of arguments matching the format description. |
#define ARM_COMPUTE_ERROR_ON | ( | cond | ) | ARM_COMPUTE_ERROR_ON_MSG(cond, #cond) |
#define ARM_COMPUTE_ERROR_ON_LOC | ( | cond, | |
func, | |||
file, | |||
line | |||
) | ARM_COMPUTE_ERROR_ON_LOC_MSG(cond, func, file, line, "%s", #cond) |
#define ARM_COMPUTE_ERROR_ON_LOC_MSG | ( | cond, | |
func, | |||
file, | |||
line, | |||
... | |||
) |
#define ARM_COMPUTE_ERROR_VAR | ( | msg, | |
... | |||
) | ARM_COMPUTE_THROW_ERROR_VAR(__func__, __FILE__, __LINE__, msg, __VA_ARGS__) |
#define ARM_COMPUTE_EXIT_ON_MSG | ( | cond, | |
msg | |||
) |
#define ARM_COMPUTE_EXIT_ON_MSG_VAR | ( | cond, | |
msg, | |||
... | |||
) |
If the condition is true, the given message is printed and program exits.
Accepts a message format and a variable list of arguments matching the format description.
[in] | cond | Condition to evaluate. |
[in] | msg | Error description message format. |
[in] | ... | List of arguments matching the format description. |
#define ARM_COMPUTE_RETURN_ERROR_MSG | ( | ... | ) |
An error is returned with the given description.
[in] | ... | Error description message. |
#define ARM_COMPUTE_RETURN_ERROR_ON | ( | cond | ) | ARM_COMPUTE_RETURN_ERROR_ON_MSG(cond, #cond) |
#define ARM_COMPUTE_RETURN_ERROR_ON_LOC | ( | cond, | |
func, | |||
file, | |||
line | |||
) | ARM_COMPUTE_RETURN_ERROR_ON_LOC_MSG(cond, func, file, line, #cond) |
#define ARM_COMPUTE_RETURN_ERROR_ON_LOC_MSG | ( | cond, | |
func, | |||
file, | |||
line, | |||
msg | |||
) |
If the condition is true, an error is thrown.
[in] | cond | Condition to evaluate. |
[in] | func | Function in which the error occurred. |
[in] | file | File in which the error occurred. |
[in] | line | Line in which the error occurred. |
[in] | msg | Message to display. |
#define ARM_COMPUTE_RETURN_ERROR_ON_LOC_MSG_VAR | ( | cond, | |
func, | |||
file, | |||
line, | |||
msg, | |||
... | |||
) |
If the condition is true, an error is thrown.
Accepts a message format and a variable list of arguments matching the format description.
[in] | cond | Condition to evaluate. |
[in] | func | Function in which the error occurred. |
[in] | file | File in which the error occurred. |
[in] | line | Line in which the error occurred. |
[in] | msg | Error description message format. |
[in] | ... | List of arguments matching the format description. |
#define ARM_COMPUTE_RETURN_ERROR_ON_MSG | ( | cond, | |
msg | |||
) |
If the condition is true, an error is returned.
[in] | cond | Condition to evaluate. |
[in] | msg | Error description message |
#define ARM_COMPUTE_RETURN_ERROR_ON_MSG_VAR | ( | cond, | |
msg, | |||
... | |||
) |
If the condition is true, an error is returned.
Accepts a message format and a variable list of arguments matching the format description.
[in] | cond | Condition to evaluate. |
[in] | msg | Error description message format. |
[in] | ... | List of arguments matching the format description. |
#define ARM_COMPUTE_RETURN_ON_ERROR | ( | status | ) |
#define ARM_COMPUTE_THROW_ERROR | ( | func, | |
file, | |||
line, | |||
msg | |||
) |
Print the given message then throw an std::runtime_error.
[in] | func | Function in which the error occurred. |
[in] | file | File in which the error occurred. |
[in] | line | Line in which the error occurred. |
[in] | msg | Message to display. |
#define ARM_COMPUTE_THROW_ERROR_VAR | ( | func, | |
file, | |||
line, | |||
msg, | |||
... | |||
) |
Print the given message then throw an std::runtime_error.
Accepts a message format and a variable list of arguments matching the format description.
[in] | func | Function in which the error occurred. |
[in] | file | File in which the error occurred. |
[in] | line | Line in which the error occurred. |
[in] | msg | Error description message format. |
[in] | ... | List of arguments matching the format description. |
#define ARM_COMPUTE_THROW_ON_ERROR | ( | error | ) | error.throw_if_error(); |
#define ARM_COMPUTE_UNUSED | ( | ... | ) | ::arm_compute::ignore_unused(__VA_ARGS__) |