Use AVX2 only if AVX is also present

This commit is contained in:
Evgenii Stratonikov 2019-10-09 17:52:58 +03:00
parent 648b1deca7
commit fc059cac87

View file

@ -25,7 +25,9 @@ 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 {