Skip to content

Commit

Permalink
disable multithreading for small workloads
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-frbg authored Nov 27, 2024
1 parent 0578a89 commit 0c440f8
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 0c440f8

Please sign in to comment.