Lines Matching refs:num
15 size_t nearest_power(size_t num)
17 i_assert(num <= ((size_t)1 << (CHAR_BIT*sizeof(size_t) - 1)));
19 if (num == 0)
22 return 1UL << BITS_REQUIRED(num - 1);
28 unsigned int bits_required8(uint8_t num)
31 if (num > 0xf) { ret += 4; num >>= 4; }
32 if (num > 0x3) { ret += 2; num >>= 2; }
33 num &= ~(num>>1); /* 3->2, else unchanged */
34 return ret + num;