1 |
package roaring64
|
|
2 |
|
|
3 |
import "github.com/RoaringBitmap/roaring" |
|
4 |
|
|
|
func highbits(x uint64) uint32 { |
333,917,882✔ |
|
return uint32(x >> 32) |
333,917,882✔ |
|
} |
333,917,882✔ |
8 |
|
|
|
func lowbits(x uint64) uint32 { |
262,614,045✔ |
|
return uint32(x & maxLowBit) |
262,614,045✔ |
|
} |
262,614,045✔ |
12 |
|
|
13 |
const maxLowBit = roaring.MaxUint32
|
|
14 |
const MaxUint32 = roaring.MaxUint32
|
|
15 |
|
|
|
func minOfInt(a, b int) int { |
× |
|
if a < b {
|
× |
|
return a
|
× |
|
} |
× |
|
return b
|
× |
21 |
} |
|
22 |
|
|
|
func maxOfInt(a, b int) int { |
× |
|
if a > b {
|
× |
|
return a
|
× |
|
} |
× |
|
return b
|
× |
28 |
} |
|
29 |
|
|
|
func maxOfUint32(a, b uint32) uint32 { |
104✔ |
|
if a > b {
|
104✔ |
|
return a
|
× |
|
} |
× |
|
return b
|
104✔ |
35 |
} |
|
36 |
|
|
|
func minOfUint32(a, b uint32) uint32 { |
104✔ |
|
if a < b {
|
104✔ |
|
return a
|
× |
|
} |
× |
|
return b
|
104✔ |
42 |
} |