Skip to content

Commit c7bbf9c

Browse files
committed
Attempt to tame _hemv threading #1820
1 parent 898a8dc commit c7bbf9c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

interface/zhemv.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,12 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint n, void *VALPHA
195195
buffer = (FLOAT *)blas_memory_alloc(1);
196196

197197
#ifdef SMP
198-
nthreads = num_cpu_avail(2);
198+
// see graph in issue #1820 for explanation and room for improvement
199+
if (n<362) {
200+
nthreads = 1 ;
201+
} else {
202+
nthreads = num_cpu_avail(2);
203+
};
199204

200205
if (nthreads == 1) {
201206
#endif

0 commit comments

Comments
 (0)