From ebcebf1dee7f8314976b1e0cabd62b4cf893d765 Mon Sep 17 00:00:00 2001 From: Michalis Spyrou Date: Wed, 21 Oct 2020 00:04:14 +0100 Subject: COMPMID-3638: Move NEON kernels Signed-off-by: Michalis Spyrou Change-Id: Ieed3e4bc8be7fef80c90c5094599b477a56fc473 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4285 Comments-Addressed: Arm Jenkins Reviewed-by: Georgios Pinitas Tested-by: Arm Jenkins --- arm_compute/runtime/NEON/functions/NEPadLayer.h | 38 ++++++++++++++++--------- 1 file changed, 25 insertions(+), 13 deletions(-) (limited to 'arm_compute/runtime/NEON/functions/NEPadLayer.h') diff --git a/arm_compute/runtime/NEON/functions/NEPadLayer.h b/arm_compute/runtime/NEON/functions/NEPadLayer.h index fcb7c36312..3fdbb0d73c 100644 --- a/arm_compute/runtime/NEON/functions/NEPadLayer.h +++ b/arm_compute/runtime/NEON/functions/NEPadLayer.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 Arm Limited. + * Copyright (c) 2018-2020 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -29,13 +29,15 @@ #include "arm_compute/runtime/NEON/functions/NEStridedSlice.h" #include "arm_compute/runtime/SubTensor.h" -#include "arm_compute/core/NEON/kernels/NECopyKernel.h" -#include "arm_compute/core/NEON/kernels/NEPadLayerKernel.h" #include "arm_compute/core/Types.h" #include "arm_compute/runtime/Tensor.h" +#include namespace arm_compute { +class NECopyKernel; +class NEPadLayerKernel; + /** Basic function to pad a tensor. This function calls the following NEON functions/kernels: * * - For padding mode = PaddingMode::CONSTANT: @@ -49,8 +51,18 @@ namespace arm_compute class NEPadLayer : public IFunction { public: - /** Default constructor*/ + /** Default Constructor */ NEPadLayer(); + /** Prevent instances of this class from being copied (As this class contains pointers) */ + NEPadLayer(const NEPadLayer &) = delete; + /** Prevent instances of this class from being copied (As this class contains pointers) */ + NEPadLayer &operator=(const NEPadLayer &) = delete; + /** Prevent instances of this class from being moved (As this class contains non movable objects) */ + NEPadLayer(NEPadLayer &&) = delete; + /** Prevent instances of this class from being moved (As this class contains non movable objects) */ + NEPadLayer &operator=(NEPadLayer &&) = delete; + /** Default destructor */ + ~NEPadLayer(); /** Initialize the function * * @param[in] input Source tensor. Data types supported: All. @@ -97,15 +109,15 @@ private: void configure_reflect_symmetric_mode(ITensor *input, ITensor *output); private: - NECopyKernel _copy_kernel; - NEPadLayerKernel _pad_kernel; - PaddingMode _mode; - PaddingList _padding; - uint32_t _num_dimensions; - std::vector _slice_functions; - std::vector _concat_functions; - std::vector _slice_results; - std::vector _concat_results; + std::unique_ptr _copy_kernel; + std::unique_ptr _pad_kernel; + PaddingMode _mode; + PaddingList _padding; + uint32_t _num_dimensions; + std::vector _slice_functions; + std::vector _concat_functions; + std::vector _slice_results; + std::vector _concat_results; }; } // namespace arm_compute #endif /*ARM_COMPUTE_NEPADLAYER_H */ -- cgit v1.2.1