| 71 | public: |
| 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 |
nothing calls this directly
no test coverage detected