comparison src/ln.h @ 265:f9169495d476

order log calc
author tobaru
date Sun, 26 Jan 2020 18:20:40 +0900
parents
children
comparison
equal deleted inserted replaced
264:00224d119299 265:f9169495d476
1 static inline int ln(int sz) {
2 int j = 1 << 6;
3 for (int i = 6; i < 12; i++) {
4 if (sz < j) return i;
5 j <<= 1;
6 }
7 return 12;
8 }
9