Source File
cpuinfo.go
Belonging Package
github.com/klauspost/compress/internal/cpuinfo
// Package cpuinfo gives runtime info about the current CPU.//// This is a very limited module meant for use internally// in this project. For more versatile solution check// https://github.com/klauspost/cpuid.package cpuinfo// HasBMI1 checks whether an x86 CPU supports the BMI1 extension.func () bool {return hasBMI1}// HasBMI2 checks whether an x86 CPU supports the BMI2 extension.func () bool {return hasBMI2}// DisableBMI2 will disable BMI2, for testing purposes.// Call returned function to restore previous state.func () func() {:= hasBMI2hasBMI2 = falsereturn func() {hasBMI2 =}}// HasBMI checks whether an x86 CPU supports both BMI1 and BMI2 extensions.func () bool {return HasBMI1() && HasBMI2()}var hasBMI1 boolvar hasBMI2 bool
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |