github.com/vc42/parquet-go@v0.0.0-20240320194221-1a9adb5f23f5/hashprobe/aeshash/aeshash_amd64.go (about)

     1  //go:build !purego
     2  
     3  package aeshash
     4  
     5  import (
     6  	"github.com/vc42/parquet-go/sparse"
     7  	"golang.org/x/sys/cpu"
     8  )
     9  
    10  // Enabled returns true if AES hash is available on the system.
    11  //
    12  // The function uses the same logic than the Go runtime since we depend on
    13  // the AES hash state being initialized.
    14  //
    15  // See https://go.dev/src/runtime/alg.go
    16  func Enabled() bool { return cpu.X86.HasAES && cpu.X86.HasSSSE3 && cpu.X86.HasSSE41 }
    17  
    18  //go:noescape
    19  func Hash32(value uint32, seed uintptr) uintptr
    20  
    21  //go:noescape
    22  func Hash64(value uint64, seed uintptr) uintptr
    23  
    24  //go:noescape
    25  func Hash128(value [16]byte, seed uintptr) uintptr
    26  
    27  //go:noescape
    28  func MultiHashUint32Array(hashes []uintptr, values sparse.Uint32Array, seed uintptr)
    29  
    30  //go:noescape
    31  func MultiHashUint64Array(hashes []uintptr, values sparse.Uint64Array, seed uintptr)
    32  
    33  //go:noescape
    34  func MultiHashUint128Array(hashes []uintptr, values sparse.Uint128Array, seed uintptr)