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/NEHistogram.h | 25 ++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) (limited to 'arm_compute/runtime/NEON/functions/NEHistogram.h') diff --git a/arm_compute/runtime/NEON/functions/NEHistogram.h b/arm_compute/runtime/NEON/functions/NEHistogram.h index 716f2e71f9..60766ebcdc 100644 --- a/arm_compute/runtime/NEON/functions/NEHistogram.h +++ b/arm_compute/runtime/NEON/functions/NEHistogram.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2019 Arm Limited. + * Copyright (c) 2016-2020 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -24,16 +24,19 @@ #ifndef ARM_COMPUTE_NEHISTOGRAM_H #define ARM_COMPUTE_NEHISTOGRAM_H -#include "arm_compute/core/NEON/kernels/NEHistogramKernel.h" #include "arm_compute/runtime/IFunction.h" #include #include #include +#include namespace arm_compute { +class ITensor; class IDistribution1D; +class NEHistogramKernel; +using IImage = ITensor; /** Basic function to run @ref NEHistogramKernel. */ class NEHistogram : public IFunction @@ -41,6 +44,16 @@ class NEHistogram : public IFunction public: /** Default Constructor. */ NEHistogram(); + /** Prevent instances of this class from being copied (As this class contains pointers) */ + NEHistogram(const NEHistogram &) = delete; + /** Prevent instances of this class from being copied (As this class contains pointers) */ + NEHistogram &operator=(const NEHistogram &) = delete; + /** Prevent instances of this class from being moved (As this class contains non movable objects) */ + NEHistogram(NEHistogram &&) = delete; + /** Prevent instances of this class from being moved (As this class contains non movable objects) */ + NEHistogram &operator=(NEHistogram &&) = delete; + /** Default destructor */ + ~NEHistogram(); /** Initialise the kernel's inputs. * * @param[in] input Input image. Data type supported: U8. @@ -52,10 +65,10 @@ public: void run() override; private: - NEHistogramKernel _histogram_kernel; - std::vector _local_hist; - std::vector _window_lut; - size_t _local_hist_size; + std::unique_ptr _histogram_kernel; + std::vector _local_hist; + std::vector _window_lut; + size_t _local_hist_size; /** 256 possible pixel values as we handle only U8 images */ static constexpr unsigned int window_lut_default_size = 256; }; -- cgit v1.2.1