We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9c3c1cf commit ff6437fCopy full SHA for ff6437f
driver/others/blas_server_omp.c
@@ -124,9 +124,18 @@ void openblas_set_num_threads(int num_threads) {
124
}
125
126
int blas_thread_init(void){
127
- if(blas_omp_number_max <= 0)
128
- blas_omp_number_max = omp_get_max_threads();
129
-
+
+#if defined(__FreeBSD__) && defined(__clang__)
+extern int openblas_omp_num_threads_env();
130
131
+ if(blas_omp_number_max <= 0)
132
+ blas_omp_number_max= openblas_omp_num_threads_env();
133
+ if (blas_omp_number_max <= 0)
134
+ blas_omp_number_max=MAX_CPU_NUMBER;
135
+#else
136
+ blas_omp_number_max = /omp_get_max_threads();
137
+#endif
138
139
blas_get_cpu_number();
140
141
adjust_thread_buffers();
0 commit comments