PLASMA
Parallel Linear Algebra Software for Multicore Architectures
core_lapack.h
1 
10 #ifndef PLASMA_CORE_LAPACK_H
11 #define PLASMA_CORE_LAPACK_H
12 
13 #if defined(HAVE_MKL) || defined(PLASMA_WITH_MKL)
14  #define MKL_Complex16 double _Complex
15  #define MKL_Complex8 float _Complex
16 
17  #include <mkl_cblas.h>
18  #include <mkl_lapacke.h>
19 
20  // MKL LAPACKE doesn't provide LAPACK_GLOBAL macro, so define it here.
21  // MKL provides all 3 name manglings (foo, foo_, FOO); pick foo_.
22  #ifndef LAPACK_GLOBAL
23  #define LAPACK_GLOBAL(lcname,UCNAME) lcname##_
24  #endif
25 #elif defined(HAVE_ESSL) || defined(PLASMA_WITH_ESSL)
26  // GCC + ESSL(BLAS) + LAPACKE/CBLAS from LAPACK
27  #include <cblas.h>
28  #include <lapacke.h>
29 
30  #ifndef LAPACK_GLOBAL
31  #define LAPACK_GLOBAL(lcname,UCNAME) lcname##_
32  #endif
33 #else
34  #include <cblas.h>
35  #include <lapacke.h>
36 
37  // Original cblas.h does: enum CBLAS_ORDER {...};
38  // Intel mkl_cblas.h does: typedef enum {...} CBLAS_ORDER;
39  // LAPACK cblas.h does: typedef enum {...} CBLAS_ORDER;
40  // OpenBLAS cblas.h does: typedef enum CBLAS_ORDER {...} CBLAS_ORDER;
41  // We use (CBLAS_ORDER), so add these typedefs for original cblas.h
42  #ifdef CBLAS_ADD_TYPEDEF
43  typedef enum CBLAS_ORDER CBLAS_ORDER;
44  typedef enum CBLAS_TRANSPOSE CBLAS_TRANSPOSE;
45  typedef enum CBLAS_UPLO CBLAS_UPLO;
46  typedef enum CBLAS_DIAG CBLAS_DIAG;
47  typedef enum CBLAS_SIDE CBLAS_SIDE;
48  #endif
49 #endif
50 
51 #ifndef lapack_int
52 #define lapack_int int
53 #endif
54 
55 #include "core_lapack_s.h"
56 #include "core_lapack_d.h"
57 #include "core_lapack_c.h"
58 #include "core_lapack_z.h"
59 
60 #endif // PLASMA_CORE_LAPACK_H