Skip to content

Commit

Permalink
Merge pull request OpenMathLib#4933 from ChipKerchner/thread_sbgemv
Browse files Browse the repository at this point in the history
Change multi-threading logic for SBGEMV to be the same as SGEMV.
  • Loading branch information
martin-frbg authored Oct 12, 2024
2 parents 18a23c2 + 1d51ca5 commit 3184b7f
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions interface/sbgemv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3184b7f

Please sign in to comment.