Permalink
Browse files

Merge branch 'develop'

  • Loading branch information...
2 parents 2df2878 + 6c5899d commit 3a26470fb72ebde20397ab6c08dd8db8adc241b1 @xianyi committed Oct 9, 2012
Showing with 15 additions and 1 deletion.
  1. +2 −1 README.md
  2. +7 −0 cpuid_x86.c
  3. +6 −0 driver/others/dynamic.c
View
3 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.
View
7 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];
View
6 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){

0 comments on commit 3a26470

Please sign in to comment.