Skip to content

Using CBLAS_INDEX and CBLAS_INT integer types in CBLAS #588

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CBLAS/examples/cblas_example1.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ int main ( )

double *a, *x, *y;
double alpha, beta;
CBLAS_INDEX m, n, lda, incx, incy, i;
CBLAS_INT m, n, lda, incx, incy, i;

Layout = CblasColMajor;
transa = CblasNoTrans;
Expand Down
2 changes: 1 addition & 1 deletion CBLAS/examples/cblas_example2.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

int main (int argc, char **argv )
{
CBLAS_INDEX rout=-1,info=0,m,n,k,lda,ldb,ldc;
CBLAS_INT rout=-1,info=0,m,n,k,lda,ldb,ldc;
double A[2] = {0.0,0.0},
B[2] = {0.0,0.0},
C[2] = {0.0,0.0},
Expand Down
689 changes: 347 additions & 342 deletions CBLAS/include/cblas.h

Large diffs are not rendered by default.

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 CBLAS_INDEX N, const void *alpha, const void *X,
const CBLAS_INDEX incX, void *Y, const CBLAS_INDEX incY)
void cblas_caxpy( const CBLAS_INT N, const void *alpha, const void *X,
const CBLAS_INT incX, void *Y, const CBLAS_INT 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 CBLAS_INDEX N, const void *X,
const CBLAS_INDEX incX, void *Y, const CBLAS_INDEX incY)
void cblas_ccopy( const CBLAS_INT N, const void *X,
const CBLAS_INT incX, void *Y, const CBLAS_INT 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 CBLAS_INDEX N, const void *X, const CBLAS_INDEX incX,
const void *Y, const CBLAS_INDEX incY, void *dotc)
void cblas_cdotc_sub( const CBLAS_INT N, const void *X, const CBLAS_INT incX,
const void *Y, const CBLAS_INT 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 CBLAS_INDEX N, const void *X, const CBLAS_INDEX incX,
const void *Y, const CBLAS_INDEX incY, void *dotu)
void cblas_cdotu_sub( const CBLAS_INT N, const void *X, const CBLAS_INT incX,
const void *Y, const CBLAS_INT 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 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)
const CBLAS_TRANSPOSE TransA, const CBLAS_INT M, const CBLAS_INT N,
const CBLAS_INT KL, const CBLAS_INT KU,
const void *alpha, const void *A, const CBLAS_INT lda,
const void *X, const CBLAS_INT incX, const void *beta,
void *Y, const CBLAS_INT 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
CBLAS_INDEX n=0, i=0, incx=incX;
CBLAS_INT n=0, i=0, incx=incX;
const float *xx= (float *)X, *alp= (float *)alpha, *bet = (float *)beta;
float ALPHA[2],BETA[2];
CBLAS_INDEX tincY, tincx;
CBLAS_INT 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 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)
const CBLAS_TRANSPOSE TransB, const CBLAS_INT M, const CBLAS_INT N,
const CBLAS_INT K, const void *alpha, const void *A,
const CBLAS_INT lda, const void *B, const CBLAS_INT ldb,
const void *beta, void *C, const CBLAS_INT 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 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)
const CBLAS_TRANSPOSE TransA, const CBLAS_INT M, const CBLAS_INT N,
const void *alpha, const void *A, const CBLAS_INT lda,
const void *X, const CBLAS_INT incX, const void *beta,
void *Y, const CBLAS_INT incY)
{
char TA;
#ifdef F77_CHAR
Expand All @@ -31,10 +31,10 @@ void cblas_cgemv(const CBLAS_LAYOUT layout,
#define F77_incY incY
#endif

CBLAS_INDEX n=0, i=0, incx=incX;
CBLAS_INT n=0, i=0, incx=incX;
const float *xx= (const float *)X;
float ALPHA[2],BETA[2];
CBLAS_INDEX tincY, tincx;
CBLAS_INT 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 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)
void cblas_cgerc(const CBLAS_LAYOUT layout, const CBLAS_INT M, const CBLAS_INT N,
const void *alpha, const void *X, const CBLAS_INT incX,
const void *Y, const CBLAS_INT incY, void *A, const CBLAS_INT 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 CBLAS_INDEX M, const CBLAS_IND
#define F77_lda lda
#endif

CBLAS_INDEX n, i, tincy, incy=incY;
CBLAS_INT 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 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)
void cblas_cgeru(const CBLAS_LAYOUT layout, const CBLAS_INT M, const CBLAS_INT N,
const void *alpha, const void *X, const CBLAS_INT incX,
const void *Y, const CBLAS_INT incY, void *A, const CBLAS_INT 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 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)
const CBLAS_UPLO Uplo,const CBLAS_INT N,const CBLAS_INT K,
const void *alpha, const void *A, const CBLAS_INT lda,
const void *X, const CBLAS_INT incX, const void *beta,
void *Y, const CBLAS_INT 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
CBLAS_INDEX n, i=0, incx=incX;
CBLAS_INT n, i=0, incx=incX;
const float *xx= (float *)X, *alp= (float *)alpha, *bet = (float *)beta;
float ALPHA[2],BETA[2];
CBLAS_INDEX tincY, tincx;
CBLAS_INT 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 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)
const CBLAS_UPLO Uplo, const CBLAS_INT M, const CBLAS_INT N,
const void *alpha, const void *A, const CBLAS_INT lda,
const void *B, const CBLAS_INT ldb, const void *beta,
void *C, const CBLAS_INT 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 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)
const CBLAS_UPLO Uplo, const CBLAS_INT N,
const void *alpha, const void *A, const CBLAS_INT lda,
const void *X, const CBLAS_INT incX, const void *beta,
void *Y, const CBLAS_INT 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
CBLAS_INDEX n=0, i=0, incx=incX;
CBLAS_INT n=0, i=0, incx=incX;
const float *xx= (float *)X, *alp= (float *)alpha, *bet = (float *)beta;
float ALPHA[2],BETA[2];
CBLAS_INDEX tincY, tincx;
CBLAS_INT 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 CBLAS_INDEX N, const float alpha, const void *X, const CBLAS_INDEX incX
,void *A, const CBLAS_INDEX lda)
const CBLAS_INT N, const float alpha, const void *X, const CBLAS_INT incX
,void *A, const CBLAS_INT 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
CBLAS_INDEX n, i, tincx, incx=incX;
CBLAS_INT 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 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)
const CBLAS_INT N, const void *alpha, const void *X, const CBLAS_INT incX,
const void *Y, const CBLAS_INT incY, void *A, const CBLAS_INT 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
CBLAS_INDEX n, i, j, tincx, tincy, incx=incX, incy=incY;
CBLAS_INT 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 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)
const CBLAS_TRANSPOSE Trans, const CBLAS_INT N, const CBLAS_INT K,
const void *alpha, const void *A, const CBLAS_INT lda,
const void *B, const CBLAS_INT ldb, const float beta,
void *C, const CBLAS_INT 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 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)
const CBLAS_TRANSPOSE Trans, const CBLAS_INT N, const CBLAS_INT K,
const float alpha, const void *A, const CBLAS_INT lda,
const float beta, void *C, const CBLAS_INT 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 CBLAS_INDEX N,
const CBLAS_UPLO Uplo,const CBLAS_INT N,
const void *alpha, const void *AP,
const void *X, const CBLAS_INDEX incX, const void *beta,
void *Y, const CBLAS_INDEX incY)
const void *X, const CBLAS_INT incX, const void *beta,
void *Y, const CBLAS_INT 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
CBLAS_INDEX n, i=0, incx=incX;
CBLAS_INT n, i=0, incx=incX;
const float *xx= (float *)X, *alp= (float *)alpha, *bet = (float *)beta;
float ALPHA[2],BETA[2];
CBLAS_INDEX tincY, tincx;
CBLAS_INT 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 CBLAS_INDEX N, const float alpha, const void *X,
const CBLAS_INDEX incX, void *A)
const CBLAS_INT N, const float alpha, const void *X,
const CBLAS_INT 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
CBLAS_INDEX n, i, tincx, incx=incX;
CBLAS_INT 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 CBLAS_INDEX N,const void *alpha, const void *X,
const CBLAS_INDEX incX,const void *Y, const CBLAS_INDEX incY, void *Ap)
const CBLAS_INT N,const void *alpha, const void *X,
const CBLAS_INT incX,const void *Y, const CBLAS_INT 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
CBLAS_INDEX n, i, j, tincx, tincy, incx=incX, incy=incY;
CBLAS_INT 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 CBLAS_INDEX N, const void *alpha, void *X,
const CBLAS_INDEX incX)
void cblas_cscal( const CBLAS_INT N, const void *alpha, void *X,
const CBLAS_INT incX)
{
#ifdef F77_INT
F77_INT F77_N=N, F77_incX=incX;
Expand Down
4 changes: 2 additions & 2 deletions CBLAS/src/cblas_csscal.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_csscal( const CBLAS_INDEX N, const float alpha, void *X,
const CBLAS_INDEX incX)
void cblas_csscal( const CBLAS_INT N, const float alpha, void *X,
const CBLAS_INT incX)
{
#ifdef F77_INT
F77_INT F77_N=N, F77_incX=incX;
Expand Down
Loading