| 1287 | |
| 1288 | template <typename TestSetType> |
| 1289 | void AnalyzeTestError(const TestSetType& test_set, int first_bad_result_index, |
| 1290 | ErrorAnalysis* error_analysis) { |
| 1291 | const auto& good_matrix = test_set.results[0]->storage_matrix.matrix; |
| 1292 | const auto& bad_matrix = |
| 1293 | test_set.results[first_bad_result_index]->storage_matrix.matrix; |
| 1294 | GetMatrixStats(good_matrix, &error_analysis->stats_good); |
| 1295 | GetMatrixStats(bad_matrix, &error_analysis->stats_bad); |
| 1296 | bool found_first_error = false; |
| 1297 | for (int row = 0; row < good_matrix.layout.rows; row++) { |
| 1298 | for (int col = 0; col < good_matrix.layout.cols; col++) { |
| 1299 | if (Element(good_matrix, row, col) != Element(bad_matrix, row, col)) { |
| 1300 | if (!found_first_error) { |
| 1301 | found_first_error = true; |
| 1302 | error_analysis->row_of_first_error = row; |
| 1303 | error_analysis->col_of_first_error = col; |
| 1304 | error_analysis->first_error_good_value = |
| 1305 | Element(good_matrix, row, col); |
| 1306 | error_analysis->first_error_bad_value = Element(bad_matrix, row, col); |
| 1307 | } |
| 1308 | error_analysis->error_rows.insert(row); |
| 1309 | error_analysis->error_cols.insert(col); |
| 1310 | } |
| 1311 | } |
| 1312 | } |
| 1313 | } |
| 1314 | |
| 1315 | template <typename LhsScalar, typename RhsScalar, typename SpecType> |
| 1316 | void ComputeAccumRangeBeforeMultiplier( |
no test coverage detected