blas_extensions_double.h
1 /* Copyright (C) 2003-2005 Martin Förg
2 
3  * This library is free software; you can redistribute it and/or
4  * modify it under the terms of the GNU Lesser General Public
5  * License as published by the Free Software Foundation; either
6  * version 2.1 of the License, or (at your option) any later version.
7  *
8  * This library is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  * Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public
14  * License along with this library; if not, write to the Free Software
15  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16  *
17  * Contact:
18  * martin.o.foerg@googlemail.com
19  *
20  */
21 
22 #ifndef blas_extensions_double_h
23 #define blas_extensions_double_h
24 
25 #ifndef HAVE_LIBMKL_INTEL_LP64
26 #ifndef CBLAS_ENUM_DEFINED_H
27  #define CBLAS_ENUM_DEFINED_H
28  enum CBLAS_ORDER {CblasRowMajor=101, CblasColMajor=102 };
29  enum CBLAS_TRANSPOSE {CblasNoTrans=111, CblasTrans=112, CblasConjTrans=113,
30  AtlasConj=114};
31  enum CBLAS_UPLO {CblasUpper=121, CblasLower=122};
32  enum CBLAS_DIAG {CblasNonUnit=131, CblasUnit=132};
33  enum CBLAS_SIDE {CblasLeft=141, CblasRight=142};
34 #endif
35 #define CBLAS_INDEX int
36 
37 #ifndef ATLAS_ENUM_H
38  #define ATLAS_ENUM_H
39  #define ATLAS_ORDER CBLAS_ORDER
40  #define AtlasRowMajor CblasRowMajor
41  #define AtlasColMajor CblasColMajor
42  #define ATLAS_TRANS CBLAS_TRANSPOSE
43  #define AtlasNoTrans CblasNoTrans
44  #define AtlasTrans CblasTrans
45  #define AtlasConjTrans CblasConjTrans
46  #define ATLAS_UPLO CBLAS_UPLO
47  #define AtlasUpper CblasUpper
48  #define AtlasLower CblasLower
49  #define ATLAS_DIAG CBLAS_DIAG
50  #define AtlasNonUnit CblasNonUnit
51  #define AtlasUnit CblasUnit
52  #define ATLAS_SIDE CBLAS_SIDE
53  #define AtlasLeft CblasLeft
54  #define AtlasRight CblasRight
55 #endif
56 #else
57 #include "mkl_cblas.h"
58 #endif
59 
60 namespace fmatvec {
61  void myblas_daxpy(const CBLAS_TRANSPOSE transa, const CBLAS_TRANSPOSE
62  transb, int m, int n, double alpha, const double *a, int lda1, double *b,
63  int ldb1);
64 
65  void myblas_dcopy(const CBLAS_TRANSPOSE transa, const CBLAS_TRANSPOSE
66  transb, int m, int n, const double *a, int lda1, double *b, int ldb1);
67 
68  void myblas_dscal(int n, double da, const double *dx, int incx, double *c);
69 
70  void myblas_dscal(const CBLAS_TRANSPOSE transa, int m, int n, double alpha, const
71  double *a, int lda1, double *c, int ldc);
72 
73  void myblas_dscal(char transa, int m, int n, double alpha, double *a, int lda1);
74 
75  void myblas_daxpy(int n, double da, const double *dx, int incx, const double *dy, int
76  incy, double *c);
77 
78  void myblas_daxpy(const CBLAS_TRANSPOSE transa, const CBLAS_TRANSPOSE transb,
79  int m, int n, double alpha, const double *a, int lda1, const double *b, int
80  ldb1, double *c, int ldc);
81 }
82 #endif