mirror of
https://github.com/OpenMathLib/OpenBLAS
synced 2026-05-31 00:45:48 +08:00
Introduce a (crude) threshold to multithreading
This commit is contained in:
@@ -219,7 +219,10 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo,
|
||||
|
||||
#ifdef SMP
|
||||
nthreads = num_cpu_avail(2);
|
||||
|
||||
|
||||
if (n < 50 ) nthreads = 1;
|
||||
if (nthreads > 2 && n < 500) nthreads = 2;
|
||||
|
||||
if (nthreads == 1) {
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user