| 19 | std::chrono::duration<double, std::milli>* nmsTime); |
| 20 | |
| 21 | bool TryPositiveInt64ToInt(int64_t value, int* out) |
| 22 | { |
| 23 | if (!out || value <= 0 || |
| 24 | value > static_cast<int64_t>(std::numeric_limits<int>::max())) |
| 25 | { |
| 26 | return false; |
| 27 | } |
| 28 | |
| 29 | *out = static_cast<int>(value); |
| 30 | return true; |
| 31 | } |
| 32 | |
| 33 | bool ExtractRowsCols(const std::vector<int64_t>& shape, int* rows, int* cols) |
| 34 | { |