| 65 | typedef std::tuple<int32, int32> OutputAndControlEdges; |
| 66 | |
| 67 | OutputAndControlEdges CountOutputEdges(const Node* n) { |
| 68 | DCHECK_LE(n->out_edges().size(), kint32max); |
| 69 | int32_t num_output_edges = 0; |
| 70 | int32_t num_output_control_edges = 0; |
| 71 | for (auto e : n->out_edges()) { |
| 72 | if (IsSink(e->dst())) continue; |
| 73 | if (e->IsControlEdge()) { |
| 74 | ++num_output_control_edges; |
| 75 | } else { |
| 76 | ++num_output_edges; |
| 77 | } |
| 78 | } |
| 79 | return OutputAndControlEdges(num_output_edges, num_output_control_edges); |
| 80 | } |
| 81 | } // namespace |
| 82 | |
| 83 | size_t GraphView::NodeItemBytes(const Node* n) { |
no test coverage detected