Toast++  1.0.2 (r.539)
Forward and inverse modelling in optical tomography
fblas.h
1 // FORTRAN BLAS interface
2 
3 #ifndef __FBLAS_H
4 #define __FBLAS_H
5 
6 #include <complex>
7 
8 //typedef int integer;
9 typedef struct { double r, i; } dcomplex;
10 
11 extern "C" {
12 
13  // BLAS level 1 interfaces
14 
15  void dscal_ (int&, const double&, double*, int&);
16  void sscal_ (int&, const float&, float*, int&);
17  void zscal_ (int&, const std::complex<double>&, std::complex<double>*, int&);
18 
19  void daxpy_ (int&, double&, double*, int&, double*, int&);
20  void saxpy_ (int&, float&, float*, int&, float*, int&);
21 
22  void dcopy_ (int&, double*, int&, double*, int&);
23  void scopy_ (int&, float*, int&, float*, int&);
24 
25  double ddot_ (int&, double*, int&, double*, int&);
26  float sdot_ (int&, float*, int&, float*, int&);
27  dcomplex zdotu_ (int*, dcomplex*, int*, dcomplex*, int*);
28  dcomplex zdotc_ (int&, std::complex<double>*, int&, std::complex<double>*,
29  int&);
30 
31  double dnrm2_ (int&, double*, int&);
32  float snrm2_ (int&, float*, int&);
33  double dznrm2_ (int&, std::complex<double>*, int&);
34 
35  int dsyrk_ (char&, char&, int&, int&, double&, const double*, int&,
36  double&, double*, int&);
37  int ssyrk_ (char&, char&, int&, int&, float&, const float*, int&,
38  float&, float*, int&);
39  int zsyrk_ (char&, char&, int&, int&, std::complex<double>&,
40  const std::complex<double>*, int&, std::complex<double>&,
41  std::complex<double>*, int&);
42 
43  // BLAS level 2 interfaces
44 
45  void dgemv_ (char&, int&, int&, double&, double*, int&,
46  const double*, int&, double&, double*, int&);
47  void sgemv_ (char&, int&, int&, float&, float*, int&,
48  const float*, int&, float&, float*, int&);
49  void zgemv_ (char&, int&, int&, std::complex<double>&, std::complex<double>*, int&,
50  const std::complex<double>*, int&, std::complex<double>&,
51  std::complex<double>*, int&);
52 
53  // BLAS level 3 interfaces
54 
55  void dgemm_ (char&, char&, int&, int&, int&, double&, double*, int&,
56  double*, int&, double&, double*, int&);
57  void sgemm_ (char&, char&, int&, int&, int&, float&, float*, int&,
58  float*, int&, float&, float*, int&);
59  void zgemm_ (char&, char&, int&, int&, int&, std::complex<double>&,
60  std::complex<double>*, int&,
61  std::complex<double>*, int&, std::complex<double>&, std::complex<double>*,
62  int&);
63 
64  // sparse BLAS toolkit interface
65 
66  void dcsrmmz_(int&, int&, int&, int&, double&, int*, double*, int*,
67  int*, int*, const double*, int&, double&, double*, int&,
68  double*, int&);
69 }
70 
71 #endif // !__FBLAS_H
Definition: fblas.h:9