Skip to content

Commit 2957281

Browse files
authored
Introduce a lower limit for multithreading
1 parent 5fd871d commit 2957281

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

interface/zgbmv.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,10 @@ void CNAME(enum CBLAS_ORDER order,
251251
buffer = (FLOAT *)blas_memory_alloc(1);
252252

253253
#ifdef SMP
254-
nthreads = num_cpu_avail(2);
254+
if (m * n < 125000 || ku + kl < 15)
255+
nthreads = 1;
256+
else
257+
nthreads = num_cpu_avail(2);
255258

256259
if (nthreads == 1) {
257260
#endif

0 commit comments

Comments
 (0)