From 0f7ef8ab2171093855a8f21bd39c8fd7066dd629 Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Sun, 10 Jan 2021 04:23:52 +0000 Subject: Make memset/copy functions state-less Port following functions: - NECopy - NEFill - NEPermute - NEReshapeLayer Signed-off-by: Georgios Pinitas Change-Id: I75f3f837012abab79c7dde9a20a34f64f75571d8 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4800 Tested-by: Arm Jenkins Reviewed-by: Michele Di Giorgio Comments-Addressed: Arm Jenkins --- arm_compute/runtime/NEON/functions/NECopy.h | 34 +++++++++++++++++++---------- 1 file changed, 22 insertions(+), 12 deletions(-) (limited to 'arm_compute/runtime/NEON/functions/NECopy.h') diff --git a/arm_compute/runtime/NEON/functions/NECopy.h b/arm_compute/runtime/NEON/functions/NECopy.h index a58ac9e620..d5f22d72a6 100644 --- a/arm_compute/runtime/NEON/functions/NECopy.h +++ b/arm_compute/runtime/NEON/functions/NECopy.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2020 Arm Limited. + * Copyright (c) 2018-2021 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -24,30 +24,33 @@ #ifndef ARM_COMPUTE_NECOPY_H #define ARM_COMPUTE_NECOPY_H +#include "arm_compute/runtime/IFunction.h" + #include "arm_compute/core/Types.h" -#include "arm_compute/runtime/NEON/INESimpleFunctionNoBorder.h" + +#include namespace arm_compute { class ITensor; class ITensorInfo; -/** Basic function to run @ref NECopyKernel */ -class NECopy : public INESimpleFunctionNoBorder +/** Basic function to run @ref CpuCopyKernel */ +class NECopy : public IFunction { public: - /** Constructor */ - NECopy() = default; + /** Default Constructor */ + NECopy(); + /** Default Destructor */ + ~NECopy(); /** Prevent instances of this class from being copied (As this class contains pointers) */ NECopy(const NECopy &) = delete; + /** Default move constructor */ + NECopy(NECopy &&); /** Prevent instances of this class from being copied (As this class contains pointers) */ NECopy &operator=(const NECopy &) = delete; - /** Prevent instances of this class from being moved (As this class contains non movable objects) */ - NECopy(NECopy &&) = delete; - /** Prevent instances of this class from being moved (As this class contains non movable objects) */ - NECopy &operator=(NECopy &&) = delete; - /** Default destructor */ - ~NECopy(); + /** Default move assignment operator */ + NECopy &operator=(NECopy &&); /** Initialise the function's source and destination. * * @param[in] input Source tensor. Data types supported: All @@ -63,6 +66,13 @@ public: * @return a status */ static Status validate(const ITensorInfo *input, const ITensorInfo *output); + + // Inherited methods overridden + void run() override; + +private: + struct Impl; + std::unique_ptr _impl; }; } // namespace arm_compute #endif /*ARM_COMPUTE_NECOPY_H */ -- cgit v1.2.1