Introduce a lower limit for multithreading

This commit is contained in:
Martin Kroeker 2024-05-14 18:59:21 +02:00 committed by gxw
parent 8e1e4582d8
commit 775ab942dc
1 changed files with 4 additions and 1 deletions

View File

@ -251,6 +251,9 @@ void CNAME(enum CBLAS_ORDER order,
buffer = (FLOAT *)blas_memory_alloc(1);
#ifdef SMP
if (m * n < 125000 || ku + kl < 15)
nthreads = 1;
else
nthreads = num_cpu_avail(2);
if (nthreads == 1) {