blas.h 3 KB
Newer Older
Francois Gygi committed
1 2 3 4 5
////////////////////////////////////////////////////////////////////////////////
//
//  BLAS Header file
//
////////////////////////////////////////////////////////////////////////////////
Francois Gygi committed
6
// $Id: blas.h,v 1.5 2007-10-16 18:23:20 fgygi Exp $
Francois Gygi committed
7 8 9 10 11 12 13 14 15

#ifndef BLAS_H
#define BLAS_H

#include <complex>

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

Francois Gygi committed
16 17 18 19 20
#ifdef ADD_
#define dcopy  dcopy_  
#define zcopy  zcopy_  
#define daxpy  daxpy_  
#define ddot   ddot_   
Francois Gygi committed
21
#define dnrm2  dnrm2_   
Francois Gygi committed
22 23 24 25 26 27 28 29 30 31 32 33 34 35
#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
#define zgemm  zgemm_  
Francois Gygi committed
37 38 39 40 41 42
#endif

#ifdef __cplusplus
FTN_LINK {
#endif

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