diff options
author | Michalis Spyrou <michalis.spyrou@arm.com> | 2020-10-21 00:04:14 +0100 |
---|---|---|
committer | Michalis Spyrou <michalis.spyrou@arm.com> | 2020-11-03 15:10:47 +0000 |
commit | ebcebf1dee7f8314976b1e0cabd62b4cf893d765 (patch) | |
tree | 95d3e691a0e88a3e213a1d30446a9224497f2055 /arm_compute/runtime/NEON/functions/NEMeanStdDev.h | |
parent | da4b1b2055d96aaf73704eb9b0b82d74dc2d699c (diff) | |
download | ComputeLibrary-ebcebf1dee7f8314976b1e0cabd62b4cf893d765.tar.gz |
COMPMID-3638: Move NEON kernels
Signed-off-by: Michalis Spyrou <michalis.spyrou@arm.com>
Change-Id: Ieed3e4bc8be7fef80c90c5094599b477a56fc473
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4285
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute/runtime/NEON/functions/NEMeanStdDev.h')
-rw-r--r-- | arm_compute/runtime/NEON/functions/NEMeanStdDev.h | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/arm_compute/runtime/NEON/functions/NEMeanStdDev.h b/arm_compute/runtime/NEON/functions/NEMeanStdDev.h index 120f703140..875c3630c1 100644 --- a/arm_compute/runtime/NEON/functions/NEMeanStdDev.h +++ b/arm_compute/runtime/NEON/functions/NEMeanStdDev.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2019 Arm Limited. + * Copyright (c) 2016-2020 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -24,15 +24,18 @@ #ifndef ARM_COMPUTE_NEMEANSTDDEV_H #define ARM_COMPUTE_NEMEANSTDDEV_H -#include "arm_compute/core/NEON/kernels/NEFillBorderKernel.h" -#include "arm_compute/core/NEON/kernels/NEMeanStdDevKernel.h" +#include "arm_compute/core/IMultiImage.h" #include "arm_compute/core/Types.h" #include "arm_compute/runtime/IFunction.h" +#include <memory> #include <cstdint> namespace arm_compute { +class NEMeanStdDevKernel; +class NEFillBorderKernel; + /** Basic function to execute mean and std deviation. This function calls the following NEON kernels: * * @ref NEMeanStdDevKernel @@ -43,6 +46,16 @@ class NEMeanStdDev : public IFunction public: /** Default Constructor. */ NEMeanStdDev(); + /** Prevent instances of this class from being copied (As this class contains pointers) */ + NEMeanStdDev(const NEMeanStdDev &) = delete; + /** Prevent instances of this class from being copied (As this class contains pointers) */ + NEMeanStdDev &operator=(const NEMeanStdDev &) = delete; + /** Prevent instances of this class from being moved (As this class contains non movable objects) */ + NEMeanStdDev(NEMeanStdDev &&) = delete; + /** Prevent instances of this class from being moved (As this class contains non movable objects) */ + NEMeanStdDev &operator=(NEMeanStdDev &&) = delete; + /** Default destructor */ + ~NEMeanStdDev(); /** Initialise the kernel's inputs and outputs. * * @param[in, out] input Input image. Data types supported: U8. (Written to only for border filling) @@ -55,10 +68,10 @@ public: void run() override; private: - NEMeanStdDevKernel _mean_stddev_kernel; /**< Kernel that standard deviation calculation. */ - NEFillBorderKernel _fill_border_kernel; /**< Kernel that fills tensor's borders with zeroes. */ - uint64_t _global_sum; /**< Variable that holds the global sum among calls in order to ease reduction */ - uint64_t _global_sum_squared; /**< Variable that holds the global sum of squared values among calls in order to ease reduction */ + std::unique_ptr<NEMeanStdDevKernel> _mean_stddev_kernel; /**< Kernel that standard deviation calculation. */ + std::unique_ptr<NEFillBorderKernel> _fill_border_kernel; /**< Kernel that fills tensor's borders with zeroes. */ + uint64_t _global_sum; /**< Variable that holds the global sum among calls in order to ease reduction */ + uint64_t _global_sum_squared; /**< Variable that holds the global sum of squared values among calls in order to ease reduction */ }; } #endif /*ARM_COMPUTE_NEMEANSTDDEV_H */ |