asm build options for non amd64

This commit is contained in:
Todd Gruben 2017-05-15 11:31:41 -05:00
parent 5d603f623b
commit fbae0f4d15
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) }