IVGCVSW-3030 Make the OptimizationViews class move-assignable
authorMatteo Martincigh <matteo.martincigh@arm.com>
Thu, 9 May 2019 14:26:51 +0000 (15:26 +0100)
committerMatteo Martincigh <matteo.martincigh@arm.com>
Thu, 9 May 2019 14:52:10 +0000 (15:52 +0100)
 * Added move-constructors and move-assigment operators to
   both the OptimizationViews and Graph classes

Change-Id: I3f923dc58e849479ff6589dcd39dece2790172cb
Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com>
src/armnn/Graph.hpp
src/backends/backendsCommon/OptimizationViews.hpp

index 062d727..5c71cce 100644 (file)
@@ -87,6 +87,9 @@ public:
 
     Graph& operator=(const Graph& other) = delete;
 
+    Graph(Graph&&) = default;
+    Graph& operator=(Graph&&) = default;
+
     ~Graph()
     {
         for (auto&& layer : m_Layers)
index e1b59ed..14296f0 100644 (file)
@@ -12,6 +12,10 @@ class OptimizationViews
 {
 public:
     OptimizationViews() = default;
+    OptimizationViews(const OptimizationViews&) = delete;
+    OptimizationViews& operator=(const OptimizationViews&) = delete;
+    OptimizationViews(OptimizationViews&&) = default;
+    OptimizationViews& operator=(OptimizationViews&&) = default;
 
     struct SubstitutionPair
     {
@@ -54,4 +58,4 @@ private:
 
     Graph m_Graph;
 };
-} //namespace armnn
\ No newline at end of file
+} //namespace armnn