From 01a119abfcdecbb640c5bfcb52a1771253b14513 Mon Sep 17 00:00:00 2001 From: wernsaar Date: Sun, 29 Jun 2014 20:35:56 +0200 Subject: enabled SMP for sbmv and zsbmv, but only for 64bit binaries --- interface/sbmv.c | 17 ++++++++++++----- interface/zsbmv.c | 15 +++++++++++---- 2 files changed, 23 insertions(+), 9 deletions(-) (limited to 'interface') diff --git a/interface/sbmv.c b/interface/sbmv.c index 0dac736cb..d5577e529 100644 --- a/interface/sbmv.c +++ b/interface/sbmv.c @@ -43,6 +43,13 @@ #include "functable.h" #endif +#ifdef SMP +#ifdef __64BIT__ +#define SMPTEST 1 +#endif +#endif + + #ifdef XDOUBLE #define ERROR_NAME "QSBMV " #elif defined(DOUBLE) @@ -61,7 +68,7 @@ static int (*sbmv[])(BLASLONG, BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLA #endif }; -#ifdef SMPBUG +#ifdef SMPTEST static int (*sbmv_thread[])(BLASLONG, BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { #ifdef XDOUBLE qsbmv_thread_U, qsbmv_thread_L, @@ -90,7 +97,7 @@ void NAME(char *UPLO, blasint *N, blasint *K, FLOAT *ALPHA, FLOAT *a, blasint * blasint info; int uplo; FLOAT *buffer; -#ifdef SMPBUG +#ifdef SMPTEST int nthreads; #endif @@ -130,7 +137,7 @@ void CNAME(enum CBLAS_ORDER order, FLOAT *buffer; int uplo; blasint info; -#ifdef SMPBUG +#ifdef SMPTEST int nthreads; #endif @@ -189,7 +196,7 @@ void CNAME(enum CBLAS_ORDER order, buffer = (FLOAT *)blas_memory_alloc(1); -#ifdef SMPBUG +#ifdef SMPTEST nthreads = num_cpu_avail(2); if (nthreads == 1) { @@ -197,7 +204,7 @@ void CNAME(enum CBLAS_ORDER order, (sbmv[uplo])(n, k, alpha, a, lda, x, incx, y, incy, buffer); -#ifdef SMPBUG +#ifdef SMPTEST } else { (sbmv_thread[uplo])(n, k, alpha, a, lda, x, incx, y, incy, buffer, nthreads); diff --git a/interface/zsbmv.c b/interface/zsbmv.c index 2efe85ba9..54dae87b7 100644 --- a/interface/zsbmv.c +++ b/interface/zsbmv.c @@ -43,6 +43,13 @@ #include "functable.h" #endif +#ifdef SMP +#ifdef __64BIT__ +#define SMPTEST 1 +#endif +#endif + + #ifdef XDOUBLE #define ERROR_NAME "XSBMV " #elif defined(DOUBLE) @@ -61,7 +68,7 @@ static int (*sbmv[])(BLASLONG, BLASLONG, FLOAT, FLOAT, FLOAT *, BLASLONG, FLOAT #endif }; -#ifdef SMPBUG +#ifdef SMPTEST static int (*sbmv_thread[])(BLASLONG, BLASLONG, FLOAT *, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, BLASLONG, FLOAT *, int) = { #ifdef XDOUBLE xsbmv_thread_U, xsbmv_thread_L, @@ -90,7 +97,7 @@ void NAME(char *UPLO, blasint *N, blasint *K, FLOAT *ALPHA, FLOAT *a, blasint * blasint info; int uplo; FLOAT *buffer; -#ifdef SMPBUG +#ifdef SMPTEST int nthreads; #endif @@ -131,7 +138,7 @@ void NAME(char *UPLO, blasint *N, blasint *K, FLOAT *ALPHA, FLOAT *a, blasint * buffer = (FLOAT *)blas_memory_alloc(1); -#ifdef SMPBUG +#ifdef SMPTEST nthreads = num_cpu_avail(2); if (nthreads == 1) { @@ -139,7 +146,7 @@ void NAME(char *UPLO, blasint *N, blasint *K, FLOAT *ALPHA, FLOAT *a, blasint * (sbmv[uplo])(n, k, alpha_r, alpha_i, a, lda, b, incx, c, incy, buffer); -#ifdef SMPBUG +#ifdef SMPTEST } else { (sbmv_thread[uplo])(n, k, ALPHA, a, lda, b, incx, c, incy, buffer, nthreads); -- cgit v1.2.3