You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 lines
226 B

  1. // +build go1.9
  2. // "go1.9", from Go version 1.9 onward
  3. // See https://golang.org/pkg/go/build/#hdr-Build_Constraints
  4. package roaring
  5. import "math/bits"
  6. func popcount(x uint64) uint64 {
  7. return uint64(bits.OnesCount64(x))
  8. }