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 --- .../runtime/NEON/functions/NEReductionOperation.h | 27 +++++++++++++++------- 1 file changed, 19 insertions(+), 8 deletions(-) (limited to 'arm_compute/runtime/NEON/functions/NEReductionOperation.h') diff --git a/arm_compute/runtime/NEON/functions/NEReductionOperation.h b/arm_compute/runtime/NEON/functions/NEReductionOperation.h index aafccb00e3..8186e2e355 100644 --- a/arm_compute/runtime/NEON/functions/NEReductionOperation.h +++ b/arm_compute/runtime/NEON/functions/NEReductionOperation.h @@ -26,13 +26,14 @@ #include "arm_compute/runtime/IFunction.h" -#include "arm_compute/core/NEON/kernels/NEReductionOperationKernel.h" #include "arm_compute/runtime/NEON/functions/NEReshapeLayer.h" #include "arm_compute/runtime/Tensor.h" +#include namespace arm_compute { class ITensor; +class NEReductionOperationKernel; /** Basic function to simulate a reduction operation. This function calls the following NEON kernels: * @@ -45,6 +46,16 @@ class NEReductionOperation : public IFunction public: /** Default constructor */ NEReductionOperation(std::shared_ptr memory_manager = nullptr); + /** Prevent instances of this class from being copied (As this class contains pointers) */ + NEReductionOperation(const NEReductionOperation &) = delete; + /** Default move constructor */ + NEReductionOperation(NEReductionOperation &&) = default; + /** Prevent instances of this class from being copied (As this class contains pointers) */ + NEReductionOperation &operator=(const NEReductionOperation &) = delete; + /** Default move assignment operator */ + NEReductionOperation &operator=(NEReductionOperation &&) = default; + /** Default destructor */ + ~NEReductionOperation(); /** Set the input and output tensors. * * @param[in, out] input Source tensor. Data type supported: QASYMM8_SIGNED/QASYMM8/F16/F32/S32. Data layouts supported: NCHW. (Written to only for border_size != 0) @@ -71,13 +82,13 @@ public: void run() override; private: - MemoryGroup _memory_group; - NEReductionOperationKernel _reduction_kernel; - NEReshapeLayer _reshape; - Tensor _output_internal; - size_t _window_split; - int _reduction_axis; - bool _is_reshape_required; + MemoryGroup _memory_group; + std::unique_ptr _reduction_kernel; + NEReshapeLayer _reshape; + Tensor _output_internal; + size_t _window_split; + int _reduction_axis; + bool _is_reshape_required; }; } // namespace arm_compute #endif /* ARM_COMPUTE_NEREDUCTIONOPERATION_H */ -- cgit v1.2.1