diff options
author | julie <julielangou@users.noreply.github.com> | 2015-01-10 05:57:14 +0000 |
---|---|---|
committer | julie <julielangou@users.noreply.github.com> | 2015-01-10 05:57:14 +0000 |
commit | 83fc0b48afd1f9a6d6f8dddb16e69ed7ed0e7242 (patch) | |
tree | 2b720245e2149022b751424cb59772c176880bec /CBLAS | |
parent | 6d9b1a2737bc9c7d59422738bc3d99b922f95e36 (diff) | |
download | lapack-83fc0b48afd1f9a6d6f8dddb16e69ed7ed0e7242.tar.gz lapack-83fc0b48afd1f9a6d6f8dddb16e69ed7ed0e7242.tar.bz2 lapack-83fc0b48afd1f9a6d6f8dddb16e69ed7ed0e7242.zip |
Applied Jakub's CBLAS patch sent on Jan 9th
Netlib CBLAS can be put on top of BLAS with 64-bit integers.
It can be accomplished using the flag "WeirdNEC" :)
It basically redefines int to long, but at the same time, it had multiple bugs.
Diffstat (limited to 'CBLAS')
-rw-r--r-- | CBLAS/include/cblas.h | 6 | ||||
-rw-r--r-- | CBLAS/src/cblas_cdotc_sub.c | 3 | ||||
-rw-r--r-- | CBLAS/src/cblas_cdotu_sub.c | 9 | ||||
-rw-r--r-- | CBLAS/src/cblas_chpmv.c | 2 | ||||
-rw-r--r-- | CBLAS/src/cblas_cscal.c | 2 | ||||
-rw-r--r-- | CBLAS/src/cblas_dsyr2.c | 2 | ||||
-rw-r--r-- | CBLAS/src/cblas_icamax.c | 2 | ||||
-rw-r--r-- | CBLAS/src/cblas_idamax.c | 2 | ||||
-rw-r--r-- | CBLAS/src/cblas_isamax.c | 2 | ||||
-rw-r--r-- | CBLAS/src/cblas_izamax.c | 2 | ||||
-rw-r--r-- | CBLAS/src/cblas_ssyr2.c | 2 | ||||
-rw-r--r-- | CBLAS/src/cblas_strsm.c | 2 | ||||
-rw-r--r-- | CBLAS/src/cblas_zdotc_sub.c | 2 | ||||
-rw-r--r-- | CBLAS/src/cblas_zhpmv.c | 2 | ||||
-rw-r--r-- | CBLAS/src/xerbla.c | 5 |
15 files changed, 23 insertions, 22 deletions
diff --git a/CBLAS/include/cblas.h b/CBLAS/include/cblas.h index 8aa4d2f6..7523a779 100644 --- a/CBLAS/include/cblas.h +++ b/CBLAS/include/cblas.h @@ -10,7 +10,11 @@ extern "C" { /* Assume C declarations for C++ */ /* * Enumerated and derived types */ -#define CBLAS_INDEX size_t /* this may vary between platforms */ +#ifdef WeirdNEC + #define CBLAS_INDEX long +#else + #define CBLAS_INDEX int +#endif typedef enum {CblasRowMajor=101, CblasColMajor=102} CBLAS_LAYOUT; typedef enum {CblasNoTrans=111, CblasTrans=112, CblasConjTrans=113} CBLAS_TRANSPOSE; diff --git a/CBLAS/src/cblas_cdotc_sub.c b/CBLAS/src/cblas_cdotc_sub.c index d6086814..97ac8dec 100644 --- a/CBLAS/src/cblas_cdotc_sub.c +++ b/CBLAS/src/cblas_cdotc_sub.c @@ -10,7 +10,7 @@ #include "cblas.h" #include "cblas_f77.h" void cblas_cdotc_sub( const int N, const void *X, const int incX, - const void *Y, const int incY,void *dotc) + const void *Y, const int incY, void *dotc) { #ifdef F77_INT F77_INT F77_N=N, F77_incX=incX, F77_incY=incY; @@ -20,4 +20,5 @@ void cblas_cdotc_sub( const int N, const void *X, const int incX, #define F77_incY incY #endif F77_cdotc_sub( &F77_N, X, &F77_incX, Y, &F77_incY, dotc); + return; } diff --git a/CBLAS/src/cblas_cdotu_sub.c b/CBLAS/src/cblas_cdotu_sub.c index d06e4e5f..6d73d4b5 100644 --- a/CBLAS/src/cblas_cdotu_sub.c +++ b/CBLAS/src/cblas_cdotu_sub.c @@ -1,16 +1,16 @@ /* - * cblas_cdotu_sub.f + * cblas_cdotu_sub.c * * The program is a C interface to cdotu. - * It calls the forteran wrapper before calling cdotu. + * It calls the fortran wrapper before calling cdotu. * * Written by Keita Teranishi. 2/11/1998 * */ #include "cblas.h" #include "cblas_f77.h" -void cblas_cdotu_sub( const int N, const void *X, - const int incX, const void *Y, const int incY,void *dotu) +void cblas_cdotu_sub( const int N, const void *X, const int incX, + const void *Y, const int incY, void *dotu) { #ifdef F77_INT F77_INT F77_N=N, F77_incX=incX, F77_incY=incY; @@ -20,4 +20,5 @@ void cblas_cdotu_sub( const int N, const void *X, #define F77_incY incY #endif F77_cdotu_sub( &F77_N, X, &F77_incX, Y, &F77_incY, dotu); + return; } diff --git a/CBLAS/src/cblas_chpmv.c b/CBLAS/src/cblas_chpmv.c index 2daf2f81..3b587e3a 100644 --- a/CBLAS/src/cblas_chpmv.c +++ b/CBLAS/src/cblas_chpmv.c @@ -22,7 +22,7 @@ void cblas_chpmv(const CBLAS_LAYOUT layout, #define F77_UL &UL #endif #ifdef F77_INT - F77_INT F77_N=N, F77_K=K, F77_lda=lda, F77_incX=incX, F77_incY=incY; + F77_INT F77_N=N, F77_incX=incX, F77_incY=incY; #else #define F77_N N #define F77_incX incx diff --git a/CBLAS/src/cblas_cscal.c b/CBLAS/src/cblas_cscal.c index a23e6ee5..780d3124 100644 --- a/CBLAS/src/cblas_cscal.c +++ b/CBLAS/src/cblas_cscal.c @@ -1,7 +1,7 @@ /* * cblas_cscal.c * - * The program is a C interface to cscal.f. + * The program is a C interface to cscal. * * Written by Keita Teranishi. 2/11/1998 * diff --git a/CBLAS/src/cblas_dsyr2.c b/CBLAS/src/cblas_dsyr2.c index b26823a9..601e6698 100644 --- a/CBLAS/src/cblas_dsyr2.c +++ b/CBLAS/src/cblas_dsyr2.c @@ -22,7 +22,7 @@ void cblas_dsyr2(const CBLAS_LAYOUT layout, const CBLAS_UPLO Uplo, #endif #ifdef F77_INT - F77_INT F77_N=N, F77_incX=incX, F77_incY=incY, F77__lda=lda; + F77_INT F77_N=N, F77_incX=incX, F77_incY=incY, F77_lda=lda; #else #define F77_N N #define F77_incX incX diff --git a/CBLAS/src/cblas_icamax.c b/CBLAS/src/cblas_icamax.c index f0cdbdb3..52f1db61 100644 --- a/CBLAS/src/cblas_icamax.c +++ b/CBLAS/src/cblas_icamax.c @@ -11,7 +11,7 @@ #include "cblas_f77.h" CBLAS_INDEX cblas_icamax( const int N, const void *X, const int incX) { - int iamax; + CBLAS_INDEX iamax; #ifdef F77_INT F77_INT F77_N=N, F77_incX=incX; #else diff --git a/CBLAS/src/cblas_idamax.c b/CBLAS/src/cblas_idamax.c index abb70b53..07008ef4 100644 --- a/CBLAS/src/cblas_idamax.c +++ b/CBLAS/src/cblas_idamax.c @@ -11,7 +11,7 @@ #include "cblas_f77.h" CBLAS_INDEX cblas_idamax( const int N, const double *X, const int incX) { - int iamax; + CBLAS_INDEX iamax; #ifdef F77_INT F77_INT F77_N=N, F77_incX=incX; #else diff --git a/CBLAS/src/cblas_isamax.c b/CBLAS/src/cblas_isamax.c index bfd74e8f..507eb923 100644 --- a/CBLAS/src/cblas_isamax.c +++ b/CBLAS/src/cblas_isamax.c @@ -11,7 +11,7 @@ #include "cblas_f77.h" CBLAS_INDEX cblas_isamax( const int N, const float *X, const int incX) { - int iamax; + CBLAS_INDEX iamax; #ifdef F77_INT F77_INT F77_N=N, F77_incX=incX; #else diff --git a/CBLAS/src/cblas_izamax.c b/CBLAS/src/cblas_izamax.c index 21fdc396..36237498 100644 --- a/CBLAS/src/cblas_izamax.c +++ b/CBLAS/src/cblas_izamax.c @@ -11,7 +11,7 @@ #include "cblas_f77.h" CBLAS_INDEX cblas_izamax( const int N, const void *X, const int incX) { - int iamax; + CBLAS_INDEX iamax; #ifdef F77_INT F77_INT F77_N=N, F77_incX=incX; #else diff --git a/CBLAS/src/cblas_ssyr2.c b/CBLAS/src/cblas_ssyr2.c index bf2b5c88..a0fc86b0 100644 --- a/CBLAS/src/cblas_ssyr2.c +++ b/CBLAS/src/cblas_ssyr2.c @@ -22,7 +22,7 @@ void cblas_ssyr2(const CBLAS_LAYOUT layout, const CBLAS_UPLO Uplo, #endif #ifdef F77_INT - F77_INT F77_N=N, F77_incX=incX, F77_incY=incY, F77__lda=lda; + F77_INT F77_N=N, F77_incX=incX, F77_incY=incY, F77_lda=lda; #else #define F77_N N #define F77_incX incX diff --git a/CBLAS/src/cblas_strsm.c b/CBLAS/src/cblas_strsm.c index 6199fcbe..1f03a58d 100644 --- a/CBLAS/src/cblas_strsm.c +++ b/CBLAS/src/cblas_strsm.c @@ -27,7 +27,7 @@ void cblas_strsm(const CBLAS_LAYOUT layout, const CBLAS_SIDE Side, #endif #ifdef F77_INT - F77_INT F77_N=M, F77_N=N, F77_lda=lda, F77_ldb=ldb; + F77_INT F77_M=M, F77_N=N, F77_lda=lda, F77_ldb=ldb; #else #define F77_M M #define F77_N N diff --git a/CBLAS/src/cblas_zdotc_sub.c b/CBLAS/src/cblas_zdotc_sub.c index 29dec6c5..76beaeed 100644 --- a/CBLAS/src/cblas_zdotc_sub.c +++ b/CBLAS/src/cblas_zdotc_sub.c @@ -10,7 +10,7 @@ #include "cblas.h" #include "cblas_f77.h" void cblas_zdotc_sub( const int N, const void *X, const int incX, - const void *Y, const int incY, void *dotc) + const void *Y, const int incY, void *dotc) { #ifdef F77_INT F77_INT F77_N=N, F77_incX=incX, F77_incY=incY; diff --git a/CBLAS/src/cblas_zhpmv.c b/CBLAS/src/cblas_zhpmv.c index 80b3c4d3..b113ea09 100644 --- a/CBLAS/src/cblas_zhpmv.c +++ b/CBLAS/src/cblas_zhpmv.c @@ -22,7 +22,7 @@ void cblas_zhpmv(const CBLAS_LAYOUT layout, #define F77_UL &UL #endif #ifdef F77_INT - F77_INT F77_N=N, F77_K=K, F77_lda=lda, F77_incX=incX, F77_incY=incY; + F77_INT F77_N=N, F77_incX=incX, F77_incY=incY; #else #define F77_N N #define F77_incX incx diff --git a/CBLAS/src/xerbla.c b/CBLAS/src/xerbla.c index 5a7bcd8b..3d8c6a69 100644 --- a/CBLAS/src/xerbla.c +++ b/CBLAS/src/xerbla.c @@ -19,13 +19,8 @@ void F77_xerbla(char *srname, void *vinfo) char rout[] = {'c','b','l','a','s','_','\0','\0','\0','\0','\0','\0','\0'}; -#ifdef F77_INT - F77_INT *info=vinfo; - F77_INT i; -#else int *info=vinfo; int i; -#endif extern int CBLAS_CallFromC; |