| 663 | } |
| 664 | |
| 665 | int64 GetArithmeticOpsCount(const Model& model, const string& array_id) { |
| 666 | for (const auto& op : model.operators) { |
| 667 | if (!op->outputs.empty() && op->outputs[0] == array_id) { |
| 668 | int64 count; |
| 669 | if (EstimateArithmeticOpsCount(model, *op, &count)) { |
| 670 | return count; |
| 671 | } else { |
| 672 | return 0; |
| 673 | } |
| 674 | } |
| 675 | } |
| 676 | return 0; |
| 677 | } |
| 678 | |
| 679 | void InsertNode(const Model& model, const string& array_id, Node* node, |
| 680 | std::vector<string> prefixes, int64* math_ops) { |
no test coverage detected