Merge pull request #3953 from martin-frbg/issue3801

Do not use multithreading for small SYMV/SYR2K workloads
This commit is contained in:
Martin Kroeker 2023-03-24 13:51:37 +01:00 committed by GitHub
commit 02920be53a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

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

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