aboutsummaryrefslogtreecommitdiff
path: root/arm_compute
diff options
context:
space:
mode:
authorGeorgios Pinitas <georgios.pinitas@arm.com>2019-09-30 13:25:53 +0100
committerGeorgios Pinitas <georgios.pinitas@arm.com>2019-09-30 14:13:55 +0000
commit879d1313ba69d9ced8424f54ffeea6a3c60496f0 (patch)
tree6e6f4be4b9ec992a019aa4d079c844a9649ef8ed /arm_compute
parentea80348ef330bd6415ec6dae45b99873710f812a (diff)
downloadComputeLibrary-879d1313ba69d9ced8424f54ffeea6a3c60496f0.tar.gz
COMPMID-2452: Fix compilation issues on armclang
Change-Id: I41bd60760270a2c7d83e391fd9430b4513ab00bc Signed-off-by: Georgios Pinitas <georgios.pinitas@arm.com> Reviewed-on: https://review.mlplatform.org/c/2002 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute')
-rw-r--r--arm_compute/core/CPP/CPPTypes.h6
-rw-r--r--arm_compute/graph/Graph.h7
-rw-r--r--arm_compute/graph/Types.h2
-rw-r--r--arm_compute/graph/detail/CrossLayerMemoryManagerHelpers.h4
-rw-r--r--arm_compute/graph/detail/ExecutionHelpers.h4
-rw-r--r--arm_compute/runtime/IMemoryGroup.h8
-rw-r--r--arm_compute/runtime/IRuntimeContext.h2
-rw-r--r--arm_compute/runtime/ITransformWeights.h16
8 files changed, 27 insertions, 22 deletions
diff --git a/arm_compute/core/CPP/CPPTypes.h b/arm_compute/core/CPP/CPPTypes.h
index 0ac8bf6e52..87fa442672 100644
--- a/arm_compute/core/CPP/CPPTypes.h
+++ b/arm_compute/core/CPP/CPPTypes.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2018 ARM Limited.
+ * Copyright (c) 2017-2019 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -113,8 +113,8 @@ public:
*/
CPUInfo &operator=(const CPUInfo &cpuinfo) = delete;
CPUInfo(const CPUInfo &cpuinfo) = delete;
- CPUInfo &operator=(const CPUInfo &&cpuinfo) = delete;
- CPUInfo(const CPUInfo &&cpuinfo) = delete;
+ CPUInfo &operator=(CPUInfo &&cpuinfo) = default;
+ CPUInfo(CPUInfo &&cpuinfo) = default;
/** Checks if the cpu model supports fp16.
*
diff --git a/arm_compute/graph/Graph.h b/arm_compute/graph/Graph.h
index 878976f0af..92507e74e9 100644
--- a/arm_compute/graph/Graph.h
+++ b/arm_compute/graph/Graph.h
@@ -35,10 +35,13 @@
#include <map>
#include <memory>
#include <string>
-#include <thread>
#include <utility>
#include <vector>
+#ifndef BARE_METAL
+#include <thread>
+#endif /* BARE_METAL */
+
namespace arm_compute
{
namespace graph
@@ -231,7 +234,7 @@ private:
template <typename NT, typename... Ts>
inline NodeID Graph::add_node(Ts &&... args)
{
- std::lock_guard<arm_compute::Mutex> lock(_mtx);
+ arm_compute::lock_guard<arm_compute::Mutex> lock(_mtx);
// Create node
NodeID nid = _nodes.size();
diff --git a/arm_compute/graph/Types.h b/arm_compute/graph/Types.h
index 63b1c94ac8..5b82f93686 100644
--- a/arm_compute/graph/Types.h
+++ b/arm_compute/graph/Types.h
@@ -73,7 +73,7 @@ constexpr NodeID EmptyNodeID = std::numeric_limits<NodeID>::max();
constexpr EdgeID EmptyEdgeID = std::numeric_limits<EdgeID>::max();
// Forward declarations
-class TensorDescriptor;
+struct TensorDescriptor;
/** Graph configuration structure */
struct GraphConfig
{
diff --git a/arm_compute/graph/detail/CrossLayerMemoryManagerHelpers.h b/arm_compute/graph/detail/CrossLayerMemoryManagerHelpers.h
index b7424c8e88..da17806011 100644
--- a/arm_compute/graph/detail/CrossLayerMemoryManagerHelpers.h
+++ b/arm_compute/graph/detail/CrossLayerMemoryManagerHelpers.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018 ARM Limited.
+ * Copyright (c) 2018-2019 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -33,7 +33,7 @@ namespace graph
// Forward declarations
class Graph;
class GraphContext;
-class ExecutionWorkload;
+struct ExecutionWorkload;
class ITransMemoryManager;
class ITensorHandle;
diff --git a/arm_compute/graph/detail/ExecutionHelpers.h b/arm_compute/graph/detail/ExecutionHelpers.h
index fd8d082770..955e6d5e1e 100644
--- a/arm_compute/graph/detail/ExecutionHelpers.h
+++ b/arm_compute/graph/detail/ExecutionHelpers.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018 ARM Limited.
+ * Copyright (c) 2018-2019 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -33,7 +33,7 @@ namespace graph
// Forward declarations
class Graph;
class GraphContext;
-class ExecutionWorkload;
+struct ExecutionWorkload;
class Tensor;
class INode;
diff --git a/arm_compute/runtime/IMemoryGroup.h b/arm_compute/runtime/IMemoryGroup.h
index 4736acb559..540af8ba69 100644
--- a/arm_compute/runtime/IMemoryGroup.h
+++ b/arm_compute/runtime/IMemoryGroup.h
@@ -91,14 +91,6 @@ public:
{
_memory_group.acquire();
}
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- MemoryGroupResourceScope(const MemoryGroupResourceScope &) = delete;
- /** Default move constructor */
- MemoryGroupResourceScope(MemoryGroupResourceScope &&) = default;
- /** Prevent instances of this class from being copied (As this class contains pointers) */
- MemoryGroupResourceScope &operator=(const MemoryGroupResourceScope &) = delete;
- /** Default move assignment operator */
- MemoryGroupResourceScope &operator=(MemoryGroupResourceScope &&) = default;
/** Destructor */
~MemoryGroupResourceScope()
{
diff --git a/arm_compute/runtime/IRuntimeContext.h b/arm_compute/runtime/IRuntimeContext.h
index f928085682..2bca6c7677 100644
--- a/arm_compute/runtime/IRuntimeContext.h
+++ b/arm_compute/runtime/IRuntimeContext.h
@@ -29,7 +29,7 @@ namespace arm_compute
// Forward declarations
class IScheduler;
class IAssetManager;
-class DeviceProperties;
+struct DeviceProperties;
/** Context interface */
class IRuntimeContext
diff --git a/arm_compute/runtime/ITransformWeights.h b/arm_compute/runtime/ITransformWeights.h
index 6376c30088..c41df18c92 100644
--- a/arm_compute/runtime/ITransformWeights.h
+++ b/arm_compute/runtime/ITransformWeights.h
@@ -65,9 +65,20 @@ public:
/** Prevent instances of this class to be copied */
ITransformWeights &operator=(const ITransformWeights &) = delete;
/** Allow instances of this class to be move constructed */
- ITransformWeights(ITransformWeights &&) = default;
+ ITransformWeights(ITransformWeights &&other)
+ {
+ *this = std::move(other);
+ }
/** Allow instances of this class to be moved */
- ITransformWeights &operator=(ITransformWeights &&) = default;
+ ITransformWeights &operator=(ITransformWeights &&other)
+ {
+ if(this != &other)
+ {
+ _num_refcount = other._num_refcount.load();
+ _reshape_run = other._reshape_run;
+ }
+ return *this;
+ }
/** Get a pointer to the transformed weights
*
@@ -111,7 +122,6 @@ protected:
std::atomic<int32_t> _num_refcount{ 0 };
bool _reshape_run{ false };
};
-
} // arm_compute
#endif /*__ARM_COMPUTE_ITRANSFORMWEIGHTS_H__ */ \ No newline at end of file