| 76 | namespace { |
| 77 | |
| 78 | int floor_log2_quotient(int num, int denom) { |
| 79 | if (num <= denom) { |
| 80 | return 0; |
| 81 | } |
| 82 | int log2_quotient = floor_log2(num) - ceil_log2(denom); |
| 83 | if ((denom << (log2_quotient + 1)) <= num) { |
| 84 | log2_quotient++; |
| 85 | } |
| 86 | return log2_quotient; |
| 87 | } |
| 88 | |
| 89 | } // namespace |
| 90 |
no test coverage detected