Explicitly rename has_512 into has_avx512 (#7751)

This commit is contained in:
Bird Egop 2020-03-10 19:21:00 +03:00 committed by GitHub
parent b4f416cb76
commit 4e25daffa6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 24 additions and 24 deletions

View file

@ -56,10 +56,10 @@ bool utils::has_mpx()
return g_value;
}
bool utils::has_512()
bool utils::has_avx512()
{
// Check AVX512F, AVX512CD, AVX512DQ, AVX512BW, AVX512VL extensions (Skylake-X level support)
static const bool g_value = get_cpuid(0, 0)[0] >= 0x7 && (get_cpuid(7, 0)[1] & 0xd0030000) == 0xd0030000 && (get_cpuid(1,0)[2] & 0x0C000000) == 0x0C000000 && (get_xgetbv(0) & 0xe6) == 0xe6;
static const bool g_value = get_cpuid(0, 0)[0] >= 0x7 && (get_cpuid(7, 0)[1] & 0xd0030000) == 0xd0030000 && (get_cpuid(1, 0)[2] & 0x0C000000) == 0x0C000000 && (get_xgetbv(0) & 0xe6) == 0xe6;
return g_value;
}
@ -131,7 +131,7 @@ std::string utils::get_system_info()
result += '+';
}
if (has_512())
if (has_avx512())
{
result += '+';
}