| 382 | |
| 383 | template <typename Scalar> |
| 384 | void MakeRandom(int rows, int cols, Order order, Scalar zero_point, |
| 385 | LayoutStyle layout_style, RandomRange range, |
| 386 | StorageMatrix<Scalar>* storage_matrix) { |
| 387 | MakeLayout(rows, cols, order, layout_style, &storage_matrix->matrix.layout); |
| 388 | storage_matrix->matrix.zero_point = zero_point; |
| 389 | UniformRandomDistribution<Scalar> data_dist(range); |
| 390 | MakeRandomVector(&data_dist, FlatSize(storage_matrix->matrix.layout), |
| 391 | &storage_matrix->data); |
| 392 | storage_matrix->matrix.data = storage_matrix->data.data(); |
| 393 | VerifyConsistentFields(*storage_matrix); |
| 394 | } |
| 395 | |
| 396 | template <typename Scalar> |
| 397 | struct TestResult { |
no test coverage detected