Skip to content

Commit c5b0d1e

Browse files
authored
Add lower limit for multithreading
1 parent 585e6d0 commit c5b0d1e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

interface/zher.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,10 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint n, FLOAT alpha,
177177
buffer = (FLOAT *)blas_memory_alloc(1);
178178

179179
#ifdef SMP
180-
nthreads = num_cpu_avail(2);
180+
if (n < 100)
181+
nthreads = 1;
182+
else
183+
nthreads = num_cpu_avail(2);
181184

182185
if (nthreads == 1) {
183186
#endif

0 commit comments

Comments
 (0)