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

Function GetThreadCount

tensorflow/lite/experimental/ruy/trmul.cc:247–253  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

245}
246
247int GetThreadCount(Context* context, int rows, int cols, int depth) {
248 // Empirically determined rule for reasonable number of
249 // threads to use. This is proportional to the number of arithmetic ops
250 // in this Mul (product of the 3 sizes).
251 int guess = (std::uint64_t(rows) * cols * depth) >> 13;
252 return clamp(guess, 1, context->max_num_threads);
253}
254
255LoopStructure GetLoopStructure(int thread_count, int rows, int cols, int depth,
256 int cache_friendly_traversal_threshold) {

Callers 1

TrMulFunction · 0.85

Calls 1

clampFunction · 0.70

Tested by

no test coverage detected