aboutsummaryrefslogtreecommitdiff
path: root/src/armnn/SubgraphView.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/armnn/SubgraphView.hpp')
-rw-r--r--src/armnn/SubgraphView.hpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/armnn/SubgraphView.hpp b/src/armnn/SubgraphView.hpp
index d86f1c1c93..f29e0a18ae 100644
--- a/src/armnn/SubgraphView.hpp
+++ b/src/armnn/SubgraphView.hpp
@@ -23,6 +23,17 @@ namespace armnn
class SubgraphView final
{
public:
+ template <typename Func>
+ void ForEachLayer(Func func) const
+ {
+ for (auto it = m_Layers.begin(); it != m_Layers.end(); )
+ {
+ auto next = std::next(it);
+ func(*it);
+ it = next;
+ }
+ }
+
using SubgraphViewPtr = std::unique_ptr<SubgraphView>;
using InputSlots = std::vector<InputSlot*>;
using OutputSlots = std::vector<OutputSlot*>;