File tree Expand file tree Collapse file tree 3 files changed +3
-6
lines changed Expand file tree Collapse file tree 3 files changed +3
-6
lines changed Original file line number Diff line number Diff line change 68
68
#endif
69
69
70
70
int blas_server_avail = 0 ;
71
+ int blas_omp_number_max = 0 ;
71
72
72
73
extern int openblas_omp_adaptive_env ();
73
74
@@ -100,7 +101,6 @@ static void adjust_thread_buffers() {
100
101
101
102
void goto_set_num_threads (int num_threads ) {
102
103
103
- blas_num_threads_set = 1 ;
104
104
if (num_threads < 0 ) blas_num_threads_set = 0 ;
105
105
if (num_threads < 1 ) num_threads = blas_num_threads ;
106
106
@@ -125,6 +125,8 @@ void openblas_set_num_threads(int num_threads) {
125
125
}
126
126
127
127
int blas_thread_init (void ){
128
+ if (blas_omp_number_max <= 0 )
129
+ blas_omp_number_max = omp_get_max_threads ();
128
130
129
131
blas_get_cpu_number ();
130
132
Original file line number Diff line number Diff line change @@ -422,8 +422,6 @@ This value is equal or large than blas_cpu_number. This means some threads are s
422
422
*/
423
423
int blas_num_threads = 0 ;
424
424
425
- int blas_num_threads_set = 0 ;
426
-
427
425
int goto_get_num_procs (void ) {
428
426
return blas_cpu_number ;
429
427
}
@@ -1996,8 +1994,6 @@ This value is equal or large than blas_cpu_number. This means some threads are s
1996
1994
*/
1997
1995
int blas_num_threads = 0 ;
1998
1996
1999
- int blas_num_threads_set = 0 ;
2000
-
2001
1997
int goto_get_num_procs (void ) {
2002
1998
return blas_cpu_number ;
2003
1999
}
Original file line number Diff line number Diff line change @@ -283,7 +283,6 @@ The numbers of threads in the thread pool.
283
283
This value is equal or large than blas_cpu_number. This means some threads are sleep.
284
284
*/
285
285
int blas_num_threads = 0 ;
286
- int blas_num_threads_set = 0 ;
287
286
288
287
int goto_get_num_procs (void ) {
289
288
return blas_cpu_number ;
You can’t perform that action at this time.
0 commit comments