| 97 | } |
| 98 | |
| 99 | void allocate_const_tensors(Graph &g) |
| 100 | { |
| 101 | for (auto &node : g.nodes()) |
| 102 | { |
| 103 | if (node != nullptr) |
| 104 | { |
| 105 | switch (node->type()) |
| 106 | { |
| 107 | case NodeType::Const: |
| 108 | case NodeType::Input: |
| 109 | allocate_all_output_tensors(*node); |
| 110 | break; |
| 111 | case NodeType::Output: |
| 112 | allocate_all_input_tensors(*node); |
| 113 | default: |
| 114 | break; |
| 115 | } |
| 116 | } |
| 117 | } |
| 118 | } |
| 119 | |
| 120 | void allocate_all_tensors(Graph &g) |
| 121 | { |
no test coverage detected