Skip to content

Commit c1c1285

Browse files
authored
Add lower limit for multithreading
1 parent 8e44cde commit c1c1285

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

interface/zhpr2.c

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

189189
#ifdef SMP
190-
nthreads = num_cpu_avail(2);
190+
if (n < 100)
191+
nthreads = 1;
192+
else
193+
nthreads = num_cpu_avail(2);
191194

192195
if (nthreads == 1) {
193196
#endif

0 commit comments

Comments
 (0)