diff options
author | Georgios Pinitas <georgios.pinitas@arm.com> | 2018-07-12 17:34:22 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:54:54 +0000 |
commit | 6ed43b58e74281cbdde2219962048bc36d560a3b (patch) | |
tree | 46400b96c5cc880f8f9b62f51e2d89f8605bb8dd /arm_compute/core | |
parent | 772e17f8a6683cf3f19cba15c7a1e677fe07a559 (diff) | |
download | ComputeLibrary-6ed43b58e74281cbdde2219962048bc36d560a3b.tar.gz |
COMPMID-1188: Report error on graphs that do not support NHWC
Change-Id: I14c6ded780339aa75555ea5f62247c509e64d0b0
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/139797
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Tested-by: Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute/core')
-rw-r--r-- | arm_compute/core/Error.h | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/arm_compute/core/Error.h b/arm_compute/core/Error.h index e254956ad7..9f51fa234c 100644 --- a/arm_compute/core/Error.h +++ b/arm_compute/core/Error.h @@ -269,6 +269,20 @@ Status create_error(ErrorCode error_code, const char *function, const char *file */ #define ARM_COMPUTE_ERROR_LOC(func, file, line, ...) ::arm_compute::error(func, file, line, __VA_ARGS__) // NOLINT +/** If the condition is true, the given message is printed and program exits + * + * @param[in] cond Condition to evaluate. + * @param[in] ... Message to print if cond is false. + */ +#define ARM_COMPUTE_EXIT_ON_MSG(cond, ...) \ + do \ + { \ + if(cond) \ + { \ + ARM_COMPUTE_ERROR(__VA_ARGS__); \ + } \ + } while(false) + #ifdef ARM_COMPUTE_ASSERTS_ENABLED /** Checks if a status value is valid if not throws an exception with the error * @@ -283,13 +297,7 @@ Status create_error(ErrorCode error_code, const char *function, const char *file * @param[in] ... Message to print if cond is false. */ #define ARM_COMPUTE_ERROR_ON_MSG(cond, ...) \ - do \ - { \ - if(cond) \ - { \ - ARM_COMPUTE_ERROR(__VA_ARGS__); \ - } \ - } while(0) + ARM_COMPUTE_EXIT_ON_MSG(cond, __VA_ARGS__) /** If the condition is true, the given message is printed and an exception is thrown * @@ -306,7 +314,7 @@ Status create_error(ErrorCode error_code, const char *function, const char *file { \ ARM_COMPUTE_ERROR_LOC(func, file, line, __VA_ARGS__); \ } \ - } while(0) + } while(false) /** If the condition is true, the given message is printed and an exception is thrown, otherwise value is returned * |