projects
/
platform
/
upstream
/
openblas.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1ccd57c
)
Fix openblas_get_num_threads and openblas_get_num_procs bug with single thread.
author
Zhang Xianyi
<traits.zhang@gmail.com>
Sun, 8 Feb 2015 07:30:12 +0000
(
01:30
-0600)
committer
Zhang Xianyi
<traits.zhang@gmail.com>
Sun, 8 Feb 2015 07:30:23 +0000
(
01:30
-0600)
driver/others/memory.c
patch
|
blob
|
history
diff --git
a/driver/others/memory.c
b/driver/others/memory.c
index
e245d9e
..
0316155
100644
(file)
--- a/
driver/others/memory.c
+++ b/
driver/others/memory.c
@@
-241,9
+241,6
@@
void set_stack_limit(int limitMB){
*/
#endif
-int openblas_get_num_procs(void) {
- return get_num_procs();
-}
/*
OpenBLAS uses the numbers of CPU cores in multithreading.
@@
-327,8
+324,21
@@
int blas_get_cpu_number(void){
}
#endif
+
+int openblas_get_num_procs(void) {
+#ifndef SMP
+ return 1;
+#else
+ return get_num_procs();
+#endif
+}
+
int openblas_get_num_threads(void) {
+#ifndef SMP
+ return 1;
+#else
return blas_get_cpu_number();
+#endif
}
struct release_t {