diff options
author | Zhang Xianyi <traits.zhang@gmail.com> | 2014-07-16 08:37:55 +0800 |
---|---|---|
committer | Zhang Xianyi <traits.zhang@gmail.com> | 2014-07-16 08:38:25 +0800 |
commit | c94762bb5610348b46498e82e6f37023be34d4bb (patch) | |
tree | 389a65036b582ebf009fec76c7886a8d1e08a337 /cpuid_x86.c | |
parent | 3dd094f17a62eac22beb46e9c838c5f17b309cda (diff) | |
download | openblas-c94762bb5610348b46498e82e6f37023be34d4bb.tar.gz openblas-c94762bb5610348b46498e82e6f37023be34d4bb.tar.bz2 openblas-c94762bb5610348b46498e82e6f37023be34d4bb.zip |
Refs #401. Added NO_AVX2 flag for old binutils (e.g. RHEL6)
Diffstat (limited to 'cpuid_x86.c')
-rw-r--r-- | cpuid_x86.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/cpuid_x86.c b/cpuid_x86.c index b7355df92..53016e1e7 100644 --- a/cpuid_x86.c +++ b/cpuid_x86.c @@ -1062,7 +1062,11 @@ int get_cpuname(void){ case 12: case 15: if(support_avx()) +#ifndef NO_AVX2 return CPUTYPE_HASWELL; +#else + return CPUTYPE_SANDYBRIDGE; +#endif else return CPUTYPE_NEHALEM; } @@ -1072,7 +1076,11 @@ int get_cpuname(void){ case 5: case 6: if(support_avx()) +#ifndef NO_AVX2 return CPUTYPE_HASWELL; +#else + return CPUTYPE_SANDYBRIDGE; +#endif else return CPUTYPE_NEHALEM; } @@ -1471,7 +1479,11 @@ int get_coretype(void){ case 12: case 15: if(support_avx()) +#ifndef NO_AVX2 return CORE_HASWELL; +#else + return CORE_SANDYBRIDGE; +#endif else return CORE_NEHALEM; } @@ -1481,7 +1493,11 @@ int get_coretype(void){ case 5: case 6: if(support_avx()) +#ifndef NO_AVX2 return CORE_HASWELL; +#else + return CORE_SANDYBRIDGE; +#endif else return CORE_NEHALEM; } |