From 60f3911996871e6163ce5a9a2dfca02125db8ecf Mon Sep 17 00:00:00 2001 From: Manuel Bottini Date: Mon, 18 Mar 2019 15:25:15 +0000 Subject: COMPMID-2008: Add support for "reflect" padding mode in CLPad Change-Id: I469f8173d5c4a1b6f03b52b9ddd33928dacd1e7b Signed-off-by: Manuel Bottini Reviewed-on: https://review.mlplatform.org/c/869 Tested-by: Arm Jenkins Comments-Addressed: Arm Jenkins Reviewed-by: Giuseppe Rossini --- arm_compute/runtime/CL/functions/CLPadLayer.h | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'arm_compute') diff --git a/arm_compute/runtime/CL/functions/CLPadLayer.h b/arm_compute/runtime/CL/functions/CLPadLayer.h index 0179441af2..33b09d60a2 100644 --- a/arm_compute/runtime/CL/functions/CLPadLayer.h +++ b/arm_compute/runtime/CL/functions/CLPadLayer.h @@ -25,10 +25,13 @@ #define __ARM_COMPUTE_CLPADLAYER_H__ #include "arm_compute/core/CL/kernels/CLCopyKernel.h" -#include "arm_compute/core/CL/kernels/CLFillBorderKernel.h" #include "arm_compute/core/CL/kernels/CLMemsetKernel.h" #include "arm_compute/core/Types.h" +#include "arm_compute/runtime/CL/functions/CLConcatenateLayer.h" + #include "arm_compute/runtime/CL/CLScheduler.h" +#include "arm_compute/runtime/CL/CLTensor.h" +#include "arm_compute/runtime/CL/functions/CLStridedSlice.h" #include "arm_compute/runtime/IFunction.h" namespace arm_compute @@ -77,9 +80,18 @@ public: void run() override; private: - CLCopyKernel _copy_kernel; - CLFillBorderKernel _fillborder_kernel; - CLMemsetKernel _memset_kernel; + void configure_constant_mode(ICLTensor *input, ICLTensor *output, const PaddingList &padding, const PixelValue constant_value); + void configure_reflect_symmetric_mode(ICLTensor *input, ICLTensor *output); + + CLCopyKernel _copy_kernel; + PaddingMode _mode; + PaddingList _padding; + CLMemsetKernel _memset_kernel; + size_t _num_dimensions; + std::unique_ptr _slice_functions; + std::unique_ptr _concat_functions; + std::unique_ptr _slice_results; + std::unique_ptr _concat_results; }; } // namespace arm_compute #endif /*__ARM_COMPUTE_PADLAYER_H__ */ -- cgit v1.2.1