Browse Source

Merge pull request #4694 from martin-frbg/issue3660

Add a minimum problem size for multithreading in GBMV
tags/v0.3.28^2
Martin Kroeker GitHub 1 year ago
parent
commit
39c96063fb
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 2 deletions
  1. +4
    -1
      interface/gbmv.c
  2. +4
    -1
      interface/zgbmv.c

+ 4
- 1
interface/gbmv.c View File

@@ -227,7 +227,10 @@ void CNAME(enum CBLAS_ORDER order,
buffer = (FLOAT *)blas_memory_alloc(1);

#ifdef SMP
nthreads = num_cpu_avail(2);
if (m * n < 250000 || kl+ku < 15 )
nthreads = 1;
else
nthreads = num_cpu_avail(2);

if (nthreads == 1) {
#endif


+ 4
- 1
interface/zgbmv.c View File

@@ -251,7 +251,10 @@ void CNAME(enum CBLAS_ORDER order,
buffer = (FLOAT *)blas_memory_alloc(1);

#ifdef SMP
nthreads = num_cpu_avail(2);
if (m * n < 125000 || ku + kl < 15)
nthreads = 1;
else
nthreads = num_cpu_avail(2);

if (nthreads == 1) {
#endif


Loading…
Cancel
Save