| 72 | if (!condition) { |
| 73 | throw std::runtime_error(message); |
| 74 | } |
| 75 | } |
| 76 | |
| 77 | void require_shape_equal( |
| 78 | const std::vector<int64_t> & actual, |
| 79 | const std::vector<int64_t> & expected, |
| 80 | const std::string & label) { |
| 81 | if (actual != expected) { |
| 82 | std::ostringstream oss; |
| 83 | oss << label << " shape mismatch"; |
| 84 | throw std::runtime_error(oss.str()); |
| 85 | } |
| 86 | } |
no test coverage detected