summaryrefslogtreecommitdiff
path: root/vendor/github.com/bits-and-blooms/bitset/popcnt_19.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-06-03 17:57:25 +0200
committerGitHub <noreply@github.com>2021-06-03 17:57:25 +0200
commit0f8ec8e366ce77c3309c560e471cc957851e1cf1 (patch)
treef55eeb7087c5273dd7ba5a35cc600133f969eda9 /vendor/github.com/bits-and-blooms/bitset/popcnt_19.go
parent251f5b8d75688d7f302616fa4260084709680eb2 (diff)
parentb36278c3ef8f1db76e337e18f2cd06fe51348a19 (diff)
downloadpodman-0f8ec8e366ce77c3309c560e471cc957851e1cf1.tar.gz
podman-0f8ec8e366ce77c3309c560e471cc957851e1cf1.tar.bz2
podman-0f8ec8e366ce77c3309c560e471cc957851e1cf1.zip
Merge pull request #10543 from containers/dependabot/go_modules/github.com/opencontainers/selinux-1.8.2
Bump github.com/opencontainers/selinux from 1.8.1 to 1.8.2
Diffstat (limited to 'vendor/github.com/bits-and-blooms/bitset/popcnt_19.go')
-rw-r--r--vendor/github.com/bits-and-blooms/bitset/popcnt_19.go45
1 files changed, 45 insertions, 0 deletions
diff --git a/vendor/github.com/bits-and-blooms/bitset/popcnt_19.go b/vendor/github.com/bits-and-blooms/bitset/popcnt_19.go
new file mode 100644
index 000000000..fc8ff4f36
--- /dev/null
+++ b/vendor/github.com/bits-and-blooms/bitset/popcnt_19.go
@@ -0,0 +1,45 @@
+// +build go1.9
+
+package bitset
+
+import "math/bits"
+
+func popcntSlice(s []uint64) uint64 {
+ var cnt int
+ for _, x := range s {
+ cnt += bits.OnesCount64(x)
+ }
+ return uint64(cnt)
+}
+
+func popcntMaskSlice(s, m []uint64) uint64 {
+ var cnt int
+ for i := range s {
+ cnt += bits.OnesCount64(s[i] &^ m[i])
+ }
+ return uint64(cnt)
+}
+
+func popcntAndSlice(s, m []uint64) uint64 {
+ var cnt int
+ for i := range s {
+ cnt += bits.OnesCount64(s[i] & m[i])
+ }
+ return uint64(cnt)
+}
+
+func popcntOrSlice(s, m []uint64) uint64 {
+ var cnt int
+ for i := range s {
+ cnt += bits.OnesCount64(s[i] | m[i])
+ }
+ return uint64(cnt)
+}
+
+func popcntXorSlice(s, m []uint64) uint64 {
+ var cnt int
+ for i := range s {
+ cnt += bits.OnesCount64(s[i] ^ m[i])
+ }
+ return uint64(cnt)
+}