MCPcopy Create free account
hub / github.com/Samsung/ONE / input_nodes

Function input_nodes

compiler/loco/src/IR/Graph.cpp:71–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69}
70
71std::vector<Node *> input_nodes(const Graph *g)
72{
73 std::map<GraphInputIndex, loco::Node *> table;
74
75 for (uint32_t n = 0; n < g->nodes()->size(); ++n)
76 {
77 auto node = g->nodes()->at(n);
78
79 if (auto service = node->dialect()->service<GraphInputIndexQueryService>())
80 {
81 if (service->associated(node))
82 {
83 auto input_index = service->index(node);
84 assert(table.find(input_index) == table.end());
85 table[input_index] = node;
86 }
87 }
88 }
89
90 std::vector<loco::Node *> res;
91
92 for (uint32_t n = 0; n < g->inputs()->size(); ++n)
93 {
94 auto it = table.find(n);
95 res.emplace_back(it == table.end() ? nullptr : it->second);
96 }
97
98 return res;
99}
100
101std::vector<loco::Node *> output_nodes(loco::Graph *g)
102{

Callers 15

get_usage_intervalMethod · 0.85
isDeadNodeMethod · 0.85
set_input_typeMethod · 0.85
canonicalize_input_typeFunction · 0.85
runMethod · 0.85
infer_while_outFunction · 0.85
visitMethod · 0.85
visitMethod · 0.85
runMethod · 0.85
compute_depthFunction · 0.85

Calls 10

sizeMethod · 0.45
nodesMethod · 0.45
atMethod · 0.45
dialectMethod · 0.45
associatedMethod · 0.45
indexMethod · 0.45
findMethod · 0.45
endMethod · 0.45
inputsMethod · 0.45
emplace_backMethod · 0.45

Tested by 2

entryFunction · 0.68
entryFunction · 0.68