Skip to content

Commit 3184b7f

Browse files
authored
Merge pull request #4933 from ChipKerchner/thread_sbgemv
Change multi-threading logic for SBGEMV to be the same as SGEMV.
2 parents 18a23c2 + 1d51ca5 commit 3184b7f

File tree

1 file changed

+4
-15
lines changed

1 file changed

+4
-15
lines changed

interface/sbgemv.c

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -178,21 +178,10 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_TRANSPOSE TransA, blasint m, blasi
178178
if (incy < 0) {y -= (leny - 1) * incy;}
179179

180180
#ifdef SMP
181-
int thread_thres_row = 20480;
182-
if (trans) {
183-
if (n <= thread_thres_row) {
184-
nthreads = 1;
185-
} else {
186-
nthreads = num_cpu_avail(1);
187-
}
188-
} else {
189-
if (m <= thread_thres_row) {
190-
nthreads = 1;
191-
} else {
192-
nthreads = num_cpu_avail(1);
193-
}
194-
}
195-
181+
if ( 1L * m * n < 115200L * GEMM_MULTITHREAD_THRESHOLD )
182+
nthreads = 1;
183+
else
184+
nthreads = num_cpu_avail(2);
196185

197186
if (nthreads == 1) {
198187
#endif

0 commit comments

Comments
 (0)