ArmNN
 22.08
GraphUtils.hpp
Go to the documentation of this file.
1 //
2 // Copyright © 2017 Arm Ltd and Contributors. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 #pragma once
6 
7 #include <Graph.hpp>
8 
9 #include <string>
10 
11 
12 bool GraphHasNamedLayer(const armnn::Graph& graph, const std::string& name);
13 
14 armnn::Layer* GetFirstLayerWithName(armnn::Graph& graph, const std::string& name);
15 
16 bool CheckNumberOfInputSlot(armnn::Layer* layer, unsigned int num);
17 
18 bool CheckNumberOfOutputSlot(armnn::Layer* layer, unsigned int num);
19 
20 bool IsConnected(armnn::Layer* srcLayer, armnn::Layer* destLayer,
21  unsigned int srcSlot, unsigned int destSlot,
22  const armnn::TensorInfo& expectedTensorInfo);
23 
24 bool CheckOrder(const armnn::Graph& graph, const armnn::Layer* first, const armnn::Layer* second);
25 
bool CheckOrder(const armnn::Graph &graph, const armnn::Layer *first, const armnn::Layer *second)
Checks that first comes before second in the order.
Definition: GraphUtils.cpp:68
armnn::Layer * GetFirstLayerWithName(armnn::Graph &graph, const std::string &name)
Definition: GraphUtils.cpp:22
bool IsConnected(armnn::Layer *srcLayer, armnn::Layer *destLayer, unsigned int srcSlot, unsigned int destSlot, const armnn::TensorInfo &expectedTensorInfo)
Definition: GraphUtils.cpp:44
bool GraphHasNamedLayer(const armnn::Graph &graph, const std::string &name)
Definition: GraphUtils.cpp:10
bool CheckNumberOfOutputSlot(armnn::Layer *layer, unsigned int num)
Definition: GraphUtils.cpp:39
bool CheckNumberOfInputSlot(armnn::Layer *layer, unsigned int num)
Definition: GraphUtils.cpp:34