(n)
| 805 | // Returns the number of ones in the binary representation of the decimal |
| 806 | // number. |
| 807 | function countBinaryOnes(n) { |
| 808 | // Count the number of bits set in parallel, which is faster than looping |
| 809 | n = n - ((n >>> 1) & 0x55555555); |
| 810 | n = (n & 0x33333333) + ((n >>> 2) & 0x33333333); |
| 811 | return ((n + (n >>> 4) & 0xF0F0F0F) * 0x1010101) >>> 24; |
| 812 | } |
| 813 | |
| 814 | function getCIDR(address, netmask, family) { |
| 815 | let ones = 0; |
no outgoing calls
no test coverage detected
searching dependent graphs…