forked from TrueCloudLab/tzhash
Use AVX2 only if AVX is also present
This commit is contained in:
parent
648b1deca7
commit
fc059cac87
1 changed files with 4 additions and 2 deletions
|
@ -24,8 +24,10 @@ const (
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
hasAVX = cpuid.HasAVX()
|
hasAVX = cpuid.HasAVX()
|
||||||
hasAVX2 = cpuid.HasAVX2()
|
// Having AVX2 does not guarantee
|
||||||
|
// that AVX is also present.
|
||||||
|
hasAVX2 = cpuid.HasAVX2() && hasAVX
|
||||||
)
|
)
|
||||||
|
|
||||||
func (impl Implementation) String() string {
|
func (impl Implementation) String() string {
|
||||||
|
|
Loading…
Reference in a new issue