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

Function MakeLayout

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

Source from the content-addressed store, hash-verified

342enum class LayoutStyle { kPackedLinear, kLinear };
343
344void MakeLayout(int rows, int cols, Order order, LayoutStyle layout_style,
345 Layout* layout) {
346 layout->rows = rows;
347 layout->cols = cols;
348 layout->order = order;
349
350 const int packed_stride = order == Order::kColMajor ? rows : cols;
351
352 RUY_CHECK(layout_style == LayoutStyle::kPackedLinear ||
353 layout_style == LayoutStyle::kLinear);
354 if (layout_style == LayoutStyle::kPackedLinear) {
355 layout->stride = packed_stride;
356 } else {
357 layout->stride = packed_stride + 1;
358 }
359}
360
361template <typename Scalar>
362struct StorageMatrix {

Callers 1

MakeRandomFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected