Browse Source

enabled smp for ger.c and zger.c, but only for 64bit binaries

tags/v0.2.10.rc2^2
wernsaar 11 years ago
parent
commit
1fad2b759f
2 changed files with 23 additions and 10 deletions
  1. +12
    -6
      interface/ger.c
  2. +11
    -4
      interface/zger.c

+ 12
- 6
interface/ger.c View File

@@ -42,6 +42,12 @@
#include "functable.h"
#endif

#ifdef SMP
#ifdef __64BIT__
#define SMPTEST 1
#endif
#endif

#ifdef XDOUBLE
#define ERROR_NAME "QGER "
#elif defined DOUBLE
@@ -75,7 +81,7 @@ void NAME(blasint *M, blasint *N, FLOAT *Alpha,
blasint incy = *INCY;
blasint lda = *LDA;
FLOAT *buffer;
#ifdef SMPBUG
#ifdef SMPTEST
int nthreads;
#endif

@@ -107,7 +113,7 @@ void CNAME(enum CBLAS_ORDER order,

FLOAT *buffer;
blasint info, t;
#ifdef SMPBUG
#ifdef SMPTEST
int nthreads;
#endif

@@ -135,11 +141,11 @@ void CNAME(enum CBLAS_ORDER order,
t = incx;
incx = incy;
incy = t;
/*
buffer = x;
x = y;
y = buffer;
*/
if (lda < MAX(1,m)) info = 9;
if (incy == 0) info = 7;
if (incx == 0) info = 5;
@@ -167,7 +173,7 @@ void CNAME(enum CBLAS_ORDER order,

buffer = (FLOAT *)blas_memory_alloc(1);

#ifdef SMPBUG
#ifdef SMPTEST
nthreads = num_cpu_avail(2);


@@ -176,7 +182,7 @@ void CNAME(enum CBLAS_ORDER order,

GER(m, n, 0, alpha, x, incx, y, incy, a, lda, buffer);

#ifdef SMPBUG
#ifdef SMPTEST
} else {

GER_THREAD(m, n, alpha, x, incx, y, incy, a, lda, buffer, nthreads);


+ 11
- 4
interface/zger.c View File

@@ -42,6 +42,13 @@
#include "functable.h"
#endif

#ifdef SMP
#ifdef __64BIT__
#define SMPTEST 1
#endif
#endif


#ifdef XDOUBLE
#ifndef CONJ
#define ERROR_NAME "XGERU "
@@ -109,7 +116,7 @@ void NAME(blasint *M, blasint *N, FLOAT *Alpha,
blasint incy = *INCY;
blasint lda = *LDA;
FLOAT *buffer;
#ifdef SMPBUG
#ifdef SMPTEST
int nthreads;
#endif

@@ -144,7 +151,7 @@ void CNAME(enum CBLAS_ORDER order,

FLOAT *buffer;
blasint info, t;
#ifdef SMPBUG
#ifdef SMPTEST
int nthreads;
#endif

@@ -205,7 +212,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) {
@@ -221,7 +228,7 @@ void CNAME(enum CBLAS_ORDER order,
}
#endif

#ifdef SMPBUG
#ifdef SMPTEST

} else {



Loading…
Cancel
Save