| 1280 | } |
| 1281 | |
| 1282 | void FixEdgeArrays(Model* model) { |
| 1283 | for (const string& output_array_name : model->flags.output_arrays()) { |
| 1284 | if (!GetOpWithOutput(*model, output_array_name)) { |
| 1285 | // Output has no operator producing it. Change that by inserting a copy. |
| 1286 | LOG(WARNING) << "Fixing constant output array " << output_array_name |
| 1287 | << " by inserting a copy. This is not optimal."; |
| 1288 | string intermediate_array_name = |
| 1289 | AvailableArrayName(*model, output_array_name + "_copy"); |
| 1290 | CloneArray(model, output_array_name, intermediate_array_name); |
| 1291 | InsertCopyOperator(model, intermediate_array_name, output_array_name); |
| 1292 | } |
| 1293 | } |
| 1294 | } |
| 1295 | |
| 1296 | void DedupeConstantArrays(Model* model, size_t min_size) { |
| 1297 | // Walk all 0..N and compare with the remaining n+1..N. |
no test coverage detected