diff options
author | Michele Di Giorgio <michele.digiorgio@arm.com> | 2018-08-24 18:28:48 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:54:54 +0000 |
commit | 3e570dbdb0cbcbc3314e8f3e4daf2cf385caf325 (patch) | |
tree | 5cb9a4279a4b6b456a53ff8f918bb2aa6cd68dbe /arm_compute/core/NEON/kernels | |
parent | daa38559bb01eb3c2985f503e7b2b4dc850a34d3 (diff) | |
download | ComputeLibrary-3e570dbdb0cbcbc3314e8f3e4daf2cf385caf325.tar.gz |
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 <bsgcomp@arm.com>
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Diffstat (limited to 'arm_compute/core/NEON/kernels')
-rw-r--r-- | arm_compute/core/NEON/kernels/NEDepthConvertLayerKernel.h | 34 |
1 files changed, 21 insertions, 13 deletions
diff --git a/arm_compute/core/NEON/kernels/NEDepthConvertLayerKernel.h b/arm_compute/core/NEON/kernels/NEDepthConvertLayerKernel.h index 77bb0413ca..6840b1adcd 100644 --- a/arm_compute/core/NEON/kernels/NEDepthConvertLayerKernel.h +++ b/arm_compute/core/NEON/kernels/NEDepthConvertLayerKernel.h @@ -25,9 +25,6 @@ #define __ARM_COMPUTE_DEPTHCONVERTKERNEL_H__ #include "arm_compute/core/NEON/INEKernel.h" -#include "arm_compute/core/Types.h" - -#include <cstdint> namespace arm_compute { @@ -58,23 +55,34 @@ public: * - U8 -> U16, S16, S32 * - U16 -> U8, U32 * - S16 -> U8, S32 + * - F16 -> F32 + * - F32 -> F16 + * + * @param[in] input The input tensor to convert. Data types supported: U8/U16/S16/F16/F32. + * @param[out] output The output tensor. Data types 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. + */ + 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 NEDepthConvertLayerKernel + * + * @param[in] input Source tensor info. Data types supported: U8/U16/S16/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. * - * @param[in, out] input The input tensor to convert (Written in case of in-place computation). Data types supported: U8/U16/S16. - * @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. - * In case of fixed point position conversion, it specifies the new fixed point position, if operation is in-place. + * @return a status */ - void configure(ITensor *input, ITensor *output, ConvertPolicy policy, uint32_t shift = 0); + static Status validate(const ITensorInfo *input, const ITensorInfo *output, ConvertPolicy policy, uint32_t shift = 0); // Inherited methods overridden: void run(const Window &window, const ThreadInfo &info) override; private: - ITensor *_input; - ITensor *_output; - ConvertPolicy _policy; - uint32_t _shift; + const ITensor *_input; + ITensor *_output; + ConvertPolicy _policy; + uint32_t _shift; }; } // namespace arm_compute #endif /*__ARM_COMPUTE_NEDEPTHCONVERTKERNEL_H__ */ |