mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-04 03:59:07 -05:00
Bumps [github.com/blevesearch/bleve/v2](https://github.com/blevesearch/bleve) from 2.3.7 to 2.3.9. - [Release notes](https://github.com/blevesearch/bleve/releases) - [Commits](https://github.com/blevesearch/bleve/compare/v2.3.7...v2.3.9) --- updated-dependencies: - dependency-name: github.com/blevesearch/bleve/v2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
19 lines
532 B
Go
19 lines
532 B
Go
//go:build !go1.9
|
|
// +build !go1.9
|
|
|
|
package roaring
|
|
|
|
// bit population count, take from
|
|
// https://code.google.com/p/go/issues/detail?id=4988#c11
|
|
// credit: https://code.google.com/u/arnehormann/
|
|
// credit: https://play.golang.org/p/U7SogJ7psJ
|
|
// credit: http://graphics.stanford.edu/~seander/bithacks.html#CountBitsSetParallel
|
|
func popcount(x uint64) uint64 {
|
|
x -= (x >> 1) & 0x5555555555555555
|
|
x = (x>>2)&0x3333333333333333 + x&0x3333333333333333
|
|
x += x >> 4
|
|
x &= 0x0f0f0f0f0f0f0f0f
|
|
x *= 0x0101010101010101
|
|
return x >> 56
|
|
}
|