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:
801383e
)
Refs #136. Fixed a bug about controlling the number of threads on Windows.
author
Zhang Xianyi
<traits.zhang@gmail.com>
Sun, 19 Aug 2012 15:50:54 +0000
(23:50 +0800)
committer
Zhang Xianyi
<traits.zhang@gmail.com>
Sun, 19 Aug 2012 15:50:54 +0000
(23:50 +0800)
driver/others/blas_server_win32.c
patch
|
blob
|
history
diff --git
a/driver/others/blas_server_win32.c
b/driver/others/blas_server_win32.c
index
09b08e8
..
9cbd7e2
100644
(file)
--- a/
driver/others/blas_server_win32.c
+++ b/
driver/others/blas_server_win32.c
@@
-466,7
+466,17
@@
void goto_set_num_threads(int num_threads)
LOCK_COMMAND(&server_lock);
//increased_threads = 1;
+ if (!blas_server_avail){
+ InitializeCriticalSection(&pool.lock);
+ pool.filled = CreateEvent(NULL, FALSE, FALSE, NULL);
+ pool.killed = CreateEvent(NULL, TRUE, FALSE, NULL);
+
+ pool.shutdown = 0;
+ pool.queue = NULL;
+ blas_server_avail = 1;
+ }
+
for(i = blas_num_threads - 1; i < num_threads - 1; i++){
blas_threads[i] = CreateThread(NULL, 0,