tensor-0.1.0
 All Data Structures Namespaces Functions Variables Typedefs Enumerations Enumerator Groups Pages
tensor_lapack.h
1 // -*- mode: c++; fill-column: 80; c-basic-offset: 2; indent-tabs-mode: nil -*-
2 /*
3  Copyright (c) 2010 Juan Jose Garcia Ripoll
4 
5  Tensor is free software; you can redistribute it and/or modify it
6  under the terms of the GNU Library General Public License as published
7  by the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU Library General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License along
16  with this program; if not, write to the Free Software Foundation, Inc.,
17  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19 
20 #ifndef TENSOR_TENSOR_LAPACK_H
21 #define TENSOR_TENSOR_LAPACK_H
22 
23 #include <tensor/tensor_blas.h>
24 
25 namespace lapack {
26 
27  using namespace blas;
28 
29 #ifdef TENSOR_USE_MKL
30 #include <mkl_lapack.h>
31 #endif
32 #ifdef TENSOR_USE_ESSL
33 #undef dgesv
34 #undef zgesv
35 #undef dgeev
36 #undef zgeev
37 #undef zgesvd
38 #undef dgesvd
39 #undef dsyev
40 #undef zheev
41 #endif
42 #if defined(TENSOR_USE_ATLAS) || defined(TENSOR_USE_ESSL)
43 extern "C" {
44  int F77NAME(dgesv)
45  (__CLPK_integer *n, __CLPK_integer *nrhs, __CLPK_doublereal *a,
46  __CLPK_integer *lda, __CLPK_integer *ipiv, __CLPK_doublereal *b,
47  __CLPK_integer *ldb, __CLPK_integer *info);
48  int F77NAME(zgesv)
49  (__CLPK_integer *n, __CLPK_integer *nrhs, __CLPK_doublecomplex *a,
50  __CLPK_integer *lda, __CLPK_integer *ipiv, __CLPK_doublecomplex *b,
51  __CLPK_integer *ldb, __CLPK_integer *info);
52  int F77NAME(dgeev)
53  (char *jobvl, char *jobvr, __CLPK_integer *n, __CLPK_doublereal *
54  a, __CLPK_integer *lda, __CLPK_doublereal *wr, __CLPK_doublereal *wi,
55  __CLPK_doublereal *vl, __CLPK_integer *ldvl, __CLPK_doublereal *vr,
56  __CLPK_integer *ldvr, __CLPK_doublereal *work,
57  __CLPK_integer *lwork, __CLPK_integer *info);
58  void F77NAME(dsyev)
59  (char *jobz, char *uplo,
60  __CLPK_integer *n, __CLPK_doublereal *a, __CLPK_integer *lda,
61  __CLPK_doublereal *w, __CLPK_doublereal *work, __CLPK_integer *lwork,
62  __CLPK_integer *info);
63  int F77NAME(zgeev)
64  (char *jobvl, char *jobvr, __CLPK_integer *n,
65  __CLPK_doublecomplex *a, __CLPK_integer *lda, __CLPK_doublecomplex *w,
66  __CLPK_doublecomplex *vl, __CLPK_integer *ldvl, __CLPK_doublecomplex *vr,
67  __CLPK_integer *ldvr, __CLPK_doublecomplex *work,
68  __CLPK_integer *lwork, __CLPK_doublereal *rwork, __CLPK_integer *info);
69  int F77NAME(dgesvd)
70  (char *jobu, char *jobvt, __CLPK_integer *m, __CLPK_integer *n,
71  __CLPK_doublereal *a, __CLPK_integer *lda, __CLPK_doublereal *s,
72  __CLPK_doublereal *u, __CLPK_integer *ldu, __CLPK_doublereal *vt,
73  __CLPK_integer *ldvt, __CLPK_doublereal *work, __CLPK_integer *lwork,
74  __CLPK_integer *info);
75  int F77NAME(zgesvd)
76  (char *jobu, char *jobvt, __CLPK_integer *m, __CLPK_integer *n,
77  __CLPK_doublecomplex *a, __CLPK_integer *lda, __CLPK_doublereal *s,
78  __CLPK_doublecomplex *u, __CLPK_integer *ldu, __CLPK_doublecomplex *vt,
79  __CLPK_integer *ldvt, __CLPK_doublecomplex *work,
80  __CLPK_integer *lwork, __CLPK_doublereal *rwork, __CLPK_integer *info);
81  void F77NAME(zheev)
82  (char *jobz, char *uplo,
83  __CLPK_integer *n, __CLPK_doublecomplex *a, __CLPK_integer *lda,
84  __CLPK_doublereal *w, __CLPK_doublecomplex *work,
85  __CLPK_integer *lwork, __CLPK_doublereal *rwork, __CLPK_integer *info);
86 }
87 #endif
88 
89 }
90 
91 #endif // TENSOR_TENSOR_LAPACK_H