Skip to content

Commit

Permalink
Merge pull request OpenMathLib#4388 from martin-frbg/issue4387
Browse files Browse the repository at this point in the history
Add lower limit for multithreading in the reimplemented LAPACK ?GESV
  • Loading branch information
martin-frbg authored Dec 21, 2023
2 parents 6777917 + a7ed60b commit 68ef232
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion interface/lapack/gesv.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,14 @@ int NAME(blasint *N, blasint *NRHS, FLOAT *a, blasint *ldA, blasint *ipiv,

#ifdef SMP
args.common = NULL;
args.nthreads = num_cpu_avail(4);
#ifndef DOUBLE
if (args.m*args.n < 40000)
#else
if (args.m*args.n < 10000)
#endif
args.nthreads=1;
else
args.nthreads = num_cpu_avail(4);

if (args.nthreads == 1) {
#endif
Expand Down

0 comments on commit 68ef232

Please sign in to comment.