[enco] Record ANN input/output opreands (#1227)
author박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 <jh1302.park@samsung.com>
Wed, 29 Aug 2018 04:30:11 +0000 (13:30 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Wed, 29 Aug 2018 04:30:11 +0000 (13:30 +0900)
This commit extends ann::Module class with input and output methods
which records the input and output operands of android NN model.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
contrib/enco/core/src/ANN/IR/InputList.h [new file with mode: 0644]
contrib/enco/core/src/ANN/IR/Module.h
contrib/enco/core/src/ANN/IR/OutputList.h [new file with mode: 0644]

diff --git a/contrib/enco/core/src/ANN/IR/InputList.h b/contrib/enco/core/src/ANN/IR/InputList.h
new file mode 100644 (file)
index 0000000..23de60a
--- /dev/null
@@ -0,0 +1,15 @@
+#ifndef __ANN_IR_INPUT_LIST_H__
+#define __ANN_IR_INPUT_LIST_H__
+
+#include "ANN/IR/OperandID.h"
+
+#include <vector>
+
+namespace ann
+{
+
+using InputList = std::vector<OperandID>;
+
+} // namespace ann
+
+#endif // __ANN_IR_INPUT_LIST_H__
index 181dad6..12472cb 100644 (file)
@@ -4,6 +4,8 @@
 #include "ANN/IR/WeightInventory.h"
 #include "ANN/IR/OperandInventory.h"
 #include "ANN/IR/OperationInventory.h"
+#include "ANN/IR/InputList.h"
+#include "ANN/IR/OutputList.h"
 
 namespace ann
 {
@@ -23,10 +25,18 @@ public:
   OperationInventory *operation(void) { return &_operation; }
   const OperationInventory *operation(void) const { return &_operation; }
 
+  InputList *input(void) { return &_input; }
+  const InputList *input(void) const { return &_input; }
+
+  OutputList *output(void) { return &_output; }
+  const OutputList *output(void) const { return &_output; }
+
 private:
   WeightInventory _weight;
   OperandInventory _operand;
   OperationInventory _operation;
+  InputList _input;
+  OutputList _output;
 };
 
 } // namespace ann
diff --git a/contrib/enco/core/src/ANN/IR/OutputList.h b/contrib/enco/core/src/ANN/IR/OutputList.h
new file mode 100644 (file)
index 0000000..a8881d0
--- /dev/null
@@ -0,0 +1,15 @@
+#ifndef __ANN_IR_OUTPUT_LIST_H__
+#define __ANN_IR_OUTPUT_LIST_H__
+
+#include "ANN/IR/OperandID.h"
+
+#include <vector>
+
+namespace ann
+{
+
+using OutputList = std::vector<OperandID>;
+
+} // namespace ann
+
+#endif // __ANN_IR_OUTPUT_LIST_H__