diff options
author | wernsaar <wernsaar@googlemail.com> | 2014-09-15 11:38:25 +0200 |
---|---|---|
committer | wernsaar <wernsaar@googlemail.com> | 2014-09-15 11:38:25 +0200 |
commit | 3300f5ebffd058c9132e87dfea1174bd526196f8 (patch) | |
tree | f8fc13e2cef89ad4c0d09e3a58db583d995e4bc1 /interface | |
parent | b7c9566eea9b19ae1834ba8f8b5ddb0517e8749b (diff) | |
download | openblas-3300f5ebffd058c9132e87dfea1174bd526196f8.tar.gz openblas-3300f5ebffd058c9132e87dfea1174bd526196f8.tar.bz2 openblas-3300f5ebffd058c9132e87dfea1174bd526196f8.zip |
optimized multithreading lower limits
Diffstat (limited to 'interface')
-rw-r--r-- | interface/gemm.c | 41 |
1 files changed, 2 insertions, 39 deletions
diff --git a/interface/gemm.c b/interface/gemm.c index 74908e842..a5a2b4724 100644 --- a/interface/gemm.c +++ b/interface/gemm.c @@ -405,49 +405,12 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_TRANSPOSE TransA, enum CBLAS_TRANS #ifndef COMPLEX double MNK = (double) args.m * (double) args.n * (double) args.k; - if ( MNK <= (16.0 * 1024.0 * (double) GEMM_MULTITHREAD_THRESHOLD) ) + if ( MNK <= (65536.0 * (double) GEMM_MULTITHREAD_THRESHOLD) ) nthreads_max = 1; - else - { - if ( MNK <= (2.0 * 65536.0 * (double) GEMM_MULTITHREAD_THRESHOLD) ) - { - nthreads_max = 4; - if ( args.m < 16 * GEMM_MULTITHREAD_THRESHOLD ) - { - nthreads_max = 2; - if ( args.m < 3 * GEMM_MULTITHREAD_THRESHOLD ) nthreads_max = 1; - if ( args.n < 1 * GEMM_MULTITHREAD_THRESHOLD ) nthreads_max = 1; - if ( args.k < 3 * GEMM_MULTITHREAD_THRESHOLD ) nthreads_max = 1; - } - else - { - if ( args.n <= 1 * GEMM_MULTITHREAD_THRESHOLD ) nthreads_max = 2; - } - } - } #else double MNK = (double) args.m * (double) args.n * (double) args.k; - if ( MNK <= (256.0 * (double) GEMM_MULTITHREAD_THRESHOLD) ) + if ( MNK <= (8192.0 * (double) GEMM_MULTITHREAD_THRESHOLD) ) nthreads_max = 1; - else - { - if ( MNK <= (16384.0 * (double) GEMM_MULTITHREAD_THRESHOLD) ) - { - nthreads_max = 4; - if ( args.m < 3 * GEMM_MULTITHREAD_THRESHOLD ) - { - nthreads_max = 2; - if ( args.m <= 1 * GEMM_MULTITHREAD_THRESHOLD ) nthreads_max = 1; - if ( args.n < 1 * GEMM_MULTITHREAD_THRESHOLD ) nthreads_max = 1; - if ( args.k < 1 * GEMM_MULTITHREAD_THRESHOLD ) nthreads_max = 1; - } - else - { - if ( args.n < 2 * GEMM_MULTITHREAD_THRESHOLD ) nthreads_max = 2; - } - } - } - #endif args.common = NULL; |