Do not use multithreading for small workloads
This commit is contained in:
parent
2885e4d898
commit
244147495a
|
@ -180,6 +180,9 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint n, FLOAT alpha,
|
|||
buffer = (FLOAT *)blas_memory_alloc(1);
|
||||
|
||||
#ifdef SMP
|
||||
if (n <200)
|
||||
nthreads=1;
|
||||
else
|
||||
nthreads = num_cpu_avail(2);
|
||||
|
||||
if (nthreads == 1) {
|
||||
|
|
|
@ -368,6 +368,9 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE Tr
|
|||
mode |= (uplo << BLAS_UPLO_SHIFT);
|
||||
|
||||
args.common = NULL;
|
||||
if (args.n*args.k <1000)
|
||||
args.nthreads =1 ;
|
||||
else
|
||||
args.nthreads = num_cpu_avail(3);
|
||||
|
||||
if (args.nthreads == 1) {
|
||||
|
|
Loading…
Reference in New Issue