aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/core/PixelValue.h
diff options
context:
space:
mode:
authorManuel Bottini <manuel.bottini@arm.com>2019-01-14 15:14:43 +0000
committerManuel Bottini <manuel.bottini@arm.com>2019-01-23 14:11:17 +0000
commit1d4f3853dfd16f55338d772ad757db0ee8710d78 (patch)
tree344a48b5d296fef0e05d345d342ba0733f8db7a2 /arm_compute/core/PixelValue.h
parent734151d20bef56cbedce2ae67945f42cb4e265c8 (diff)
downloadComputeLibrary-1d4f3853dfd16f55338d772ad757db0ee8710d78.tar.gz
COMPMID-1760: NEON: Implement Prod
Change-Id: I8062f4ca5ef5cf1a8183ac0834f240bbaf8f695d Reviewed-on: https://review.mlplatform.org/541 Reviewed-by: Pablo Marquez <pablo.tello@arm.com> Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute/core/PixelValue.h')
-rw-r--r--arm_compute/core/PixelValue.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/arm_compute/core/PixelValue.h b/arm_compute/core/PixelValue.h
index e86eeba121..0ead9db7b1 100644
--- a/arm_compute/core/PixelValue.h
+++ b/arm_compute/core/PixelValue.h
@@ -41,10 +41,11 @@ public:
}
/** Initialize the union with a pixel value of chosen datatype
*
- * @param[in] v int value.
- * @param[in] datatype DataType that @p v have to be stored
+ * @param[in] v int value.
+ * @param[in] datatype DataType that @p v have to be stored
+ * @param[in] quant_info QuantizationInfo to apply in case of QASYMM8 datatype to @p v
*/
- PixelValue(uint64_t v, DataType datatype)
+ PixelValue(uint64_t v, DataType datatype, QuantizationInfo quant_info = QuantizationInfo())
: PixelValue()
{
switch(datatype)
@@ -55,6 +56,9 @@ public:
case DataType::S8:
value.s8 = static_cast<int8_t>(v);
break;
+ case DataType::QASYMM8:
+ value.u8 = sqcvt_qasymm8_f32(v, quant_info.scale, quant_info.offset);
+ break;
case DataType::U16:
value.u16 = static_cast<uint16_t>(v);
break;