| 6 | namespace processor { |
| 7 | namespace { |
| 8 | Status ValidateShape(const std::vector<Request>& requests) { |
| 9 | for (int i = 0; i < requests[0].inputs.size(); ++i) { |
| 10 | auto shape = requests[0].inputs[i].second.shape(); |
| 11 | for(auto it : requests) { |
| 12 | if (shape != it.inputs[i].second.shape()) { |
| 13 | return Status(error::Code::INVALID_ARGUMENT, |
| 14 | "Invalid input shapes when batched process."); |
| 15 | } |
| 16 | } |
| 17 | } |
| 18 | return Status::OK(); |
| 19 | } |
| 20 | |
| 21 | template<typename T> |
| 22 | Tensor BatchOneInput(const std::vector<Request>& requests, int index) { |
no test coverage detected