Skip to content

Commit

Permalink
Merge pull request #4994 from martin-frbg/issue4886
Browse files Browse the repository at this point in the history
Disable multithreading in ?TRTRI for small workloads
  • Loading branch information
martin-frbg authored Dec 30, 2024
2 parents 718fb73 + 0c440f8 commit a107547
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions interface/lapack/trtri.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@ int NAME(char *UPLO, char *DIAG, blasint *N, FLOAT *a, blasint *ldA, blasint *In
#endif

#ifdef SMP
if (args.n <= 150)
args.nthreads = 1;
else
args.nthreads = num_cpu_avail(4);

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

0 comments on commit a107547

Please sign in to comment.