Merge pull request #549 from tgruben/conditional-asm

asm build options for non amd64
This commit is contained in:
tgruben 2017-05-17 11:16:21 -05:00 • committed by GitHub
commit 4a14e38ebe
3 changed files with 10 additions and 5 deletions

View file

@ -14,11 +14,6 @@
package roaring
func hasAsm() bool
func BSFQ(memory uint64) int
func POPCNTQ(memory uint64) int
// bit population count, take from
// https://code.google.com/p/go/issues/detail?id=4988#c11

View file

@ -16,6 +16,13 @@
package roaring
func hasAsm() bool
func BSFQ(memory uint64) int
func POPCNTQ(memory uint64) int
//go:noescape
var useAsm = hasAsm()

View file

@ -16,6 +16,9 @@
package roaring
func hasAsm() bool {return false}
func popcntSlice(s []uint64) uint64 { return popcntSliceGo(s) }
func popcntMaskSlice(s, m []uint64) uint64 { return popcntMaskSliceGo(s, m) }
func popcntAndSlice(s, m []uint64) uint64 { return popcntAndSliceGo(s, m) }