| 156 | } |
| 157 | |
| 158 | bool DeleteArrayIfUnused(const string& array_name, Model* model) { |
| 159 | if (IsDiscardableArray(*model, array_name) && |
| 160 | CountOpsWithInput(*model, array_name) == 0 && |
| 161 | GetOpWithOutput(*model, array_name) == nullptr) { |
| 162 | model->EraseArray(array_name); |
| 163 | return true; |
| 164 | } |
| 165 | return false; |
| 166 | } |
| 167 | |
| 168 | bool DeleteArrayIfUnusedOutsideOfOp(const string& array_name, |
| 169 | const Operator* op, Model* model) { |
no test coverage detected