diff options
author | Georgios Pinitas <georgios.pinitas@arm.com> | 2017-11-02 13:06:59 +0000 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:35:24 +0000 |
commit | 05078ec491da8f282f4597b4cf1fe79cc16f4b22 (patch) | |
tree | 9407544b37f9477f4d67fb33221f4cb338eeb508 /arm_compute/core/Utils.h | |
parent | ab18212dd287cc0ec9b7c1a2c72455fe75ebd13d (diff) | |
download | ComputeLibrary-05078ec491da8f282f4597b4cf1fe79cc16f4b22.tar.gz |
COMPMID-556: Rework CLActivationLayer
Refactoring.
Change-Id: I879353299b655ec3026cccdfcfca2ee98abf14ea
Reviewed-on: http://mpd-gerrit.cambridge.arm.com/94191
Reviewed-by: Michel Iwaniec <michel.iwaniec@arm.com>
Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Diffstat (limited to 'arm_compute/core/Utils.h')
-rw-r--r-- | arm_compute/core/Utils.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/arm_compute/core/Utils.h b/arm_compute/core/Utils.h index 149e404f5b..8e15a0a988 100644 --- a/arm_compute/core/Utils.h +++ b/arm_compute/core/Utils.h @@ -708,6 +708,28 @@ inline bool is_data_type_float(DataType dt) } } +/** Check if a given data type is of quantized type + * + * @note Quantized is considered a super-set of fixed-point and asymmetric data types. + * + * @param[in] dt Input data type. + * + * @return True if data type is of quantized type, else false. + */ +inline bool is_data_type_quantized(DataType dt) +{ + switch(dt) + { + case DataType::QS8: + case DataType::QASYMM8: + case DataType::QS16: + case DataType::QS32: + return true; + default: + return false; + } +} + /** Check if a given data type is of fixed point type * * @param[in] dt Input data type. @@ -727,6 +749,23 @@ inline bool is_data_type_fixed_point(DataType dt) } } +/** Check if a given data type is of asymmetric quantized type + * + * @param[in] dt Input data type. + * + * @return True if data type is of symmetric quantized type, else false. + */ +inline bool is_data_type_assymetric(DataType dt) +{ + switch(dt) + { + case DataType::QASYMM8: + return true; + default: + return false; + } +} + /** Create a string with the float in full precision. * * @param val Floating point value |