github.com/parquet-go/parquet-go@v0.21.1-0.20240501160520-b3c3a0c3ed6f/internal/bytealg/bytealg_amd64.go (about) 1 //go:build !purego 2 3 package bytealg 4 5 import "golang.org/x/sys/cpu" 6 7 var ( 8 hasAVX2 = cpu.X86.HasAVX2 9 // These use AVX-512 instructions in the countByte algorithm relies 10 // operations that are available in the AVX512BW extension: 11 // * VPCMPUB 12 // * KMOVQ 13 // 14 // Note that the function will fallback to an AVX2 version if those 15 // instructions are not available. 16 hasAVX512Count = cpu.X86.HasAVX512VL && cpu.X86.HasAVX512BW 17 )