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

Function NumBlocks

tensorflow/lite/experimental/ruy/block_map.h:140–144  ·  view source on GitHub ↗

Returns the overall number of blocks in the BlockMap. The valid index values to pass to GetBlockByIndex are the integers from 0 to N-1 where N is the value returned here. Note that it is always true that NumBlocks == NumBlocksOfRows * NumBlocksOfCols because either rows_rectangularness_log2 or cols_rectangularness_log2 is 0.

Source from the content-addressed store, hash-verified

138// NumBlocks == NumBlocksOfRows * NumBlocksOfCols
139// because either rows_rectangularness_log2 or cols_rectangularness_log2 is 0.
140inline int NumBlocks(const BlockMap& block_map) {
141 return 1 << (2 * block_map.num_blocks_base_log2 +
142 block_map.rectangularness_log2[Side::kLhs] +
143 block_map.rectangularness_log2[Side::kRhs]);
144}
145
146} // namespace ruy
147

Callers 2

RunMethod · 0.85
TrMulFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected