Make memset/copy functions state-less
Port following functions:
- NECopy
- NEFill
- NEPermute
- NEReshapeLayer
Signed-off-by: Georgios Pinitas <georgios.pinitas@arm.com>
Change-Id: I75f3f837012abab79c7dde9a20a34f64f75571d8
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4800
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
diff --git a/arm_compute/runtime/NEON/functions/NECopy.h b/arm_compute/runtime/NEON/functions/NECopy.h
index a58ac9e..d5f22d7 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 <memory>
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 @@
* @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> _impl;
};
} // namespace arm_compute
#endif /*ARM_COMPUTE_NECOPY_H */