GetFirstOpWithInput assumes that this finds the first op.
| 229 | |
| 230 | // GetFirstOpWithInput assumes that this finds the first op. |
| 231 | std::vector<std::unique_ptr<Operator>>::const_iterator FindOpWithInput( |
| 232 | const Model& model, const string& array_name) { |
| 233 | for (auto it = model.operators.begin(); it != model.operators.end(); ++it) { |
| 234 | for (auto& input : it->get()->inputs) { |
| 235 | if (input == array_name) { |
| 236 | return it; |
| 237 | } |
| 238 | } |
| 239 | } |
| 240 | return model.operators.end(); |
| 241 | } |
| 242 | |
| 243 | std::vector<std::unique_ptr<Operator>>::iterator FindOpWithInput( |
| 244 | Model& model, const string& array_name) { |
no test coverage detected