github.com/parquet-go/parquet-go@v0.21.1-0.20240501160520-b3c3a0c3ed6f/hashprobe/hashprobe_amd64.go (about) 1 //go:build !purego 2 3 package hashprobe 4 5 import ( 6 "github.com/parquet-go/parquet-go/sparse" 7 "golang.org/x/sys/cpu" 8 ) 9 10 //go:noescape 11 func multiProbe32AVX2(table []table32Group, numKeys int, hashes []uintptr, keys sparse.Uint32Array, values []int32) int 12 13 //go:noescape 14 func multiProbe64AVX2(table []table64Group, numKeys int, hashes []uintptr, keys sparse.Uint64Array, values []int32) int 15 16 //go:noescape 17 func multiProbe128SSE2(table []byte, tableCap, tableLen int, hashes []uintptr, keys sparse.Uint128Array, values []int32) int 18 19 func multiProbe32(table []table32Group, numKeys int, hashes []uintptr, keys sparse.Uint32Array, values []int32) int { 20 if cpu.X86.HasAVX2 { 21 return multiProbe32AVX2(table, numKeys, hashes, keys, values) 22 } 23 return multiProbe32Default(table, numKeys, hashes, keys, values) 24 } 25 26 func multiProbe64(table []table64Group, numKeys int, hashes []uintptr, keys sparse.Uint64Array, values []int32) int { 27 if cpu.X86.HasAVX2 { 28 return multiProbe64AVX2(table, numKeys, hashes, keys, values) 29 } 30 return multiProbe64Default(table, numKeys, hashes, keys, values) 31 } 32 33 func multiProbe128(table []byte, tableCap, tableLen int, hashes []uintptr, keys sparse.Uint128Array, values []int32) int { 34 if cpu.X86.HasSSE2 { 35 return multiProbe128SSE2(table, tableCap, tableLen, hashes, keys, values) 36 } 37 return multiProbe128Default(table, tableCap, tableLen, hashes, keys, values) 38 }