Merge pull request #4694 from martin-frbg/issue3660

Add a minimum problem size for multithreading in GBMV
This commit is contained in:
Martin Kroeker 2024-05-15 22:14:41 +02:00 committed by GitHub
commit 39c96063fb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 2 deletions

View File

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

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) {