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.
2 parents 58427ff + 9324520 commit eef4d15Copy full SHA for eef4d15
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
+#if defined(__FreeBSD__) && defined(__clang__)
129
+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