aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/core/QuantizationInfo.h
diff options
context:
space:
mode:
authorManuel Bottini <manuel.bottini@arm.com>2019-07-17 16:11:53 +0100
committerManuel Bottini <manuel.bottini@arm.com>2019-07-22 14:06:55 +0000
commit10c53f1ef317095ddcd9143bf759cc68ecb0e721 (patch)
tree644954b909692f1d6b4e20194e81708503a62c2b /arm_compute/core/QuantizationInfo.h
parentd176d54b94c5337c97bd87671ce390804da8c10b (diff)
downloadComputeLibrary-10c53f1ef317095ddcd9143bf759cc68ecb0e721.tar.gz
COMPMID-2307: QUANTIZED_16BIT_LSTM operator for CL
Change-Id: I1b52df359f1a368d585fac43a08496544dd2f86f Signed-off-by: Manuel Bottini <manuel.bottini@arm.com> Reviewed-on: https://review.mlplatform.org/c/1568 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Giuseppe Rossini <giuseppe.rossini@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute/core/QuantizationInfo.h')
-rw-r--r--arm_compute/core/QuantizationInfo.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/arm_compute/core/QuantizationInfo.h b/arm_compute/core/QuantizationInfo.h
index 587a380d63..79afca0714 100644
--- a/arm_compute/core/QuantizationInfo.h
+++ b/arm_compute/core/QuantizationInfo.h
@@ -300,6 +300,18 @@ inline float dequantize(int8_t value, float scale)
return value * scale;
}
+/** Dequantize a value given a symmetric quantization scheme
+ *
+ * @param[in] value Value to dequantize
+ * @param[in] scale Scale to use for dequantization
+ *
+ * @return Dequantized value
+ */
+inline float dequantize(int16_t value, float scale)
+{
+ return value * scale;
+}
+
/** Quantize a value given a 16-bit symmetric quantization scheme
*
* @param[in] value Value to quantize