From fc2f6d0427e1d886fcccc68867d1af1ccd96608b Mon Sep 17 00:00:00 2001 From: Manuel Bottini Date: Wed, 26 Aug 2020 16:28:38 +0100 Subject: COMPMID-3145: Remove padding from NEScaleKernel Change-Id: I530b12c6270d7dbeb3ef7af62484842ebcb65925 Signed-off-by: Manuel Bottini Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4000 Tested-by: Arm Jenkins Comments-Addressed: Arm Jenkins Reviewed-by: Michele Di Giorgio Reviewed-by: Michalis Spyrou --- arm_compute/core/NEON/kernels/NEScaleKernel.h | 34 +++++++++++++++++---------- 1 file changed, 22 insertions(+), 12 deletions(-) (limited to 'arm_compute/core/NEON') diff --git a/arm_compute/core/NEON/kernels/NEScaleKernel.h b/arm_compute/core/NEON/kernels/NEScaleKernel.h index a2328b13bc..b35bb72741 100644 --- a/arm_compute/core/NEON/kernels/NEScaleKernel.h +++ b/arm_compute/core/NEON/kernels/NEScaleKernel.h @@ -83,34 +83,44 @@ public: // Inherited methods overridden: void run(const Window &window, const ThreadInfo &info) override; - BorderSize border_size() const override; private: - /** function to perform scale using nearest interpolation on the given window */ - void scale_nearest_nchw(const Window &window); - /** function to perform scale using bilinear interpolation on the given window */ - void scale_bilinear_nchw(const Window &window); /** function to perform scale using area interpolation on the given window * * @note Used only in case down-sampling. */ - void scale_area_nchw(const Window &window); - /** function to perform scale on the given window */ - void scale_nhwc(const Window &window); - /** Scale function to use for the particular interpolation type passed to configure() */ - void (NEScaleKernel::*_func)(const Window &window); + void scale_area_nchw_u8(const Window &window); + + /** function to perform scale using bilinear interpolation on the given window */ + template + void scale_bilinear_nchw(const Window &window); + /** function to perform scale using bilinear interpolation on the given window */ + template + void scale_bilinear_nhwc(const Window &window); + /** function to perform scale using bilinear interpolation on the given window */ + template + void scale_bilinear_qasymm(const Window &window); + + /** function to perform scale using nearest neighbour on the given window */ + template + void scale_nearest_nchw(const Window &window); + /** function to perform scale using nearest neighbour on the given window */ + template + void scale_nearest_nhwc(const Window &window); + + /** Scale function to use for the particular function to use */ + using ScaleFunctionPtr = void (NEScaleKernel::*)(const Window &window); + ScaleFunctionPtr _func; const ITensor *_offsets; const ITensor *_dx; const ITensor *_dy; const ITensor *_input; ITensor *_output; InterpolationPolicy _policy; - BorderSize _border_size; BorderMode _border_mode; PixelValue _constant_border_value; float _sampling_offset; - bool _use_padding; bool _align_corners; }; } // namespace arm_compute -- cgit v1.2.1