Merge pull request #4933 from ChipKerchner/thread_sbgemv

Change multi-threading logic for SBGEMV to be the same as SGEMV.
This commit is contained in:
Martin Kroeker 2024-10-12 17:19:41 +02:00 committed by GitHub
commit 3184b7f209
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 15 deletions

View File

@ -178,21 +178,10 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_TRANSPOSE TransA, blasint m, blasi
if (incy < 0) {y -= (leny - 1) * incy;}
#ifdef SMP
int thread_thres_row = 20480;
if (trans) {
if (n <= thread_thres_row) {
nthreads = 1;
} else {
nthreads = num_cpu_avail(1);
}
} else {
if (m <= thread_thres_row) {
nthreads = 1;
} else {
nthreads = num_cpu_avail(1);
}
}
if ( 1L * m * n < 115200L * GEMM_MULTITHREAD_THRESHOLD )
nthreads = 1;
else
nthreads = num_cpu_avail(2);
if (nthreads == 1) {
#endif