| 734 | } |
| 735 | |
| 736 | static bool AllChildVisited(Graph* graph, Node* node, std::vector<int>& visited, const std::set<Node*>& in_graph) |
| 737 | { |
| 738 | for(unsigned int i = 0; i < node->GetOutputNum(); i++) |
| 739 | { |
| 740 | NodePort* port = node->GetOutputPort(i); |
| 741 | Tensor* tensor = port->tensor; |
| 742 | |
| 743 | for(unsigned int k = 0; k < tensor->consumer.size(); k++) |
| 744 | { |
| 745 | NodePort* in_port = tensor->consumer[k]; |
| 746 | Node* child = in_port->owner; |
| 747 | if(in_graph.count(child) && !visited[child->GetNodeIndex()]) |
| 748 | return false; |
| 749 | } |
| 750 | } |
| 751 | return true; |
| 752 | } |
| 753 | |
| 754 | static bool AllInputVisited(Graph* graph, Node* node, std::vector<int>& visited, const std::set<Node*>& in_graph) |
| 755 | { |
no test coverage detected