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

Function VerifyConsistentFields

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

Source from the content-addressed store, hash-verified

369
370template <typename Scalar>
371void VerifyConsistentFields(const StorageMatrix<Scalar>& storage_matrix) {
372 if (storage_matrix.data.empty()) {
373 RUY_CHECK_EQ(storage_matrix.matrix.data.get(), nullptr);
374 RUY_CHECK_EQ(storage_matrix.matrix.layout.rows, 0);
375 RUY_CHECK_EQ(storage_matrix.matrix.layout.cols, 0);
376 } else {
377 RUY_CHECK_EQ(storage_matrix.matrix.data.get(), storage_matrix.data.data());
378 RUY_CHECK_EQ(FlatSize(storage_matrix.matrix.layout),
379 storage_matrix.data.size());
380 }
381}
382
383template <typename Scalar>
384void MakeRandom(int rows, int cols, Order order, Scalar zero_point,

Callers 2

MakeRandomFunction · 0.85
AgreeFunction · 0.85

Calls 5

FlatSizeFunction · 0.70
emptyMethod · 0.45
getMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected