Skip to content

Commit 33b5054

Browse files
authored
Merge pull request #5403 from martin-frbg/issue5402
Introduce a (crude) threshold to multithreading in STRMV/DTRMV
2 parents c504aed + a9e8fa0 commit 33b5054

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

interface/trmv.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,10 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo,
219219

220220
#ifdef SMP
221221
nthreads = num_cpu_avail(2);
222-
222+
223+
if (n < 50 ) nthreads = 1;
224+
if (nthreads > 2 && n < 500) nthreads = 2;
225+
223226
if (nthreads == 1) {
224227
#endif
225228

0 commit comments

Comments
 (0)