summaryrefslogtreecommitdiff
path: root/interface
diff options
context:
space:
mode:
authorwernsaar <wernsaar@googlemail.com>2014-06-29 20:35:56 +0200
committerwernsaar <wernsaar@googlemail.com>2014-06-29 20:35:56 +0200
commit01a119abfcdecbb640c5bfcb52a1771253b14513 (patch)
tree2badd9ead463daf3e35dc80c0f28ff673b65ebad /interface
parent1fad2b759f9db983f0d358771e852adb92fda95d (diff)
downloadopenblas-01a119abfcdecbb640c5bfcb52a1771253b14513.tar.gz
openblas-01a119abfcdecbb640c5bfcb52a1771253b14513.tar.bz2
openblas-01a119abfcdecbb640c5bfcb52a1771253b14513.zip
enabled SMP for sbmv and zsbmv, but only for 64bit binaries
Diffstat (limited to 'interface')
-rw-r--r--interface/sbmv.c17
-rw-r--r--interface/zsbmv.c15
2 files changed, 23 insertions, 9 deletions
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);