1 #include <cxxblas/cxxblas.cxx>
 2 
 3 extern "C" {
 4 
 5 #ifndef COMPLEX_FLOAT1
 6     typedef CBLAS_FLOAT                 CXXBLAS_FLOAT;
 7 #else
 8     typedef std::complex<CBLAS_FLOAT>   CXXBLAS_FLOAT;
 9 #endif
10 
11     CXXBLAS_FLOAT
12     CBLAS_NAME(CBLAS_INT n,
13                const CBLAS_FLOAT *_x, CBLAS_INT incX,
14                const CBLAS_FLOAT *_y, CBLAS_INT incY)
15 #ifdef CREATE_CBLAS
16     {
17         const CXXBLAS_FLOAT *x = reinterpret_cast<const CXXBLAS_FLOAT *>(_x);
18         const CXXBLAS_FLOAT *y = reinterpret_cast<const CXXBLAS_FLOAT *>(_y);
19 
20         CXXBLAS_FLOAT result;
21         cxxblas::dotu<CBLAS_INT,
22                       CXXBLAS_FLOAT,
23                       CXXBLAS_FLOAT,
24                       CXXBLAS_FLOAT>(n, x, incX, y, incY, result);
25         return result;
26     }
27 #else
28     ;
29 #endif // CREATE_CBLAS
30 
31 #ifdef CREATE_BLAS
32     CXXBLAS_FLOAT
33     BLAS_NAME(CBLAS_INT *_n,
34               const CBLAS_FLOAT *x, CBLAS_INT *_incX,
35               const CBLAS_FLOAT *y, CBLAS_INT *_incY)
36     {
37 
38         CBLAS_INT n    = *_n;
39         CBLAS_INT incX = *_incX;
40         CBLAS_INT incY = *_incY;
41 
42         // the blas interface calls the cblas interface
43         // so any blas-test will also test the cblas-interface
44         return CBLAS_NAME(n, x, incX, y, incY);
45     }
46 #endif // CREATE_BLAS
47 
48 // extern "C"