IVGCVSW-2405 Rename SubGraph to SubgraphView

Change-Id: Ie50aeccf053c20c3a01a75042bbc3acd824375af
Signed-off-by: Derek Lamberti <derek.lamberti@arm.com>
Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com>
diff --git a/src/backends/README.md b/src/backends/README.md
index c269ea0..90eeed2 100644
--- a/src/backends/README.md
+++ b/src/backends/README.md
@@ -116,11 +116,11 @@
     virtual IBackendContextPtr CreateBackendContext(const IRuntime::CreationOptions&) const = 0;
     virtual Optimizations GetOptimizations() const = 0;
     virtual ILayerSupportSharedPtr GetLayerSupport() const = 0;
-    virtual SubGraphUniquePtr OptimizeSubGraph(const SubGraph& subGraph, bool& optimizationAttempted) const = 0;
+    virtual SubgraphUniquePtr OptimizeSubgraph(const SubgraphView& subgraph, bool& optimizationAttempted) const = 0;
 ```
 
 Note that ```GetOptimizations()``` has been deprecated.
-The method ```OptimizeSubGraph(...)``` should be used instead to specific optimizations to a given sub-graph.
+The method ```OptimizeSubgraph(...)``` should be used instead to specific optimizations to a given sub-graph.
 
 The ArmNN framework then creates instances of the IBackendInternal interface with the help of the
 [BackendRegistry](backendsCommon/BackendRegistry.hpp) singleton.
@@ -191,7 +191,7 @@
 ## The Optimizations
 
 The backends may choose to implement backend-specific optimizations.
-This is supported through the method ```OptimizeSubGraph(...)``` to the backend interface
+This is supported through the method ```OptimizeSubgraph(...)``` to the backend interface
 that allows the backends to apply their specific optimizations to a given sub-grah.
 
 The way backends had to provide a list optimizations to the Optimizer (through the ```GetOptimizations()``` method)
diff --git a/src/backends/backendsCommon/IBackendInternal.hpp b/src/backends/backendsCommon/IBackendInternal.hpp
index 6e6d47f..108e66e 100644
--- a/src/backends/backendsCommon/IBackendInternal.hpp
+++ b/src/backends/backendsCommon/IBackendInternal.hpp
@@ -7,8 +7,8 @@
 #include <armnn/Types.hpp>
 #include <armnn/IRuntime.hpp>
 
-#include <ISubGraphConverter.hpp>
-#include <SubGraph.hpp>
+#include <ISubgraphViewConverter.hpp>
+#include <SubgraphView.hpp>
 
 #include <vector>
 
@@ -41,9 +41,9 @@
     using IMemoryManagerUniquePtr = std::unique_ptr<IMemoryManager>;
     using IMemoryManagerSharedPtr = std::shared_ptr<IMemoryManager>;
 
-    using ISubGraphConverterPtr = std::unique_ptr<ISubGraphConverter>;
+    using ISubgraphViewConverterPtr = std::unique_ptr<ISubgraphViewConverter>;
 
-    using SubGraphUniquePtr = std::unique_ptr<SubGraph>;
+    using SubgraphViewUniquePtr = std::unique_ptr<SubgraphView>;
 
     virtual IMemoryManagerUniquePtr CreateMemoryManager() const = 0;
 
@@ -52,12 +52,14 @@
 
     virtual IBackendContextPtr CreateBackendContext(const IRuntime::CreationOptions&) const = 0;
 
-    virtual ISubGraphConverterPtr CreateSubGraphConverter(const std::shared_ptr<SubGraph>& subGraph) const = 0;
+    virtual ISubgraphViewConverterPtr CreateSubgraphViewConverter(const std::shared_ptr<SubgraphView>& subgraph)
+        const = 0;
 
     virtual Optimizations GetOptimizations() const = 0;
     virtual ILayerSupportSharedPtr GetLayerSupport() const = 0;
 
-    virtual SubGraphUniquePtr OptimizeSubGraph(const SubGraph& subGraph, bool& optimizationAttempted) const = 0;
+    virtual SubgraphViewUniquePtr OptimizeSubgraphView(const SubgraphView& subgraph, bool& optimizationAttempted)
+        const = 0;
 };
 
 using IBackendInternalUniquePtr = std::unique_ptr<IBackendInternal>;
diff --git a/src/backends/cl/ClBackend.cpp b/src/backends/cl/ClBackend.cpp
index dfa5e7c..25318ec 100644
--- a/src/backends/cl/ClBackend.cpp
+++ b/src/backends/cl/ClBackend.cpp
@@ -63,10 +63,10 @@
     return IBackendContextPtr{new ClBackendContext{options}};
 }
 
-IBackendInternal::ISubGraphConverterPtr ClBackend::CreateSubGraphConverter(
-    const std::shared_ptr<SubGraph>& subGraph) const
+IBackendInternal::ISubgraphViewConverterPtr ClBackend::CreateSubgraphViewConverter(
+    const std::shared_ptr<SubgraphView>& subgraph) const
 {
-    return ISubGraphConverterPtr{};
+    return ISubgraphViewConverterPtr{};
 }
 
 IBackendInternal::Optimizations ClBackend::GetOptimizations() const
@@ -80,13 +80,13 @@
     return layerSupport;
 }
 
-IBackendInternal::SubGraphUniquePtr ClBackend::OptimizeSubGraph(const SubGraph& subGraph,
-                                                                bool& optimizationAttempted) const
+IBackendInternal::SubgraphViewUniquePtr ClBackend::OptimizeSubgraphView(const SubgraphView& subgraph,
+                                                                        bool& optimizationAttempted) const
 {
     // Not trying to optimize the given sub-graph
     optimizationAttempted = false;
 
-    return SubGraphUniquePtr{};
+    return SubgraphViewUniquePtr{};
 }
 
 } // namespace armnn
diff --git a/src/backends/cl/ClBackend.hpp b/src/backends/cl/ClBackend.hpp
index 8133ce4..e50c7e1 100644
--- a/src/backends/cl/ClBackend.hpp
+++ b/src/backends/cl/ClBackend.hpp
@@ -25,14 +25,14 @@
 
     IBackendInternal::IBackendContextPtr CreateBackendContext(const IRuntime::CreationOptions&) const override;
 
-    IBackendInternal::ISubGraphConverterPtr CreateSubGraphConverter(
-        const std::shared_ptr<SubGraph>& subGraph) const override;
+    IBackendInternal::ISubgraphViewConverterPtr CreateSubgraphViewConverter(
+        const std::shared_ptr<SubgraphView>& subgraph) const override;
 
     IBackendInternal::Optimizations GetOptimizations() const override;
     IBackendInternal::ILayerSupportSharedPtr GetLayerSupport() const override;
 
-    IBackendInternal::SubGraphUniquePtr OptimizeSubGraph(const SubGraph& subGraph,
-                                                         bool& optimizationAttempted) const override;
+    IBackendInternal::SubgraphViewUniquePtr OptimizeSubgraphView(const SubgraphView& subgraph,
+                                                                 bool& optimizationAttempted) const override;
 };
 
 } // namespace armnn
diff --git a/src/backends/neon/NeonBackend.cpp b/src/backends/neon/NeonBackend.cpp
index 830d637..096fe26 100644
--- a/src/backends/neon/NeonBackend.cpp
+++ b/src/backends/neon/NeonBackend.cpp
@@ -63,10 +63,10 @@
     return IBackendContextPtr{};
 }
 
-IBackendInternal::ISubGraphConverterPtr NeonBackend::CreateSubGraphConverter(
-    const std::shared_ptr<SubGraph>& subGraph) const
+IBackendInternal::ISubgraphViewConverterPtr NeonBackend::CreateSubgraphViewConverter(
+    const std::shared_ptr<SubgraphView>& subgraph) const
 {
-    return ISubGraphConverterPtr{};
+    return ISubgraphViewConverterPtr{};
 }
 
 IBackendInternal::Optimizations NeonBackend::GetOptimizations() const
@@ -80,13 +80,13 @@
     return layerSupport;
 }
 
-IBackendInternal::SubGraphUniquePtr NeonBackend::OptimizeSubGraph(const SubGraph& subGraph,
-                                                                  bool& optimizationAttempted) const
+IBackendInternal::SubgraphViewUniquePtr NeonBackend::OptimizeSubgraphView(const SubgraphView& subgraph,
+                                                                          bool& optimizationAttempted) const
 {
     // Not trying to optimize the given sub-graph
     optimizationAttempted = false;
 
-    return SubGraphUniquePtr{};
+    return SubgraphViewUniquePtr{};
 }
 
 } // namespace armnn
diff --git a/src/backends/neon/NeonBackend.hpp b/src/backends/neon/NeonBackend.hpp
index 6347045..a2949b1 100644
--- a/src/backends/neon/NeonBackend.hpp
+++ b/src/backends/neon/NeonBackend.hpp
@@ -25,14 +25,14 @@
 
     IBackendInternal::IBackendContextPtr CreateBackendContext(const IRuntime::CreationOptions&) const override;
 
-    IBackendInternal::ISubGraphConverterPtr CreateSubGraphConverter(
-        const std::shared_ptr<SubGraph>& subGraph) const override;
+    IBackendInternal::ISubgraphViewConverterPtr CreateSubgraphViewConverter(
+        const std::shared_ptr<SubgraphView>& subgraph) const override;
 
     IBackendInternal::Optimizations GetOptimizations() const override;
     IBackendInternal::ILayerSupportSharedPtr GetLayerSupport() const override;
 
-    IBackendInternal::SubGraphUniquePtr OptimizeSubGraph(const SubGraph& subGraph,
-                                                         bool& optimizationAttempted) const override;
+    IBackendInternal::SubgraphViewUniquePtr OptimizeSubgraphView(const SubgraphView& subgraph,
+                                                                 bool& optimizationAttempted) const override;
 };
 
 } // namespace armnn
diff --git a/src/backends/reference/RefBackend.cpp b/src/backends/reference/RefBackend.cpp
index d5f5348..006f2e7 100644
--- a/src/backends/reference/RefBackend.cpp
+++ b/src/backends/reference/RefBackend.cpp
@@ -56,10 +56,10 @@
     return IMemoryManagerUniquePtr{};
 }
 
-IBackendInternal::ISubGraphConverterPtr RefBackend::CreateSubGraphConverter(
-    const std::shared_ptr<SubGraph>& subGraph) const
+IBackendInternal::ISubgraphViewConverterPtr RefBackend::CreateSubgraphViewConverter(
+    const std::shared_ptr<SubgraphView>& subgraph) const
 {
-    return ISubGraphConverterPtr{};
+    return ISubgraphViewConverterPtr{};
 }
 
 IBackendInternal::Optimizations RefBackend::GetOptimizations() const
@@ -73,13 +73,13 @@
     return layerSupport;
 }
 
-IBackendInternal::SubGraphUniquePtr RefBackend::OptimizeSubGraph(const SubGraph& subGraph,
-                                                                 bool& optimizationAttempted) const
+IBackendInternal::SubgraphViewUniquePtr RefBackend::OptimizeSubgraphView(const SubgraphView& subgraph,
+                                                                         bool& optimizationAttempted) const
 {
     // Not trying to optimize the given sub-graph
     optimizationAttempted = false;
 
-    return SubGraphUniquePtr{};
+    return SubgraphViewUniquePtr{};
 }
 
 } // namespace armnn
diff --git a/src/backends/reference/RefBackend.hpp b/src/backends/reference/RefBackend.hpp
index 6305bf5..8658e1a 100644
--- a/src/backends/reference/RefBackend.hpp
+++ b/src/backends/reference/RefBackend.hpp
@@ -25,14 +25,14 @@
 
     IBackendInternal::IBackendContextPtr CreateBackendContext(const IRuntime::CreationOptions&) const override;
 
-    IBackendInternal::ISubGraphConverterPtr CreateSubGraphConverter(
-        const std::shared_ptr<SubGraph>& subGraph) const override;
+    IBackendInternal::ISubgraphViewConverterPtr CreateSubgraphViewConverter(
+        const std::shared_ptr<SubgraphView>& subgraph) const override;
 
     IBackendInternal::Optimizations GetOptimizations() const override;
     IBackendInternal::ILayerSupportSharedPtr GetLayerSupport() const override;
 
-    IBackendInternal::SubGraphUniquePtr OptimizeSubGraph(const SubGraph& subGraph,
-                                                         bool& optimizationAttempted) const override;
+    IBackendInternal::SubgraphViewUniquePtr OptimizeSubgraphView(const SubgraphView& subgraph,
+                                                                 bool& optimizationAttempted) const override;
 };
 
 } // namespace armnn