|
|
|
@@ -58,22 +58,22 @@ |
|
|
|
} |
|
|
|
|
|
|
|
// If expr is not SUCCESS, print the log and return the same value |
|
|
|
#define GE_CHK_STATUS_RET(expr, ...) \ |
|
|
|
do { \ |
|
|
|
const ge::Status _status = (expr); \ |
|
|
|
if (_status != ge::SUCCESS) { \ |
|
|
|
DOMI_LOGE(__VA_ARGS__); \ |
|
|
|
return _status; \ |
|
|
|
} \ |
|
|
|
#define GE_CHK_STATUS_RET(expr, ...) \ |
|
|
|
do { \ |
|
|
|
const ge::Status _status = (expr); \ |
|
|
|
if (_status != ge::SUCCESS) { \ |
|
|
|
DOMI_LOGE(__VA_ARGS__); \ |
|
|
|
return _status; \ |
|
|
|
} \ |
|
|
|
} while (0); |
|
|
|
|
|
|
|
// If expr is not SUCCESS, print the log and do not execute return |
|
|
|
#define GE_CHK_STATUS(expr, ...) \ |
|
|
|
do { \ |
|
|
|
const ge::Status _status = (expr); \ |
|
|
|
if (_status != ge::SUCCESS) { \ |
|
|
|
DOMI_LOGE(__VA_ARGS__); \ |
|
|
|
} \ |
|
|
|
#define GE_CHK_STATUS(expr, ...) \ |
|
|
|
do { \ |
|
|
|
const ge::Status _status = (expr); \ |
|
|
|
if (_status != ge::SUCCESS) { \ |
|
|
|
DOMI_LOGE(__VA_ARGS__); \ |
|
|
|
} \ |
|
|
|
} while (0); |
|
|
|
|
|
|
|
// If expr is not SUCCESS, return the same value |
|
|
|
@@ -86,12 +86,12 @@ |
|
|
|
} while (0); |
|
|
|
|
|
|
|
// If expr is not GRAPH_SUCCESS, print the log and return FAILED |
|
|
|
#define GE_CHK_GRAPH_STATUS_RET(expr, ...) \ |
|
|
|
do { \ |
|
|
|
if ((expr) != ge::GRAPH_SUCCESS) { \ |
|
|
|
DOMI_LOGE(__VA_ARGS__); \ |
|
|
|
return FAILED; \ |
|
|
|
} \ |
|
|
|
#define GE_CHK_GRAPH_STATUS_RET(expr, ...) \ |
|
|
|
do { \ |
|
|
|
if ((expr) != ge::GRAPH_SUCCESS) { \ |
|
|
|
DOMI_LOGE(__VA_ARGS__); \ |
|
|
|
return FAILED; \ |
|
|
|
} \ |
|
|
|
} while (0); |
|
|
|
|
|
|
|
// If expr is not SUCCESS, print the log and execute a custom statement |
|
|
|
|