aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichele Di Giorgio <michele.digiorgio@arm.com>2021-05-13 12:54:31 +0100
committerSheri Zhang <sheri.zhang@arm.com>2021-05-13 17:15:03 +0000
commit13c497a8a9a4aa9353719afe53ccc7db50da74fe (patch)
treeba5d7fff737c32641f0a813ba3bcc16058006aa9
parent7f8caf770417574a874d53733718f1b7052456fe (diff)
downloadComputeLibrary-13c497a8a9a4aa9353719afe53ccc7db50da74fe.tar.gz
Fix Macros.h include in NEScale
Remove Macros.h from arm_compute and avoid use of headers from src inside files in the public interface. Resolves: COMPMID-4525 Change-Id: I58b1b46896d366078cc9df7a0e36d5878064051d Signed-off-by: Michele Di Giorgio <michele.digiorgio@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5641 Reviewed-by: Michalis Spyrou <michalis.spyrou@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com>
-rw-r--r--arm_compute/runtime/Macros.h33
-rw-r--r--arm_compute/runtime/NEON/functions/NELogical.h28
-rw-r--r--arm_compute/runtime/NEON/functions/NEScale.h14
-rw-r--r--src/runtime/NEON/functions/NELogical.cpp9
4 files changed, 37 insertions, 47 deletions
diff --git a/arm_compute/runtime/Macros.h b/arm_compute/runtime/Macros.h
deleted file mode 100644
index aa019d104b..0000000000
--- a/arm_compute/runtime/Macros.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (c) 2020 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_MACROS_H
-#define ARM_COMPUTE_MACROS_H
-
-#define ARM_COMPUTE_DISALLOW_COPY_ALLOW_MOVE_INC(TypeName) \
- TypeName(const TypeName &) = delete; \
- TypeName &operator=(const TypeName &) = delete; \
- TypeName(TypeName &&) = default; \
- TypeName &operator =(TypeName &&);
-
-#endif /* ARM_COMPUTE_MACROS_H */
diff --git a/arm_compute/runtime/NEON/functions/NELogical.h b/arm_compute/runtime/NEON/functions/NELogical.h
index 5cf5336f4f..0ad23200c6 100644
--- a/arm_compute/runtime/NEON/functions/NELogical.h
+++ b/arm_compute/runtime/NEON/functions/NELogical.h
@@ -26,7 +26,6 @@
#include "arm_compute/core/Error.h"
#include "arm_compute/runtime/IFunction.h"
-#include "arm_compute/runtime/Macros.h"
#include <memory>
@@ -42,9 +41,16 @@ class NELogicalAnd : public IFunction
public:
/** Constructor */
NELogicalAnd();
+ /** Prevent instances of this class from being copied (As this class contains pointers) */
+ NELogicalAnd(const NELogicalAnd &) = delete;
+ /** Prevent instances of this class from being moved (As this class contains non movable objects) */
+ NELogicalAnd(NELogicalAnd &&) = delete;
+ /** Prevent instances of this class from being copied (As this class contains pointers) */
+ NELogicalAnd &operator=(const NELogicalAnd &) = delete;
+ /** Prevent instances of this class from being moved (As this class contains non movable objects) */
+ NELogicalAnd &operator=(NELogicalAnd &&) = delete;
/** Destructor */
~NELogicalAnd();
- ARM_COMPUTE_DISALLOW_COPY_ALLOW_MOVE_INC(NELogicalAnd)
/** Initialise the kernel's inputs and output
*
@@ -85,9 +91,16 @@ class NELogicalOr : public IFunction
public:
/** Constructor */
NELogicalOr();
+ /** Prevent instances of this class from being copied (As this class contains pointers) */
+ NELogicalOr(const NELogicalOr &) = delete;
+ /** Prevent instances of this class from being moved (As this class contains non movable objects) */
+ NELogicalOr(NELogicalOr &&) = delete;
+ /** Prevent instances of this class from being copied (As this class contains pointers) */
+ NELogicalOr &operator=(const NELogicalOr &) = delete;
+ /** Prevent instances of this class from being moved (As this class contains non movable objects) */
+ NELogicalOr &operator=(NELogicalOr &&) = delete;
/** Destructor */
~NELogicalOr();
- ARM_COMPUTE_DISALLOW_COPY_ALLOW_MOVE_INC(NELogicalOr)
/** Initialise the kernel's inputs and output
*
@@ -128,9 +141,16 @@ class NELogicalNot : public IFunction
public:
/** Constructor */
NELogicalNot();
+ /** Prevent instances of this class from being copied (As this class contains pointers) */
+ NELogicalNot(const NELogicalNot &) = delete;
+ /** Prevent instances of this class from being moved (As this class contains non movable objects) */
+ NELogicalNot(NELogicalNot &&) = delete;
+ /** Prevent instances of this class from being copied (As this class contains pointers) */
+ NELogicalNot &operator=(const NELogicalNot &) = delete;
+ /** Prevent instances of this class from being moved (As this class contains non movable objects) */
+ NELogicalNot &operator=(NELogicalNot &&) = delete;
/** Destructor */
~NELogicalNot();
- ARM_COMPUTE_DISALLOW_COPY_ALLOW_MOVE_INC(NELogicalNot)
/** Initialise the kernel's inputs and output
*
diff --git a/arm_compute/runtime/NEON/functions/NEScale.h b/arm_compute/runtime/NEON/functions/NEScale.h
index 233ee2969e..0b7dddacb2 100644
--- a/arm_compute/runtime/NEON/functions/NEScale.h
+++ b/arm_compute/runtime/NEON/functions/NEScale.h
@@ -28,7 +28,6 @@
#include "arm_compute/core/KernelDescriptors.h"
#include "arm_compute/core/Types.h"
-#include "src/core/common/Macros.h"
#include <memory>
@@ -41,11 +40,18 @@ class ITensorInfo;
class NEScale : public IFunction
{
public:
- /** Default Constructor */
+ /** Constructor */
NEScale();
- /** Default Destructor */
+ /** Prevent instances of this class from being copied (As this class contains pointers) */
+ NEScale(const NEScale &) = delete;
+ /** Prevent instances of this class from being moved (As this class contains non movable objects) */
+ NEScale(NEScale &&) = delete;
+ /** Prevent instances of this class from being copied (As this class contains pointers) */
+ NEScale &operator=(const NEScale &) = delete;
+ /** Prevent instances of this class from being moved (As this class contains non movable objects) */
+ NEScale &operator=(NEScale &&) = delete;
+ /** Destructor */
~NEScale();
- ARM_COMPUTE_DISALLOW_COPY_ALLOW_MOVE(NEScale);
/** Initialize the function's source, destination, interpolation type and border_mode.
*
* Valid data layouts:
diff --git a/src/runtime/NEON/functions/NELogical.cpp b/src/runtime/NEON/functions/NELogical.cpp
index 674ba40fcd..171d84da19 100644
--- a/src/runtime/NEON/functions/NELogical.cpp
+++ b/src/runtime/NEON/functions/NELogical.cpp
@@ -42,8 +42,7 @@ NELogicalAnd::NELogicalAnd()
: _impl(std::make_unique<Impl>())
{
}
-NELogicalAnd &NELogicalAnd::operator=(NELogicalAnd &&) = default;
-NELogicalAnd::~NELogicalAnd() = default;
+NELogicalAnd::~NELogicalAnd() = default;
void NELogicalAnd::configure(const ITensor *input1, const ITensor *input2, ITensor *output)
{
@@ -75,8 +74,7 @@ NELogicalOr::NELogicalOr()
: _impl(std::make_unique<Impl>())
{
}
-NELogicalOr &NELogicalOr::operator=(NELogicalOr &&) = default;
-NELogicalOr::~NELogicalOr() = default;
+NELogicalOr::~NELogicalOr() = default;
void NELogicalOr::configure(const ITensor *input1, const ITensor *input2, ITensor *output)
{
@@ -108,8 +106,7 @@ NELogicalNot::NELogicalNot()
: _impl(std::make_unique<Impl>())
{
}
-NELogicalNot &NELogicalNot::operator=(NELogicalNot &&) = default;
-NELogicalNot::~NELogicalNot() = default;
+NELogicalNot::~NELogicalNot() = default;
void NELogicalNot::configure(const ITensor *input, ITensor *output)
{