diff options
author | Manuel Bottini <manuel.bottini@arm.com> | 2021-05-12 15:39:07 +0100 |
---|---|---|
committer | Georgios Pinitas <georgios.pinitas@arm.com> | 2021-05-18 09:53:11 +0000 |
commit | f3c52596a87eb4ccada601fc57f612bab137415d (patch) | |
tree | 5c842e9ec9d93390179ecc9e8dfd0207e0fb42df /src/core/NEON/kernels/NERemapKernel.h | |
parent | 494b97a8297c18d0d610a54189c8f848e2cf5446 (diff) | |
download | ComputeLibrary-f3c52596a87eb4ccada601fc57f612bab137415d.tar.gz |
Remove padding from NERemapKernel
Use of out_of_tensor function to check if parallel instructons can be used safely
Reverting to serial computation otherwise
Resolves: COMPMID-4449
Change-Id: I23a986612e3c5d0367e23e56f1aeedbb1330cffc
Signed-off-by: Manuel Bottini <manuel.bottini@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5651
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Diffstat (limited to 'src/core/NEON/kernels/NERemapKernel.h')
-rw-r--r-- | src/core/NEON/kernels/NERemapKernel.h | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/src/core/NEON/kernels/NERemapKernel.h b/src/core/NEON/kernels/NERemapKernel.h index 21cb67ef58..33e929805a 100644 --- a/src/core/NEON/kernels/NERemapKernel.h +++ b/src/core/NEON/kernels/NERemapKernel.h @@ -54,17 +54,18 @@ public: /** Initialize the kernel's input, output and border mode. * - * @param[in] input Source tensor. Data type supported: U8. - * @param[in] map_x Map for X coordinates. Data type supported: F32. - * @param[in] map_y Map for Y coordinates. Data type supported: F32. - * @param[out] output Destination tensor. Data types supported: U8. All but the lowest two dimensions must be the same size as in the input tensor, i.e. remapping is only performed within the XY-plane. - * @param[in] policy The interpolation type. + * @param[in] input Source tensor. Data type supported: U8. + * @param[in] map_x Map for X coordinates. Data type supported: F32. + * @param[in] map_y Map for Y coordinates. Data type supported: F32. + * @param[out] output Destination tensor. Data types supported: U8. All but the lowest two dimensions must be the same size as in the input tensor, i.e. remapping is only performed within the XY-plane. + * @param[in] policy The interpolation type. + * @param[in] border_mode Border mode to use on the input tensor. + * @param[in] constant_border_value (Optional) Constant value to use for borders if border_mode is set to CONSTANT. Defaults to 0. */ - void configure(const ITensor *input, const ITensor *map_x, const ITensor *map_y, ITensor *output, InterpolationPolicy policy); + void configure(const ITensor *input, const ITensor *map_x, const ITensor *map_y, ITensor *output, InterpolationPolicy policy, BorderMode border_mode, uint8_t constant_border_value = 0); // Inherited methods overridden: void run(const Window &window, const ThreadInfo &info) override; - BorderSize border_size() const override; private: /** function to perform nearest interpolation on the given window */ @@ -74,10 +75,12 @@ private: /** Remap function to use for the particular interpolation type passed to configure() */ void (NERemapKernel::*_func)(const Window &window); - const ITensor *_input; /**< Input image */ - ITensor *_output; /**< Output image */ - const ITensor *_map_x; /**< Input remap x coordinates */ - const ITensor *_map_y; /**< Input remap y coordinates */ + const ITensor *_input; /**< Input image */ + ITensor *_output; /**< Output image */ + const ITensor *_map_x; /**< Input remap x coordinates */ + const ITensor *_map_y; /**< Input remap y coordinates */ + BorderMode _border_mode; /**< Border mode */ + uint8_t _constant_border_value; /**< Border value to use */ }; } // namespace arm_compute -#endif /*ARM_COMPUTE_NEREMAPKERNEL_H */ +#endif /*ARM_COMPUTE_NEREMAPKERNEL_H */
\ No newline at end of file |