Update common_thread.h

This commit is contained in:
Martin Kroeker 2021-04-13 12:01:06 +02:00 committed by GitHub
parent 1999b8f978
commit 7f06960a88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -138,6 +138,8 @@ extern int blas_server_avail;
static __inline int num_cpu_avail(int level) { static __inline int num_cpu_avail(int level) {
return 1;
#ifdef USE_OPENMP #ifdef USE_OPENMP
int openmp_nthreads=0; //omp_get_max_threads(); int openmp_nthreads=0; //omp_get_max_threads();
#endif #endif
@ -151,7 +153,7 @@ static __inline int num_cpu_avail(int level) {
) return 1; ) return 1;
#ifdef USE_OPENMP #ifdef USE_OPENMP
openmp_nthreads = 2; //omp_get_max_threads(); openmp_nthreads = omp_get_max_threads();
if (blas_cpu_number != openmp_nthreads) { if (blas_cpu_number != openmp_nthreads) {
goto_set_num_threads(openmp_nthreads); goto_set_num_threads(openmp_nthreads);
} }