[Pure CL] Allow iteration over NNAPI operands (#1471)
author박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 <jh1302.park@samsung.com>
Thu, 31 May 2018 06:21:59 +0000 (15:21 +0900)
committer서상민/동작제어Lab(SR)/Staff Engineer/삼성전자 <sangmin7.seo@samsung.com>
Thu, 31 May 2018 06:21:59 +0000 (15:21 +0900)
This commit introduces iterate method which allows users to iterate over
registered NNAPI operands.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
runtimes/pure_arm_compute/src/internal/Model.h

index 38c35fa..e51ebb1 100644 (file)
@@ -179,6 +179,16 @@ namespace operand
 class Set
 {
 public:
+  void iterate(const std::function<void(const Index &)> &fn)
+  {
+    for (uint32_t n = 0; n < _objects.size(); ++n)
+    {
+      const Index operand_index{static_cast<int>(n)};
+      fn(operand_index);
+    }
+  }
+
+public:
   Index append(const Shape &);
 
 public: