Skip to content

Commit 75b3e11

Browse files
authored
Add lower limit for multithreading
1 parent c5b0d1e commit 75b3e11

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

interface/zher2.c

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

188188
#ifdef SMP
189-
nthreads = num_cpu_avail(2);
189+
if (n < 100)
190+
nthreads = 1;
191+
else
192+
nthreads = num_cpu_avail(2);
190193

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

0 commit comments

Comments
 (0)