[neurun] Add LowerInfo to operand::Object (#2628)
author이한종/동작제어Lab(SR)/Engineer/삼성전자 <hanjoung.lee@samsung.com>
Thu, 6 Sep 2018 10:23:56 +0000 (19:23 +0900)
committer박세희/동작제어Lab(SR)/Principal Engineer/삼성전자 <saehie.park@samsung.com>
Thu, 6 Sep 2018 10:23:56 +0000 (19:23 +0900)
Add LowerInfo to operand::Object as a member.

Signed-off-by: Hanjoung Lee <hanjoung.lee@samsung.com>
runtimes/neurun/src/graph/operand/Object.cc
runtimes/neurun/src/graph/operand/Object.h

index 625cb78..76ac719 100644 (file)
@@ -89,6 +89,13 @@ void Object::removeDef(const ::neurun::graph::operation::Index &idx)
   _def.remove(idx);
 }
 
+void Object::lower_info(std::unique_ptr<LowerInfo> &&lower_info)
+{
+  _lower_info = std::move(lower_info);
+}
+
+const LowerInfo *Object::lower_info() const { return _lower_info.get(); }
+
 } // namespace operand
 } // namespace graph
 } // namespace neurun
index 59110fd..e0bbe2a 100644 (file)
@@ -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<const T *>(_data->base()));
   }
 
+public:
+  void lower_info(std::unique_ptr<LowerInfo> &&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<LowerInfo> _lower_info;
 };
 
 } // namespace operand