diff --git a/README.md b/README.md index befc14fc0..ce2688f03 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,7 @@ If you compile this lib with USE_OPENMP=1, you should set OMP_NUM_THREADS enviro ### Set the number of threads on runtime. -We provided the below functions to controll the number of threads on runtime. So far, we didn't support changing the number of threads on Windows. On Windows, these functions are dummy. +We provided the below functions to controll the number of threads on runtime. void goto_set_num_threads(int num_threads); @@ -97,6 +97,7 @@ OpenBLAS users mailing list: http://list.rdcps.ac.cn/mailman/listinfo/openblas Please see Changelog.txt to obtain the differences between GotoBLAS2 1.13 BSD version. ## Troubleshooting +* Please read [Faq](https://github.com/xianyi/OpenBLAS/wiki/Faq) at first. * Please use gcc version 4.6 and above to compile Sandy Bridge AVX kernels on Linux/MingW/BSD. * Please use Clang version 3.1 and above to compile the library on Sandy Bridge microarchitecture. The Clang 3.0 will generate the wrong AVX binary code. * The number of CPUs/Cores should less than or equal to 256. diff --git a/cpuid_x86.c b/cpuid_x86.c index ebbbe3fff..6e4eae20d 100644 --- a/cpuid_x86.c +++ b/cpuid_x86.c @@ -114,12 +114,15 @@ static inline int have_excpuid(void){ return eax & 0xffff; } +#ifndef NO_AVX static inline void xgetbv(int op, int * eax, int * edx){ __asm__ __volatile__ ("xgetbv": "=a" (*eax), "=d" (*edx) : "c" (op) : "cc"); } +#endif int support_avx(){ +#ifndef NO_AVX int eax, ebx, ecx, edx; int ret=0; @@ -131,8 +134,12 @@ int support_avx(){ } } return ret; +#else + return 0; +#endif } + int get_vendor(void){ int eax, ebx, ecx, edx; char vendor[13]; diff --git a/driver/others/dynamic.c b/driver/others/dynamic.c index 468ab0dc8..5d2bc782f 100644 --- a/driver/others/dynamic.c +++ b/driver/others/dynamic.c @@ -76,12 +76,15 @@ extern gotoblas_t gotoblas_SANDYBRIDGE; #define BITMASK(a, b, c) ((((a) >> (b)) & (c))) +#ifndef NO_AVX static inline void xgetbv(int op, int * eax, int * edx){ __asm__ __volatile__ ("xgetbv": "=a" (*eax), "=d" (*edx) : "c" (op) : "cc"); } +#endif int support_avx(){ +#ifndef NO_AVX int eax, ebx, ecx, edx; int ret=0; @@ -93,6 +96,9 @@ int support_avx(){ } } return ret; +#else + return 0; +#endif } static int get_vendor(void){