COMPMID-2080 Create a new kernel for CLPad with CONSTANT mode
Change-Id: Ib67bacd40c13c7784ca9f5699a235f9d106baddb
Signed-off-by: Giorgio Arena <giorgio.arena@arm.com>
Reviewed-on: https://review.mlplatform.org/c/1739
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Giuseppe Rossini <giuseppe.rossini@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
diff --git a/arm_compute/runtime/CL/functions/CLPadLayer.h b/arm_compute/runtime/CL/functions/CLPadLayer.h
index 7f140d9..58e0cab 100644
--- a/arm_compute/runtime/CL/functions/CLPadLayer.h
+++ b/arm_compute/runtime/CL/functions/CLPadLayer.h
@@ -25,14 +25,10 @@
#define __ARM_COMPUTE_CLPADLAYER_H__
#include "arm_compute/core/CL/kernels/CLCopyKernel.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/core/CL/kernels/CLPadLayerKernel.h"
#include "arm_compute/runtime/CL/CLTensor.h"
+#include "arm_compute/runtime/CL/functions/CLConcatenateLayer.h"
#include "arm_compute/runtime/CL/functions/CLStridedSlice.h"
-#include "arm_compute/runtime/IFunction.h"
namespace arm_compute
{
@@ -47,8 +43,16 @@
class CLPadLayer : public IFunction
{
public:
- /** Default constructor*/
+ /** Default constructor */
CLPadLayer();
+ /** Prevent instances of this class from being copied (As this class contains pointers) */
+ CLPadLayer(const CLPadLayer &) = delete;
+ /** Default move constructor */
+ CLPadLayer(CLPadLayer &&) = default;
+ /** Prevent instances of this class from being copied (As this class contains pointers) */
+ CLPadLayer &operator=(const CLPadLayer &) = delete;
+ /** Default move assignment operator */
+ CLPadLayer &operator=(CLPadLayer &&) = default;
/** Initialize the function
*
@@ -83,10 +87,10 @@
void configure_constant_mode(ICLTensor *input, ICLTensor *output, const PaddingList &padding, const PixelValue constant_value);
void configure_reflect_symmetric_mode(ICLTensor *input, ICLTensor *output);
+ CLPadLayerKernel _pad_kernel;
CLCopyKernel _copy_kernel;
PaddingMode _mode;
PaddingList _padding;
- CLMemsetKernel _memset_kernel;
size_t _num_dimensions;
std::vector<CLStridedSlice> _slice_functions;
std::vector<CLConcatenateLayer> _concat_functions;