MCPcopy Create free account
hub / github.com/ai-techsystems/deepC / main

Method main

include/graph/inferType.h:73–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71public:
72 inferDataType(graph &graph) : _graph(graph) {}
73 bool main() {
74 bool inferred = bool(_graph.nNodes());
75
76 _graph.resetNodeMarks();
77
78 for (ioNode *n : _graph.inputs()) {
79 std::vector<node *> nextLevelNodes;
80 if (n->outputNodes(_graph, nextLevelNodes))
81 for (node *next : nextLevelNodes) {
82 if (next->ntype() == node::OPERATOR) {
83 inferred &= propagate(*dynamic_cast<opNode *>(next), n->dtype());
84 }
85 }
86 }
87 for (node *n : _graph) {
88 if (n->ntype() == node::OPERATOR && n->symbol() == opConstant)
89 inferred &= propagate(*dynamic_cast<opNode *>(n), n->dtype());
90 }
91
92 return inferred;
93 }
94}; // class inferDataType
95} // namespace dnnc

Callers

nothing calls this directly

Calls 7

nNodesMethod · 0.80
resetNodeMarksMethod · 0.80
inputsMethod · 0.45
outputNodesMethod · 0.45
ntypeMethod · 0.45
dtypeMethod · 0.45
symbolMethod · 0.45

Tested by

no test coverage detected