| 134 | void validate_feature_block(const std::vector<float> &features, int64_t patches, |
| 135 | int64_t patch_elems, const char *label) { |
| 136 | if (patches < 0) { |
| 137 | throw std::runtime_error(std::string("VoxCPM2 ") + label + |
| 138 | " patch count is negative"); |
| 139 | } |
| 140 | if (static_cast<int64_t>(features.size()) != patches * patch_elems) { |
| 141 | throw std::runtime_error(std::string("VoxCPM2 ") + label + |
| 142 | " feature size mismatch"); |
| 143 | } |
| 144 | } |
| 145 |
no test coverage detected