diff options
Diffstat (limited to 'arm_compute/core/Utils.h')
-rw-r--r-- | arm_compute/core/Utils.h | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/arm_compute/core/Utils.h b/arm_compute/core/Utils.h index b711451453..a37559d269 100644 --- a/arm_compute/core/Utils.h +++ b/arm_compute/core/Utils.h @@ -1022,7 +1022,7 @@ inline bool is_data_type_quantized(DataType dt) * * @param[in] dt Input data type. * - * @return True if data type is of symmetric quantized type, else false. + * @return True if data type is of asymmetric quantized type, else false. */ inline bool is_data_type_quantized_asymmetric(DataType dt) { @@ -1035,6 +1035,25 @@ inline bool is_data_type_quantized_asymmetric(DataType dt) } } +/** Check if a given data type is of symmetric 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_quantized_symmetric(DataType dt) +{ + switch(dt) + { + case DataType::QSYMM8: + case DataType::QSYMM8_PER_CHANNEL: + case DataType::QSYMM16: + return true; + default: + return false; + } +} + /** Create a string with the float in full precision. * * @param val Floating point value |