File: clz.go

package info (click to toggle)
golang-github-roaringbitmap-roaring 0.4.21-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,144 kB
  • sloc: asm: 95; makefile: 71
file content (11 lines) | stat: -rw-r--r-- 227 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
// +build go1.9
// "go1.9", from Go version 1.9 onward
// See https://golang.org/pkg/go/build/#hdr-Build_Constraints

package roaring

import "math/bits"

func countLeadingZeros(x uint64) int {
	return bits.LeadingZeros64(x)
}