From f758db1561cdae831f86cca32cd1a343e3f22998 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EB=B0=95=EC=A2=85=ED=98=84/On-Device=20Lab=28SR=29/Staff?= =?utf8?q?=20Engineer/=EC=82=BC=EC=84=B1=EC=A0=84=EC=9E=90?= Date: Tue, 25 Jun 2019 12:41:26 +0900 Subject: [PATCH] [locop] Implement Forward Node Description Builder (#3957) This commit implements a dedicated node description builder for Forward nodes. Signed-off-by: Jonghyun Park --- contrib/locop/src/FormattedGraph.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/contrib/locop/src/FormattedGraph.cpp b/contrib/locop/src/FormattedGraph.cpp index 7b8761d..ad622a0 100644 --- a/contrib/locop/src/FormattedGraph.cpp +++ b/contrib/locop/src/FormattedGraph.cpp @@ -166,6 +166,15 @@ public: public: // TODO Build a node description for each canonical node + NodeDesc visit(const loco::Forward *node) final + { + NodeDesc res{opname(node)}; + + res.arg("input", symbol_lookup(*_symtbl, node->input())); + res.state(NodeDesc::State::Complete); + + return res; + } public: NodeDesc visit(const loco::Node *node) final { return default_node_desc(*_symtbl, node); } -- 2.7.4