From e222941f931b1d44bb29e5827b6df748e60cefc4 Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Wed, 12 Jul 2017 12:30:40 +0100 Subject: COMPMID-401: Implement FixedPointPosition conversion for NEON. Adds support of changing the fixed point position of a tensor in DepthConvert. Change-Id: Ic3b50a4628fac7497a0217d92941c9d6f64d21cb Reviewed-on: http://mpd-gerrit.cambridge.arm.com/80438 Reviewed-by: Anthony Barbier Tested-by: Kaizen --- arm_compute/runtime/NEON/functions/NEDepthConvert.h | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'arm_compute/runtime/NEON/functions/NEDepthConvert.h') diff --git a/arm_compute/runtime/NEON/functions/NEDepthConvert.h b/arm_compute/runtime/NEON/functions/NEDepthConvert.h index 47b3a7e6f6..37f7293fb3 100644 --- a/arm_compute/runtime/NEON/functions/NEDepthConvert.h +++ b/arm_compute/runtime/NEON/functions/NEDepthConvert.h @@ -44,25 +44,26 @@ public: /** Prevent instances of this class from being copied (As this class contains pointers)*/ const NEDepthConvert &operator=(const NEDepthConvert &) = delete; /** Initialize the function's source, destination - * - * Input format must be different than output format. * * Valid conversions Input -> Output : - * QS8 -> F32 + * QS8 -> QS8, F32 * U8 -> U16, S16, S32 * U16 -> U8, U32 * S16 -> U8, S32 - * QS16 -> F32 + * QS16 -> QS16, F32 * F32 -> QS8, QS16 * + * @warning In case of in-place fixed point position conversion make sure that configure has been called + * before the updated tensor is used in other functions, as the TensorInfo of the tensor will be + * altered. In-place is only supported for QS8 -> QS8, QS16 -> QS16. * - * @param[in] input The input tensor to convert. Data type supported: QS8/U8/U16/S16/QS16/F32. - * @param[out] output The output tensor. Data type supported: QS8/U8/U16/S16/QS16/U32/S32/F32. - * @param[in] policy Conversion policy. - * @param[in] shift Value for down/up conversions. Must be 0 <= shift < 8. - * It is not used on fixed point conversion. + * @param[in, out] input The input tensor to convert (Written in case of in-place computation). Data types supported: U8/QS8/U16/S16/F32. + * @param[out] output The output tensor. Can be null in case of in-place computation. Data types supported: U8/QS8/U16/S16/U32/S32/F32. + * @param[in] policy Conversion policy. + * @param[in] shift (Optional) Value for down/up conversions. Must be 0 <= shift < 8. + * In case of fixed point position conversion, it specifies the new fixed point position, if operation is in-place. */ - void configure(const ITensor *input, ITensor *output, ConvertPolicy policy, uint32_t shift); + void configure(ITensor *input, ITensor *output, ConvertPolicy policy, uint32_t shift = 0); }; } #endif /*__ARM_COMPUTE_NEDEPTHCONVERT_H__*/ -- cgit v1.2.1