aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/core/FixedPoint.h
diff options
context:
space:
mode:
authorGeorgios Pinitas <georgios.pinitas@arm.com>2017-06-28 18:29:47 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-09-17 14:15:39 +0100
commit9247c92bd8c53be4d0c4ae931f51ca8f88e4150b (patch)
tree3d457a263c0aa6ddcf3d05a4a2323640c486aa36 /arm_compute/core/FixedPoint.h
parent097967568f9363d06df3ac21403edcab57de39d7 (diff)
downloadComputeLibrary-9247c92bd8c53be4d0c4ae931f51ca8f88e4150b.tar.gz
COMPMID-428: Port NESoftmaxLayer to 16-bit fixed point.
Change-Id: I65122950bab9124b9758c27096c0f458b77aeabb Reviewed-on: http://mpd-gerrit.cambridge.arm.com/79365 Reviewed-by: Moritz Pflanzer <moritz.pflanzer@arm.com> Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com> Reviewed-by: Steven Niu <steven.niu@arm.com>
Diffstat (limited to 'arm_compute/core/FixedPoint.h')
-rw-r--r--arm_compute/core/FixedPoint.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/arm_compute/core/FixedPoint.h b/arm_compute/core/FixedPoint.h
index 774125ec7d..f166d93c3e 100644
--- a/arm_compute/core/FixedPoint.h
+++ b/arm_compute/core/FixedPoint.h
@@ -29,6 +29,7 @@ namespace arm_compute
using qint8_t = int8_t; /**< 8 bit fixed point scalar value */
using qint16_t = int16_t; /**< 16 bit fixed point scalar value */
using qint32_t = int32_t; /**< 32 bit fixed point scalar value */
+using qint64_t = int64_t; /**< 64 bit fixed point scalar value */
/** 8 bit fixed point scalar saturating shift left
*
@@ -100,6 +101,15 @@ qint8_t sqadd_qs8(qint8_t a, qint8_t b);
*/
qint16_t sqadd_qs16(qint16_t a, qint16_t b);
+/** 32 bit fixed point scalar saturating add
+ *
+ * @param[in] a First 32 bit fixed point input
+ * @param[in] b Second 32 bit fixed point input
+ *
+ * @return The result of the 32 bit fixed point addition. The result is saturated in case of overflow
+ */
+qint32_t sqadd_qs32(qint32_t a, qint32_t b);
+
/** 8 bit fixed point scalar subtraction
*
* @param[in] a First 8 bit fixed point input
@@ -332,6 +342,14 @@ qint16_t sqcvt_qs16_f32(float a, int fixed_point_position);
* @return The narrowing conversion to 8 bit
*/
qint8_t sqmovn_qs16(qint16_t a);
+
+/** Scalar saturating move and narrow.
+ *
+ * @param[in] a Input to convert to 16 bit fixed point
+ *
+ * @return The narrowing conversion to 16 bit
+ */
+qint16_t sqmovn_qs32(qint32_t a);
}
#include "arm_compute/core/FixedPoint.inl"
#endif /* __ARM_COMPUTE_FIXEDPOINT_H__ */