MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / CountOutputEdges

Function CountOutputEdges

tensorflow/core/common_runtime/graph_view.cc:67–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65typedef std::tuple<int32, int32> OutputAndControlEdges;
66
67OutputAndControlEdges 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
83size_t GraphView::NodeItemBytes(const Node* n) {

Callers 2

NodeItemBytesMethod · 0.85
InitializeNodeMethod · 0.85

Calls 4

IsSinkFunction · 0.85
sizeMethod · 0.45
dstMethod · 0.45
IsControlEdgeMethod · 0.45

Tested by

no test coverage detected