| 747 | } |
| 748 | |
| 749 | int RequiredBufferSizeForShape(const Shape& shape) { |
| 750 | CheckValidShape(shape); |
| 751 | int max_offset = 1; |
| 752 | for (const auto& dim : shape.dims()) { |
| 753 | max_offset *= dim; |
| 754 | } |
| 755 | return max_offset; |
| 756 | } |
| 757 | |
| 758 | bool IsConstantParameterArray(const Model& model, const string& name) { |
| 759 | if (!model.HasArray(name)) { |
no test coverage detected