From cb3fab422820102b68234ab013de614afeb62eab Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EC=9D=B4=ED=95=9C=EC=A2=85/=EB=8F=99=EC=9E=91=EC=A0=9C?= =?utf8?q?=EC=96=B4Lab=28SR=29/Engineer/=EC=82=BC=EC=84=B1=EC=A0=84?= =?utf8?q?=EC=9E=90?= Date: Thu, 6 Sep 2018 19:23:56 +0900 Subject: [PATCH] [neurun] Add LowerInfo to operand::Object (#2628) Add LowerInfo to operand::Object as a member. Signed-off-by: Hanjoung Lee --- runtimes/neurun/src/graph/operand/Object.cc | 7 +++++++ runtimes/neurun/src/graph/operand/Object.h | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/runtimes/neurun/src/graph/operand/Object.cc b/runtimes/neurun/src/graph/operand/Object.cc index 625cb78..76ac719 100644 --- a/runtimes/neurun/src/graph/operand/Object.cc +++ b/runtimes/neurun/src/graph/operand/Object.cc @@ -89,6 +89,13 @@ void Object::removeDef(const ::neurun::graph::operation::Index &idx) _def.remove(idx); } +void Object::lower_info(std::unique_ptr &&lower_info) +{ + _lower_info = std::move(lower_info); +} + +const LowerInfo *Object::lower_info() const { return _lower_info.get(); } + } // namespace operand } // namespace graph } // namespace neurun diff --git a/runtimes/neurun/src/graph/operand/Object.h b/runtimes/neurun/src/graph/operand/Object.h index 59110fd..e0bbe2a 100644 --- a/runtimes/neurun/src/graph/operand/Object.h +++ b/runtimes/neurun/src/graph/operand/Object.h @@ -9,6 +9,7 @@ #include "Shape.h" #include "Data.h" #include "TypeInfo.h" +#include "LowerInfo.h" #include "graph/operation/IndexList.h" namespace neurun @@ -76,6 +77,10 @@ public: return *(reinterpret_cast(_data->base())); } +public: + void lower_info(std::unique_ptr &&lower_info); + const LowerInfo *lower_info() const; + private: const Shape _shape; const TypeInfo _type; @@ -84,6 +89,8 @@ private: operation::IndexList _uses; operation::IndexList _def; // size is 0 (constant) or 1 (from def operation) + + std::unique_ptr _lower_info; }; } // namespace operand -- 2.7.4