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

Function GraphNodes

tensorflow/compiler/jit/encapsulate_subgraphs_pass_test.cc:712–721  ·  view source on GitHub ↗

Returns a vector of node names in 'graph', sorted by name.

Source from the content-addressed store, hash-verified

710
711// Returns a vector of node names in 'graph', sorted by name.
712std::vector<string> GraphNodes(const Graph& graph) {
713 std::vector<string> nodes;
714 for (const auto& node : graph.nodes()) {
715 if (!node->IsSource() && !node->IsSink()) {
716 nodes.push_back(node->name());
717 }
718 }
719 std::sort(nodes.begin(), nodes.end());
720 return nodes;
721}
722
723// Returns a sorted vector of (src, dst) edges in 'graph'.
724std::vector<std::pair<string, string>> GraphEdges(const Graph& graph) {

Callers 1

TESTFunction · 0.70

Calls 8

sortFunction · 0.85
IsSourceMethod · 0.80
IsSinkMethod · 0.80
nameMethod · 0.65
nodesMethod · 0.45
push_backMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected