MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / getNodesMap

Method getNodesMap

src/backend/common/jit/Node.cpp:25–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23namespace common {
24
25int Node::getNodesMap(Node_map_t &node_map, vector<Node *> &full_nodes,
26 vector<Node_ids> &full_ids) {
27 auto iter = node_map.find(this);
28 if (iter == node_map.end()) {
29 Node_ids ids{};
30
31 for (int i = 0; i < kMaxChildren && m_children[i] != nullptr; i++) {
32 ids.child_ids[i] =
33 m_children[i]->getNodesMap(node_map, full_nodes, full_ids);
34 }
35 ids.id = static_cast<int>(node_map.size());
36 node_map[this] = ids.id;
37 full_nodes.push_back(this);
38 full_ids.push_back(ids);
39 return ids.id;
40 }
41 return iter->second;
42}
43
44std::string getFuncName(const vector<Node *> &output_nodes,
45 const vector<int> &output_ids,

Callers 4

evalNodesFunction · 0.80
evalNodesFunction · 0.80
evalMultipleFunction · 0.80
evalNodesFunction · 0.80

Calls 1

findMethod · 0.80

Tested by

no test coverage detected