Skip to content

Commit

Permalink
Add lower limit for multithreading
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-frbg authored Dec 21, 2023
1 parent 6777917 commit a7ed60b
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 a7ed60b

Please sign in to comment.