| 148 | } |
| 149 | |
| 150 | void Interpreter::AddSubgraphs(int subgraphs_to_add, |
| 151 | int* first_new_subgraph_index) { |
| 152 | const size_t base_index = subgraphs_.size(); |
| 153 | if (first_new_subgraph_index) *first_new_subgraph_index = base_index; |
| 154 | |
| 155 | subgraphs_.reserve(base_index + subgraphs_to_add); |
| 156 | for (int i = 0; i < subgraphs_to_add; ++i) { |
| 157 | Subgraph* subgraph = new Subgraph(error_reporter_, external_contexts_, |
| 158 | &subgraphs_, &resource_variables_); |
| 159 | subgraphs_.emplace_back(subgraph); |
| 160 | } |
| 161 | } |
| 162 | |
| 163 | TfLiteStatus Interpreter::AddNodeWithParameters( |
| 164 | const std::vector<int>& inputs, const std::vector<int>& outputs, |