| 74 | }; |
| 75 | |
| 76 | uint8_t log2_pot(size_t x) { |
| 77 | size_t l = 0; |
| 78 | while (x >>= 1) l++; |
| 79 | return l; |
| 80 | } |
| 81 | |
| 82 | // Convert between size tripes and a compact form fitting in 12 bits |
| 83 | // where each size, which must be a POT, is encoded as its log2, on 4 bits |
no outgoing calls
no test coverage detected