MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / MakeRandom

Function MakeRandom

tensorflow/lite/experimental/ruy/test.h:384–394  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

382
383template <typename Scalar>
384void 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
396template <typename Scalar>
397struct TestResult {

Callers 2

MakeLhsRhsMethod · 0.85
MakeResultPathsMethod · 0.85

Calls 5

MakeRandomVectorFunction · 0.85
VerifyConsistentFieldsFunction · 0.85
MakeLayoutFunction · 0.70
FlatSizeFunction · 0.70
dataMethod · 0.45

Tested by

no test coverage detected