Mercurial > hg > CbC > CbC_xv6
view src/ln.h @ 222:f9169495d476
order log calc
author | tobaru |
---|---|
date | Sun, 26 Jan 2020 18:20:40 +0900 (2020-01-26) |
parents | |
children |
line wrap: on
line source
static inline int ln(int sz) { int j = 1 << 6; for (int i = 6; i < 12; i++) { if (sz < j) return i; j <<= 1; } return 12; }