From: 이한종/동작제어Lab(SR)/Engineer/삼성전자 Date: Mon, 3 Sep 2018 11:04:30 +0000 (+0900) Subject: [neurun] Use forward decl from Node (#2558) X-Git-Tag: 0.2~110 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=948abade36210293753b04e6e6fadf36af9b4e5a;p=platform%2Fcore%2Fml%2Fnnfw.git [neurun] Use forward decl from Node (#2558) Forward declare `LowerInfo` from `operation::Node` to reduce dependencies. Signed-off-by: Hanjoung Lee --- diff --git a/runtimes/neurun/src/graph/operation/AvgPool2D.cc b/runtimes/neurun/src/graph/operation/AvgPool2D.cc index 4f93966..ee26c72 100644 --- a/runtimes/neurun/src/graph/operation/AvgPool2D.cc +++ b/runtimes/neurun/src/graph/operation/AvgPool2D.cc @@ -3,6 +3,7 @@ #include #include "NodeVisitor.h" +#include "LowerInfo.h" namespace neurun { diff --git a/runtimes/neurun/src/graph/operation/Concat.cc b/runtimes/neurun/src/graph/operation/Concat.cc index fb39a7a..07c64d2 100644 --- a/runtimes/neurun/src/graph/operation/Concat.cc +++ b/runtimes/neurun/src/graph/operation/Concat.cc @@ -3,6 +3,7 @@ #include #include "NodeVisitor.h" +#include "LowerInfo.h" namespace neurun { diff --git a/runtimes/neurun/src/graph/operation/Conv2D.cc b/runtimes/neurun/src/graph/operation/Conv2D.cc index 64a684a..e4cd153 100644 --- a/runtimes/neurun/src/graph/operation/Conv2D.cc +++ b/runtimes/neurun/src/graph/operation/Conv2D.cc @@ -3,6 +3,7 @@ #include #include "NodeVisitor.h" +#include "LowerInfo.h" namespace neurun { diff --git a/runtimes/neurun/src/graph/operation/FullyConnected.cc b/runtimes/neurun/src/graph/operation/FullyConnected.cc index bf40fe8..052a8e6 100644 --- a/runtimes/neurun/src/graph/operation/FullyConnected.cc +++ b/runtimes/neurun/src/graph/operation/FullyConnected.cc @@ -3,6 +3,7 @@ #include #include "NodeVisitor.h" +#include "LowerInfo.h" namespace neurun { diff --git a/runtimes/neurun/src/graph/operation/MaxPool2D.cc b/runtimes/neurun/src/graph/operation/MaxPool2D.cc index 5e1bf2c..4dbd806 100644 --- a/runtimes/neurun/src/graph/operation/MaxPool2D.cc +++ b/runtimes/neurun/src/graph/operation/MaxPool2D.cc @@ -3,6 +3,7 @@ #include #include "NodeVisitor.h" +#include "LowerInfo.h" namespace neurun { diff --git a/runtimes/neurun/src/graph/operation/NOP.cc b/runtimes/neurun/src/graph/operation/NOP.cc index d335f55..9ed01b6 100644 --- a/runtimes/neurun/src/graph/operation/NOP.cc +++ b/runtimes/neurun/src/graph/operation/NOP.cc @@ -1,6 +1,7 @@ #include "NOP.h" #include "NodeVisitor.h" +#include "LowerInfo.h" namespace neurun { diff --git a/runtimes/neurun/src/graph/operation/Node.cc b/runtimes/neurun/src/graph/operation/Node.cc index ae02da2..e791bc4 100644 --- a/runtimes/neurun/src/graph/operation/Node.cc +++ b/runtimes/neurun/src/graph/operation/Node.cc @@ -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 &&lower_info) +{ + _lower_info = std::move(lower_info); +} + +const LowerInfo *Node::lower_info() const { return _lower_info.get(); } } // namespace operation } // namespace graph diff --git a/runtimes/neurun/src/graph/operation/Node.h b/runtimes/neurun/src/graph/operation/Node.h index ad20e64..a4c92ea 100644 --- a/runtimes/neurun/src/graph/operation/Node.h +++ b/runtimes/neurun/src/graph/operation/Node.h @@ -4,7 +4,6 @@ #include #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 &&lower_info) { _lower_info = std::move(lower_info); } - const LowerInfo *lower_info() const { return _lower_info.get(); } + void lower_info(std::unique_ptr &&lower_info); + const LowerInfo *lower_info() const; private: operand::IndexSet _inputs; diff --git a/runtimes/neurun/src/graph/operation/Reshape.cc b/runtimes/neurun/src/graph/operation/Reshape.cc index db0e155..a42d7d2 100644 --- a/runtimes/neurun/src/graph/operation/Reshape.cc +++ b/runtimes/neurun/src/graph/operation/Reshape.cc @@ -3,6 +3,7 @@ #include #include "NodeVisitor.h" +#include "LowerInfo.h" namespace neurun { diff --git a/runtimes/neurun/src/graph/operation/Softmax.cc b/runtimes/neurun/src/graph/operation/Softmax.cc index 913a632..e75bbdd 100644 --- a/runtimes/neurun/src/graph/operation/Softmax.cc +++ b/runtimes/neurun/src/graph/operation/Softmax.cc @@ -3,6 +3,7 @@ #include #include "NodeVisitor.h" +#include "LowerInfo.h" namespace neurun {