blas.h 2.67 KB
Newer Older
Francois Gygi committed
1 2 3 4 5
////////////////////////////////////////////////////////////////////////////////
//
//  BLAS Header file
//
////////////////////////////////////////////////////////////////////////////////
Francois Gygi committed
6
// $Id: blas.h,v 1.3 2004-08-11 17:56:24 fgygi Exp $
Francois Gygi committed
7 8 9 10 11 12 13 14 15 16

#ifndef BLAS_H
#define BLAS_H

#include <complex>
using namespace std;

// default value for most compilers
#define FTN_LINK extern "C"

Francois Gygi committed
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
#ifdef ADD_
#define dcopy  dcopy_  
#define zcopy  zcopy_  
#define daxpy  daxpy_  
#define ddot   ddot_   
#define drot   drot_   
#define dasum  dasum_  
#define dsbmv  dsbmv_  
#define dgemm  dgemm_  
#define dgesv  dgesv_  
#define dgemv  dgemv_  
#define dscal  dscal_  
#define dsyev  dsyev_  
#define zdscal zdscal_ 
#define idamax idamax_ 
#define dvea   dvea_   
#define dyax   dyax_   
#define dnaxpy dnaxpy_ 
#define dger   dger_   
Francois Gygi committed
36 37 38 39 40 41
#endif

#ifdef __cplusplus
FTN_LINK {
#endif

Francois Gygi committed
42
void dcopy(int *n, double *x, int *incx, 
Francois Gygi committed
43
double *y, int *incy );
Francois Gygi committed
44
void zcopy(int *n, complex<double> *x, int *incx, 
Francois Gygi committed
45
complex<double> *y, int *incy );
Francois Gygi committed
46
void daxpy(int *n, double *alpha, double *x, int *incx,
Francois Gygi committed
47
double *y, int *incy );
Francois Gygi committed
48
double ddot(const int *n, const double *a, const int *inca, 
49
const double *b, const int *incb);
Francois Gygi committed
50 51
void drot(int*, double*, int*, double*, int*, double*, double*);
void dgemm(char *ta, char *tb, int *m, int *n, int *k,
Francois Gygi committed
52 53
double *alpha, double *a, int *lda, double *b, int *ldb,
double *beta, double *c, int *ldc);
Francois Gygi committed
54
void dgemv( char *ta, int *m, int *n,
Francois Gygi committed
55 56 57 58
                   double *alpha,  double *a, int *tda,
                   double *x,    int *incx,
                   double *beta,   double *y, int *incy );
 
Francois Gygi committed
59
void dger(int *,int *, double *, double *, int *,
Francois Gygi committed
60 61
          double *, int *, double *, int *);
 
Francois Gygi committed
62 63 64 65
void dscal(int *len, double *alpha, double *x, int *incx);
double dasum(int *len, double *x, int *incx);
int idamax(int *len, double *x, int *incx);
void dsyev(char *c1,char *c2,int *n, 
Francois Gygi committed
66 67 68
double *a,int *lda, double *wr,
double *wrk,int *lwrk, int *ierr);
void zdscal_(int *n,double *alpha,complex<double> *x,int *incx);
Francois Gygi committed
69
void dgbmv(char *trans, int *m, int *n,
Francois Gygi committed
70 71 72
int *kl, int *ku, double *alpha, double *a, 
int *lda, double *x, int *incx, double *beta,
double *y, int *incy);
Francois Gygi committed
73
void dsbmv(char *uplo, int *n, int *k,
Francois Gygi committed
74 75
double *alpha, double *a, int *lda, double *x, int *incx,
double *beta, double *y, int *incy);
Francois Gygi committed
76
void sspev(char *vec,char *uplo,int *size,double *ap,
Francois Gygi committed
77
double *wr,double *z,int *n,double *wrk,int *ierr);
Francois Gygi committed
78
void dgesv(int *n, int *nrhs, double *a, int *lda, int *ipiv, 
Francois Gygi committed
79 80
double *b, int *ldb, int *info);
 
Francois Gygi committed
81 82 83
void dvea(int*,double*,int*,double*,int*,double*,int*);
void dyax(int*,double*,double*,int*,double*,int*);
void dnaxpy(int*,int*,double*,int*,double*,int*,int*,double*,int*,int*);
Francois Gygi committed
84 85 86 87 88 89
 
#ifdef __cplusplus
}
#endif
 
#endif