ComputeHLLValue compute hll value based on hash value
(hash uint64)
| 23 | |
| 24 | // ComputeHLLValue compute hll value based on hash value |
| 25 | func ComputeHLLValue(hash uint64) uint32 { |
| 26 | group := uint32(hash & ((1 << groupBits) - 1)) |
| 27 | var rho uint32 |
| 28 | for { |
| 29 | h := hash & (1 << (rho + groupBits)) |
| 30 | if rho+groupBits < 64 && h == 0 { |
| 31 | rho++ |
| 32 | } else { |
| 33 | break |
| 34 | } |
| 35 | } |
| 36 | return rho<<maxGroupBits | group |
| 37 | } |
no outgoing calls
no test coverage detected