From 3e570dbdb0cbcbc3314e8f3e4daf2cf385caf325 Mon Sep 17 00:00:00 2001 From: Michele Di Giorgio Date: Fri, 24 Aug 2018 18:28:48 +0100 Subject: COMPMID-1304: NEDepthConvert : Add support for FP32 -> FP16 and FP16 -> FP32 + validate() function Change-Id: I12e4696a454744f6d493ab3a53520d3acf3a1a26 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/145719 Tested-by: Jenkins Reviewed-by: Georgios Pinitas --- .../runtime/NEON/functions/NEDepthConvertLayer.h | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'arm_compute/runtime/NEON/functions/NEDepthConvertLayer.h') diff --git a/arm_compute/runtime/NEON/functions/NEDepthConvertLayer.h b/arm_compute/runtime/NEON/functions/NEDepthConvertLayer.h index eedadc242d..1fdad30115 100644 --- a/arm_compute/runtime/NEON/functions/NEDepthConvertLayer.h +++ b/arm_compute/runtime/NEON/functions/NEDepthConvertLayer.h @@ -49,13 +49,25 @@ public: * U8 -> U16, S16, S32 * U16 -> U8, U32 * S16 -> U8, S32 + * F16 -> F32 + * F32 -> F16 * - * @param[in, out] input The input tensor to convert (Written in case of in-place computation). Data types supported: U8/U16/S16/F32. - * @param[out] output The output tensor. Can be null in case of in-place computation. Data types supported: U8/U16/S16/U32/S32/F32. - * @param[in] policy Conversion policy. - * @param[in] shift (Optional) Value for down/up conversions. Must be 0 <= shift < 8. + * @param[in] input The input tensor to convert. Data types supported: U8/U16/S16/F32. + * @param[out] output The output tensor. Data types supported: U8/U16/S16/U32/S32/F32. + * @param[in] policy Conversion policy. + * @param[in] shift (Optional) Value for down/up conversions. Must be 0 <= shift < 8. */ - void configure(ITensor *input, ITensor *output, ConvertPolicy policy, uint32_t shift = 0); + void configure(const ITensor *input, ITensor *output, ConvertPolicy policy, uint32_t shift = 0); + /** Static function to check if given info will lead to a valid configuration of @ref NEDepthConvertLayer + * + * @param[in] input Source tensor info. Data types supported: U8/U16/S16/U32/S32/F16/F32. + * @param[in] output Destination tensor info. Data type supported: U8/U16/S16/U32/S32/F16/F32. + * @param[in] policy Conversion policy. + * @param[in] shift (Optional) Value for down/up conversions. Must be 0 <= shift < 8. + * + * @return a status + */ + static Status validate(const ITensorInfo *input, const ITensorInfo *output, ConvertPolicy policy, uint32_t shift = 0); }; } #endif /*__ARM_COMPUTE_NEDEPTHCONVERT_H__*/ -- cgit v1.2.1