Browse Source

Merge pull request #3953 from martin-frbg/issue3801

Do not use multithreading for small SYMV/SYR2K workloads
tags/v0.3.22^2
Martin Kroeker GitHub 2 years ago
parent
commit
02920be53a
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions
  1. +3
    -0
      interface/symv.c
  2. +3
    -0
      interface/syr2k.c

+ 3
- 0
interface/symv.c View File

@@ -180,6 +180,9 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint n, FLOAT alpha,
buffer = (FLOAT *)blas_memory_alloc(1);

#ifdef SMP
if (n <200)
nthreads=1;
else
nthreads = num_cpu_avail(2);

if (nthreads == 1) {


+ 3
- 0
interface/syr2k.c View File

@@ -368,6 +368,9 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE Tr
mode |= (uplo << BLAS_UPLO_SHIFT);

args.common = NULL;
if (args.n*args.k <1000)
args.nthreads =1 ;
else
args.nthreads = num_cpu_avail(3);

if (args.nthreads == 1) {


Loading…
Cancel
Save