[neurun] Use forward decl from Node (#2558)
author이한종/동작제어Lab(SR)/Engineer/삼성전자 <hanjoung.lee@samsung.com>
Mon, 3 Sep 2018 11:04:30 +0000 (20:04 +0900)
committer오형석/동작제어Lab(SR)/Staff Engineer/삼성전자 <hseok82.oh@samsung.com>
Mon, 3 Sep 2018 11:04:30 +0000 (20:04 +0900)
Forward declare `LowerInfo` from `operation::Node` to reduce
dependencies.

Signed-off-by: Hanjoung Lee <hanjoung.lee@samsung.com>
runtimes/neurun/src/graph/operation/AvgPool2D.cc
runtimes/neurun/src/graph/operation/Concat.cc
runtimes/neurun/src/graph/operation/Conv2D.cc
runtimes/neurun/src/graph/operation/FullyConnected.cc
runtimes/neurun/src/graph/operation/MaxPool2D.cc
runtimes/neurun/src/graph/operation/NOP.cc
runtimes/neurun/src/graph/operation/Node.cc
runtimes/neurun/src/graph/operation/Node.h
runtimes/neurun/src/graph/operation/Reshape.cc
runtimes/neurun/src/graph/operation/Softmax.cc

index 4f93966..ee26c72 100644 (file)
@@ -3,6 +3,7 @@
 #include <cassert>
 
 #include "NodeVisitor.h"
+#include "LowerInfo.h"
 
 namespace neurun
 {
index fb39a7a..07c64d2 100644 (file)
@@ -3,6 +3,7 @@
 #include <cassert>
 
 #include "NodeVisitor.h"
+#include "LowerInfo.h"
 
 namespace neurun
 {
index 64a684a..e4cd153 100644 (file)
@@ -3,6 +3,7 @@
 #include <cassert>
 
 #include "NodeVisitor.h"
+#include "LowerInfo.h"
 
 namespace neurun
 {
index bf40fe8..052a8e6 100644 (file)
@@ -3,6 +3,7 @@
 #include <cassert>
 
 #include "NodeVisitor.h"
+#include "LowerInfo.h"
 
 namespace neurun
 {
index 5e1bf2c..4dbd806 100644 (file)
@@ -3,6 +3,7 @@
 #include <cassert>
 
 #include "NodeVisitor.h"
+#include "LowerInfo.h"
 
 namespace neurun
 {
index d335f55..9ed01b6 100644 (file)
@@ -1,6 +1,7 @@
 #include "NOP.h"
 
 #include "NodeVisitor.h"
+#include "LowerInfo.h"
 
 namespace neurun
 {
index ae02da2..e791bc4 100644 (file)
@@ -1,5 +1,7 @@
 #include "Node.h"
 
+#include "LowerInfo.h"
+
 namespace neurun
 {
 namespace graph
@@ -7,7 +9,16 @@ namespace graph
 namespace operation
 {
 
-// NO IMPLEMENTATION YET
+Node::Node() = default;
+
+Node::~Node() = default;
+
+void Node::lower_info(std::unique_ptr<LowerInfo> &&lower_info)
+{
+  _lower_info = std::move(lower_info);
+}
+
+const LowerInfo *Node::lower_info() const { return _lower_info.get(); }
 
 } // namespace operation
 } // namespace graph
index ad20e64..a4c92ea 100644 (file)
@@ -4,7 +4,6 @@
 #include <memory>
 
 #include "graph/operand/IndexSet.h"
-#include "LowerInfo.h"
 
 namespace neurun
 {
@@ -28,6 +27,10 @@ public:
   };
 
 public:
+  Node();
+  virtual ~Node();
+
+public:
   virtual void accept(NodeVisitor &&) const = 0;
 
 public:
@@ -38,8 +41,8 @@ public:
   virtual void setOutputs(const operand::IndexSet &indexes) { _outputs = indexes; }
 
 public:
-  void lower_info(std::unique_ptr<LowerInfo> &&lower_info) { _lower_info = std::move(lower_info); }
-  const LowerInfo *lower_info() const { return _lower_info.get(); }
+  void lower_info(std::unique_ptr<LowerInfo> &&lower_info);
+  const LowerInfo *lower_info() const;
 
 private:
   operand::IndexSet _inputs;
index db0e155..a42d7d2 100644 (file)
@@ -3,6 +3,7 @@
 #include <cassert>
 
 #include "NodeVisitor.h"
+#include "LowerInfo.h"
 
 namespace neurun
 {
index 913a632..e75bbdd 100644 (file)
@@ -3,6 +3,7 @@
 #include <cassert>
 
 #include "NodeVisitor.h"
+#include "LowerInfo.h"
 
 namespace neurun
 {