blob: ca445072c0367640bd13e28e758a3cf4dae6470c [file]
// Code generated by x/arch/internal/simdgen using 'go run . -xedPath $XED_PATH -o godefs -goroot $GOROOT go.yaml types.yaml categories.yaml'; DO NOT EDIT.
//go:build goexperiment.simd
package simd
import "internal/cpu"
// HasAES returns whether the CPU supports the AES feature.
//
// HasAES is defined on all GOARCHes, but will only return true on
// GOARCH amd64.
func HasAES() bool {
return cpu.X86.HasAES
}
// HasAVX returns whether the CPU supports the AVX feature.
//
// HasAVX is defined on all GOARCHes, but will only return true on
// GOARCH amd64.
func HasAVX() bool {
return cpu.X86.HasAVX
}
// HasAVX2 returns whether the CPU supports the AVX2 feature.
//
// HasAVX2 is defined on all GOARCHes, but will only return true on
// GOARCH amd64.
func HasAVX2() bool {
return cpu.X86.HasAVX2
}
// HasAVX512 returns whether the CPU supports the AVX512F+CD+BW+DQ+VL features.
//
// These five CPU features are bundled together, and no use of AVX-512
// is allowed unless all of these features are supported together.
// Nearly every CPU that has shipped with any support for AVX-512 has
// supported all five of these features.
//
// HasAVX512 is defined on all GOARCHes, but will only return true on
// GOARCH amd64.
func HasAVX512() bool {
return cpu.X86.HasAVX512
}
// HasAVX512BITALG returns whether the CPU supports the AVX512BITALG feature.
//
// HasAVX512BITALG is defined on all GOARCHes, but will only return true on
// GOARCH amd64.
func HasAVX512BITALG() bool {
return cpu.X86.HasAVX512BITALG
}
// HasAVX512GFNI returns whether the CPU supports the AVX512GFNI feature.
//
// HasAVX512GFNI is defined on all GOARCHes, but will only return true on
// GOARCH amd64.
func HasAVX512GFNI() bool {
return cpu.X86.HasAVX512GFNI
}
// HasAVX512VAES returns whether the CPU supports the AVX512VAES feature.
//
// HasAVX512VAES is defined on all GOARCHes, but will only return true on
// GOARCH amd64.
func HasAVX512VAES() bool {
return cpu.X86.HasAVX512VAES
}
// HasAVX512VBMI returns whether the CPU supports the AVX512VBMI feature.
//
// HasAVX512VBMI is defined on all GOARCHes, but will only return true on
// GOARCH amd64.
func HasAVX512VBMI() bool {
return cpu.X86.HasAVX512VBMI
}
// HasAVX512VBMI2 returns whether the CPU supports the AVX512VBMI2 feature.
//
// HasAVX512VBMI2 is defined on all GOARCHes, but will only return true on
// GOARCH amd64.
func HasAVX512VBMI2() bool {
return cpu.X86.HasAVX512VBMI2
}
// HasAVX512VNNI returns whether the CPU supports the AVX512VNNI feature.
//
// HasAVX512VNNI is defined on all GOARCHes, but will only return true on
// GOARCH amd64.
func HasAVX512VNNI() bool {
return cpu.X86.HasAVX512VNNI
}
// HasAVX512VPOPCNTDQ returns whether the CPU supports the AVX512VPOPCNTDQ feature.
//
// HasAVX512VPOPCNTDQ is defined on all GOARCHes, but will only return true on
// GOARCH amd64.
func HasAVX512VPOPCNTDQ() bool {
return cpu.X86.HasAVX512VPOPCNTDQ
}
// HasAVXVNNI returns whether the CPU supports the AVXVNNI feature.
//
// HasAVXVNNI is defined on all GOARCHes, but will only return true on
// GOARCH amd64.
func HasAVXVNNI() bool {
return cpu.X86.HasAVXVNNI
}
// HasSHA returns whether the CPU supports the SHA feature.
//
// HasSHA is defined on all GOARCHes, but will only return true on
// GOARCH amd64.
func HasSHA() bool {
return cpu.X86.HasSHA
}