Skip to content

Commit

Permalink
Merge pull request #460 from epsilon-0/master
Browse files Browse the repository at this point in the history
enable building the cblas64 library
  • Loading branch information
langou authored Oct 31, 2020
2 parents 4fbb4f8 + 4177968 commit a6870da
Show file tree
Hide file tree
Showing 143 changed files with 740 additions and 743 deletions.
682 changes: 341 additions & 341 deletions CBLAS/include/cblas.h

Large diffs are not rendered by default.

11 changes: 4 additions & 7 deletions CBLAS/include/cblas_f77.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

#ifdef WeirdNEC
#define F77_INT long
#else
#define F77_INT int
#endif

#ifdef F77_CHAR
Expand All @@ -27,13 +29,8 @@
#define FCHAR char *
#endif

#ifdef F77_INT
#define FINT const F77_INT *
#define FINT2 F77_INT *
#else
#define FINT const int *
#define FINT2 int *
#endif
#define FINT const F77_INT *
#define FINT2 F77_INT *

/*
* Level 1 BLAS
Expand Down
4 changes: 2 additions & 2 deletions CBLAS/src/cblas_caxpy.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
*/
#include "cblas.h"
#include "cblas_f77.h"
void cblas_caxpy( const int N, const void *alpha, const void *X,
const int incX, void *Y, const int incY)
void cblas_caxpy( const CBLAS_INDEX N, const void *alpha, const void *X,
const CBLAS_INDEX incX, void *Y, const CBLAS_INDEX incY)
{
#ifdef F77_INT
F77_INT F77_N=N, F77_incX=incX, F77_incY=incY;
Expand Down
4 changes: 2 additions & 2 deletions CBLAS/src/cblas_ccopy.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
*/
#include "cblas.h"
#include "cblas_f77.h"
void cblas_ccopy( const int N, const void *X,
const int incX, void *Y, const int incY)
void cblas_ccopy( const CBLAS_INDEX N, const void *X,
const CBLAS_INDEX incX, void *Y, const CBLAS_INDEX incY)
{
#ifdef F77_INT
F77_INT F77_N=N, F77_incX=incX, F77_incY=incY;
Expand Down
4 changes: 2 additions & 2 deletions CBLAS/src/cblas_cdotc_sub.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
*/
#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)
void cblas_cdotc_sub( const CBLAS_INDEX N, const void *X, const CBLAS_INDEX incX,
const void *Y, const CBLAS_INDEX incY, void *dotc)
{
#ifdef F77_INT
F77_INT F77_N=N, F77_incX=incX, F77_incY=incY;
Expand Down
4 changes: 2 additions & 2 deletions CBLAS/src/cblas_cdotu_sub.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
*/
#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 CBLAS_INDEX N, const void *X, const CBLAS_INDEX incX,
const void *Y, const CBLAS_INDEX incY, void *dotu)
{
#ifdef F77_INT
F77_INT F77_N=N, F77_incX=incX, F77_incY=incY;
Expand Down
14 changes: 7 additions & 7 deletions CBLAS/src/cblas_cgbmv.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
#include "cblas.h"
#include "cblas_f77.h"
void cblas_cgbmv(const CBLAS_LAYOUT layout,
const CBLAS_TRANSPOSE TransA, const int M, const int N,
const int KL, const int KU,
const void *alpha, const void *A, const int lda,
const void *X, const int incX, const void *beta,
void *Y, const int incY)
const CBLAS_TRANSPOSE TransA, const CBLAS_INDEX M, const CBLAS_INDEX N,
const CBLAS_INDEX KL, const CBLAS_INDEX KU,
const void *alpha, const void *A, const CBLAS_INDEX lda,
const void *X, const CBLAS_INDEX incX, const void *beta,
void *Y, const CBLAS_INDEX incY)
{
char TA;
#ifdef F77_CHAR
Expand All @@ -34,10 +34,10 @@ void cblas_cgbmv(const CBLAS_LAYOUT layout,
#define F77_incX incx
#define F77_incY incY
#endif
int n=0, i=0, incx=incX;
CBLAS_INDEX n=0, i=0, incx=incX;
const float *xx= (float *)X, *alp= (float *)alpha, *bet = (float *)beta;
float ALPHA[2],BETA[2];
int tincY, tincx;
CBLAS_INDEX tincY, tincx;
float *x=(float *)X, *y=(float *)Y, *st=0, *tx=0;
extern int CBLAS_CallFromC;
extern int RowMajorStrg;
Expand Down
8 changes: 4 additions & 4 deletions CBLAS/src/cblas_cgemm.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
#include "cblas.h"
#include "cblas_f77.h"
void cblas_cgemm(const CBLAS_LAYOUT layout, const CBLAS_TRANSPOSE TransA,
const CBLAS_TRANSPOSE TransB, const int M, const int N,
const int K, const void *alpha, const void *A,
const int lda, const void *B, const int ldb,
const void *beta, void *C, const int ldc)
const CBLAS_TRANSPOSE TransB, const CBLAS_INDEX M, const CBLAS_INDEX N,
const CBLAS_INDEX K, const void *alpha, const void *A,
const CBLAS_INDEX lda, const void *B, const CBLAS_INDEX ldb,
const void *beta, void *C, const CBLAS_INDEX ldc)
{
char TA, TB;
#ifdef F77_CHAR
Expand Down
12 changes: 6 additions & 6 deletions CBLAS/src/cblas_cgemv.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
#include "cblas.h"
#include "cblas_f77.h"
void cblas_cgemv(const CBLAS_LAYOUT layout,
const CBLAS_TRANSPOSE TransA, const int M, const int N,
const void *alpha, const void *A, const int lda,
const void *X, const int incX, const void *beta,
void *Y, const int incY)
const CBLAS_TRANSPOSE TransA, const CBLAS_INDEX M, const CBLAS_INDEX N,
const void *alpha, const void *A, const CBLAS_INDEX lda,
const void *X, const CBLAS_INDEX incX, const void *beta,
void *Y, const CBLAS_INDEX incY)
{
char TA;
#ifdef F77_CHAR
Expand All @@ -31,10 +31,10 @@ void cblas_cgemv(const CBLAS_LAYOUT layout,
#define F77_incY incY
#endif

int n=0, i=0, incx=incX;
CBLAS_INDEX n=0, i=0, incx=incX;
const float *xx= (const float *)X;
float ALPHA[2],BETA[2];
int tincY, tincx;
CBLAS_INDEX tincY, tincx;
float *x=(float *)X, *y=(float *)Y, *st=0, *tx=0;
const float *stx = x;
extern int CBLAS_CallFromC;
Expand Down
8 changes: 4 additions & 4 deletions CBLAS/src/cblas_cgerc.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
#include <stdlib.h>
#include "cblas.h"
#include "cblas_f77.h"
void cblas_cgerc(const CBLAS_LAYOUT layout, const int M, const int N,
const void *alpha, const void *X, const int incX,
const void *Y, const int incY, void *A, const int lda)
void cblas_cgerc(const CBLAS_LAYOUT layout, const CBLAS_INDEX M, const CBLAS_INDEX N,
const void *alpha, const void *X, const CBLAS_INDEX incX,
const void *Y, const CBLAS_INDEX incY, void *A, const CBLAS_INDEX lda)
{
#ifdef F77_INT
F77_INT F77_M=M, F77_N=N, F77_lda=lda, F77_incX=incX, F77_incY=incY;
Expand All @@ -23,7 +23,7 @@ void cblas_cgerc(const CBLAS_LAYOUT layout, const int M, const int N,
#define F77_lda lda
#endif

int n, i, tincy, incy=incY;
CBLAS_INDEX n, i, tincy, incy=incY;
float *y=(float *)Y, *yy=(float *)Y, *ty, *st;

extern int CBLAS_CallFromC;
Expand Down
6 changes: 3 additions & 3 deletions CBLAS/src/cblas_cgeru.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
*/
#include "cblas.h"
#include "cblas_f77.h"
void cblas_cgeru(const CBLAS_LAYOUT layout, const int M, const int N,
const void *alpha, const void *X, const int incX,
const void *Y, const int incY, void *A, const int lda)
void cblas_cgeru(const CBLAS_LAYOUT layout, const CBLAS_INDEX M, const CBLAS_INDEX N,
const void *alpha, const void *X, const CBLAS_INDEX incX,
const void *Y, const CBLAS_INDEX incY, void *A, const CBLAS_INDEX lda)
{
#ifdef F77_INT
F77_INT F77_M=M, F77_N=N, F77_lda=lda, F77_incX=incX, F77_incY=incY;
Expand Down
12 changes: 6 additions & 6 deletions CBLAS/src/cblas_chbmv.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
#include <stdio.h>
#include <stdlib.h>
void cblas_chbmv(const CBLAS_LAYOUT layout,
const CBLAS_UPLO Uplo,const int N,const int K,
const void *alpha, const void *A, const int lda,
const void *X, const int incX, const void *beta,
void *Y, const int incY)
const CBLAS_UPLO Uplo,const CBLAS_INDEX N,const CBLAS_INDEX K,
const void *alpha, const void *A, const CBLAS_INDEX lda,
const void *X, const CBLAS_INDEX incX, const void *beta,
void *Y, const CBLAS_INDEX incY)
{
char UL;
#ifdef F77_CHAR
Expand All @@ -30,10 +30,10 @@ void cblas_chbmv(const CBLAS_LAYOUT layout,
#define F77_incX incx
#define F77_incY incY
#endif
int n, i=0, incx=incX;
CBLAS_INDEX n, i=0, incx=incX;
const float *xx= (float *)X, *alp= (float *)alpha, *bet = (float *)beta;
float ALPHA[2],BETA[2];
int tincY, tincx;
CBLAS_INDEX tincY, tincx;
float *x=(float *)X, *y=(float *)Y, *st=0, *tx;
extern int CBLAS_CallFromC;
extern int RowMajorStrg;
Expand Down
8 changes: 4 additions & 4 deletions CBLAS/src/cblas_chemm.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
#include "cblas.h"
#include "cblas_f77.h"
void cblas_chemm(const CBLAS_LAYOUT layout, const CBLAS_SIDE Side,
const CBLAS_UPLO Uplo, const int M, const int N,
const void *alpha, const void *A, const int lda,
const void *B, const int ldb, const void *beta,
void *C, const int ldc)
const CBLAS_UPLO Uplo, const CBLAS_INDEX M, const CBLAS_INDEX N,
const void *alpha, const void *A, const CBLAS_INDEX lda,
const void *B, const CBLAS_INDEX ldb, const void *beta,
void *C, const CBLAS_INDEX ldc)
{
char SD, UL;
#ifdef F77_CHAR
Expand Down
12 changes: 6 additions & 6 deletions CBLAS/src/cblas_chemv.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
#include "cblas.h"
#include "cblas_f77.h"
void cblas_chemv(const CBLAS_LAYOUT layout,
const CBLAS_UPLO Uplo, const int N,
const void *alpha, const void *A, const int lda,
const void *X, const int incX, const void *beta,
void *Y, const int incY)
const CBLAS_UPLO Uplo, const CBLAS_INDEX N,
const void *alpha, const void *A, const CBLAS_INDEX lda,
const void *X, const CBLAS_INDEX incX, const void *beta,
void *Y, const CBLAS_INDEX incY)
{
char UL;
#ifdef F77_CHAR
Expand All @@ -29,10 +29,10 @@ void cblas_chemv(const CBLAS_LAYOUT layout,
#define F77_incX incx
#define F77_incY incY
#endif
int n=0, i=0, incx=incX;
CBLAS_INDEX n=0, i=0, incx=incX;
const float *xx= (float *)X, *alp= (float *)alpha, *bet = (float *)beta;
float ALPHA[2],BETA[2];
int tincY, tincx;
CBLAS_INDEX tincY, tincx;
float *x=(float *)X, *y=(float *)Y, *st=0, *tx;
extern int CBLAS_CallFromC;
extern int RowMajorStrg;
Expand Down
6 changes: 3 additions & 3 deletions CBLAS/src/cblas_cher.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
#include "cblas.h"
#include "cblas_f77.h"
void cblas_cher(const CBLAS_LAYOUT layout, const CBLAS_UPLO Uplo,
const int N, const float alpha, const void *X, const int incX
,void *A, const int lda)
const CBLAS_INDEX N, const float alpha, const void *X, const CBLAS_INDEX incX
,void *A, const CBLAS_INDEX lda)
{
char UL;
#ifdef F77_CHAR
Expand All @@ -27,7 +27,7 @@ void cblas_cher(const CBLAS_LAYOUT layout, const CBLAS_UPLO Uplo,
#define F77_lda lda
#define F77_incX incx
#endif
int n, i, tincx, incx=incX;
CBLAS_INDEX n, i, tincx, incx=incX;
float *x=(float *)X, *xx=(float *)X, *tx, *st;

extern int CBLAS_CallFromC;
Expand Down
6 changes: 3 additions & 3 deletions CBLAS/src/cblas_cher2.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
#include "cblas.h"
#include "cblas_f77.h"
void cblas_cher2(const CBLAS_LAYOUT layout, const CBLAS_UPLO Uplo,
const int N, const void *alpha, const void *X, const int incX,
const void *Y, const int incY, void *A, const int lda)
const CBLAS_INDEX N, const void *alpha, const void *X, const CBLAS_INDEX incX,
const void *Y, const CBLAS_INDEX incY, void *A, const CBLAS_INDEX lda)
{
char UL;
#ifdef F77_CHAR
Expand All @@ -28,7 +28,7 @@ void cblas_cher2(const CBLAS_LAYOUT layout, const CBLAS_UPLO Uplo,
#define F77_incX incx
#define F77_incY incy
#endif
int n, i, j, tincx, tincy, incx=incX, incy=incY;
CBLAS_INDEX n, i, j, tincx, tincy, incx=incX, incy=incY;
float *x=(float *)X, *xx=(float *)X, *y=(float *)Y,
*yy=(float *)Y, *tx, *ty, *stx, *sty;

Expand Down
8 changes: 4 additions & 4 deletions CBLAS/src/cblas_cher2k.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
#include "cblas.h"
#include "cblas_f77.h"
void cblas_cher2k(const CBLAS_LAYOUT layout, const CBLAS_UPLO Uplo,
const CBLAS_TRANSPOSE Trans, const int N, const int K,
const void *alpha, const void *A, const int lda,
const void *B, const int ldb, const float beta,
void *C, const int ldc)
const CBLAS_TRANSPOSE Trans, const CBLAS_INDEX N, const CBLAS_INDEX K,
const void *alpha, const void *A, const CBLAS_INDEX lda,
const void *B, const CBLAS_INDEX ldb, const float beta,
void *C, const CBLAS_INDEX ldc)
{
char UL, TR;
#ifdef F77_CHAR
Expand Down
6 changes: 3 additions & 3 deletions CBLAS/src/cblas_cherk.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
#include "cblas.h"
#include "cblas_f77.h"
void cblas_cherk(const CBLAS_LAYOUT layout, const CBLAS_UPLO Uplo,
const CBLAS_TRANSPOSE Trans, const int N, const int K,
const float alpha, const void *A, const int lda,
const float beta, void *C, const int ldc)
const CBLAS_TRANSPOSE Trans, const CBLAS_INDEX N, const CBLAS_INDEX K,
const float alpha, const void *A, const CBLAS_INDEX lda,
const float beta, void *C, const CBLAS_INDEX ldc)
{
char UL, TR;
#ifdef F77_CHAR
Expand Down
10 changes: 5 additions & 5 deletions CBLAS/src/cblas_chpmv.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
#include "cblas.h"
#include "cblas_f77.h"
void cblas_chpmv(const CBLAS_LAYOUT layout,
const CBLAS_UPLO Uplo,const int N,
const CBLAS_UPLO Uplo,const CBLAS_INDEX N,
const void *alpha, const void *AP,
const void *X, const int incX, const void *beta,
void *Y, const int incY)
const void *X, const CBLAS_INDEX incX, const void *beta,
void *Y, const CBLAS_INDEX incY)
{
char UL;
#ifdef F77_CHAR
Expand All @@ -28,10 +28,10 @@ void cblas_chpmv(const CBLAS_LAYOUT layout,
#define F77_incX incx
#define F77_incY incY
#endif
int n, i=0, incx=incX;
CBLAS_INDEX n, i=0, incx=incX;
const float *xx= (float *)X, *alp= (float *)alpha, *bet = (float *)beta;
float ALPHA[2],BETA[2];
int tincY, tincx;
CBLAS_INDEX tincY, tincx;
float *x=(float *)X, *y=(float *)Y, *st=0, *tx;
extern int CBLAS_CallFromC;
extern int RowMajorStrg;
Expand Down
6 changes: 3 additions & 3 deletions CBLAS/src/cblas_chpr.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
#include "cblas.h"
#include "cblas_f77.h"
void cblas_chpr(const CBLAS_LAYOUT layout, const CBLAS_UPLO Uplo,
const int N, const float alpha, const void *X,
const int incX, void *A)
const CBLAS_INDEX N, const float alpha, const void *X,
const CBLAS_INDEX incX, void *A)
{
char UL;
#ifdef F77_CHAR
Expand All @@ -26,7 +26,7 @@ void cblas_chpr(const CBLAS_LAYOUT layout, const CBLAS_UPLO Uplo,
#define F77_N N
#define F77_incX incx
#endif
int n, i, tincx, incx=incX;
CBLAS_INDEX n, i, tincx, incx=incX;
float *x=(float *)X, *xx=(float *)X, *tx, *st;

extern int CBLAS_CallFromC;
Expand Down
6 changes: 3 additions & 3 deletions CBLAS/src/cblas_chpr2.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
#include "cblas.h"
#include "cblas_f77.h"
void cblas_chpr2(const CBLAS_LAYOUT layout, const CBLAS_UPLO Uplo,
const int N,const void *alpha, const void *X,
const int incX,const void *Y, const int incY, void *Ap)
const CBLAS_INDEX N,const void *alpha, const void *X,
const CBLAS_INDEX incX,const void *Y, const CBLAS_INDEX incY, void *Ap)

{
char UL;
Expand All @@ -28,7 +28,7 @@ void cblas_chpr2(const CBLAS_LAYOUT layout, const CBLAS_UPLO Uplo,
#define F77_incX incx
#define F77_incY incy
#endif
int n, i, j, tincx, tincy, incx=incX, incy=incY;
CBLAS_INDEX n, i, j, tincx, tincy, incx=incX, incy=incY;
float *x=(float *)X, *xx=(float *)X, *y=(float *)Y,
*yy=(float *)Y, *tx, *ty, *stx, *sty;

Expand Down
4 changes: 2 additions & 2 deletions CBLAS/src/cblas_cscal.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
*/
#include "cblas.h"
#include "cblas_f77.h"
void cblas_cscal( const int N, const void *alpha, void *X,
const int incX)
void cblas_cscal( const CBLAS_INDEX N, const void *alpha, void *X,
const CBLAS_INDEX incX)
{
#ifdef F77_INT
F77_INT F77_N=N, F77_incX=incX;
Expand Down
Loading

0 comments on commit a6870da

Please sign in to comment.