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

Function Log2Ceiling

tensorflow/lite/kernels/internal/spectrogram.cc:61–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59}
60
61inline int Log2Ceiling(uint32_t n) {
62 int floor = Log2Floor(n);
63 if (n == (n & ~(n - 1))) // zero or a power of two
64 return floor;
65 else
66 return floor + 1;
67}
68
69inline uint32_t NextPowerOfTwo(uint32_t value) {
70 int exponent = Log2Ceiling(value);

Callers 1

NextPowerOfTwoFunction · 0.70

Calls 1

Log2FloorFunction · 0.70

Tested by

no test coverage detected