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 --- .../NEON/functions/NEBatchNormalizationLayer.h | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'arm_compute/runtime/NEON/functions/NEBatchNormalizationLayer.h') diff --git a/arm_compute/runtime/NEON/functions/NEBatchNormalizationLayer.h b/arm_compute/runtime/NEON/functions/NEBatchNormalizationLayer.h index 1f77164a43..6d56a267a7 100644 --- a/arm_compute/runtime/NEON/functions/NEBatchNormalizationLayer.h +++ b/arm_compute/runtime/NEON/functions/NEBatchNormalizationLayer.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2019 Arm Limited. + * Copyright (c) 2017-2020 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -24,14 +24,16 @@ #ifndef ARM_COMPUTE_NEBATCHNORMALIZATIONLAYER_H #define ARM_COMPUTE_NEBATCHNORMALIZATIONLAYER_H -#include "arm_compute/core/NEON/kernels/NEBatchNormalizationLayerKernel.h" #include "arm_compute/core/Types.h" #include "arm_compute/runtime/IFunction.h" #include "arm_compute/runtime/NEON/functions/NEActivationLayer.h" +#include + namespace arm_compute { class ITensor; +class NEBatchNormalizationLayerKernel; /** Basic function to run @ref NENormalizationLayerKernel and simulate a batch normalization layer. * @@ -42,8 +44,18 @@ class ITensor; class NEBatchNormalizationLayer : public IFunction { public: - /** Default constructor */ + /** Constructor */ NEBatchNormalizationLayer(); + /** Prevent instances of this class from being copied (As this class contains pointers) */ + NEBatchNormalizationLayer(const NEBatchNormalizationLayer &) = delete; + /** Prevent instances of this class from being copied (As this class contains pointers) */ + NEBatchNormalizationLayer &operator=(const NEBatchNormalizationLayer &) = delete; + /** Prevent instances of this class from being moved (As this class contains non movable objects) */ + NEBatchNormalizationLayer(NEBatchNormalizationLayer &&) = delete; + /** Prevent instances of this class from being moved (As this class contains non movable objects) */ + NEBatchNormalizationLayer &operator=(NEBatchNormalizationLayer &&) = delete; + /** Default destructor */ + ~NEBatchNormalizationLayer(); /** Set the input and output tensors. * * @note If the output tensor is a nullptr or is equal to the input, the batch normalization function will be performed in-place @@ -85,7 +97,7 @@ public: void run() override; private: - NEBatchNormalizationLayerKernel _norm_kernel; /**< Batch normalization layer kernel */ + std::unique_ptr _norm_kernel; /**< Batch normalization layer kernel */ }; } #endif /* ARM_COMPUTE_NEBATCHNORMALIZATIONLAYER_H */ -- cgit v1.2.1