From c674963090207eb56a52ecf12ed26882d04c5bc2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EB=B0=95=EC=A2=85=ED=98=84/=EB=8F=99=EC=9E=91=EC=A0=9C?= =?utf8?q?=EC=96=B4Lab=28SR=29/Staff=20Engineer/=EC=82=BC=EC=84=B1?= =?utf8?q?=EC=A0=84=EC=9E=90?= Date: Thu, 31 May 2018 15:21:59 +0900 Subject: [PATCH] [Pure CL] Allow iteration over NNAPI operands (#1471) This commit introduces iterate method which allows users to iterate over registered NNAPI operands. Signed-off-by: Jonghyun Park --- runtimes/pure_arm_compute/src/internal/Model.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/runtimes/pure_arm_compute/src/internal/Model.h b/runtimes/pure_arm_compute/src/internal/Model.h index 38c35fa..e51ebb1 100644 --- a/runtimes/pure_arm_compute/src/internal/Model.h +++ b/runtimes/pure_arm_compute/src/internal/Model.h @@ -179,6 +179,16 @@ namespace operand class Set { public: + void iterate(const std::function &fn) + { + for (uint32_t n = 0; n < _objects.size(); ++n) + { + const Index operand_index{static_cast(n)}; + fn(operand_index); + } + } + +public: Index append(const Shape &); public: -- 2.7.4