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

Function floor_log2

tensorflow/lite/experimental/ruy/size_util.h:27–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25namespace ruy {
26
27inline int floor_log2(int n) {
28 RUY_DCHECK_GE(n, 1);
29#ifdef _WIN32
30 unsigned long result; // NOLINT[runtime/int]
31 _BitScanReverse(&result, n);
32 return result;
33#else
34 return 31 - __builtin_clz(n);
35#endif
36}
37
38inline int ceil_log2(int n) {
39 RUY_DCHECK_GE(n, 1);

Callers 4

ceil_log2Function · 0.85
round_down_potFunction · 0.85
floor_log2_quotientFunction · 0.85
MakeBlockMapFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected