Reference documentation for deal.II version 9.2.0
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
blas_extension_templates.h
Go to the documentation of this file.
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2018 by the deal.II authors
4 //
5 // This file is part of the deal.II library.
6 //
7 // The deal.II library is free software; you can use it, redistribute
8 // it, and/or modify it under the terms of the GNU Lesser General
9 // Public License as published by the Free Software Foundation; either
10 // version 2.1 of the License, or (at your option) any later version.
11 // The full text of the license can be found in the file LICENSE.md at
12 // the top level directory of deal.II.
13 //
14 // ---------------------------------------------------------------------
15 
16 
17 #ifndef dealii_blas_extension_templates_h
18 #define dealii_blas_extension_templates_h
19 
20 #include <deal.II/base/config.h>
21 
23 
24 #ifdef DEAL_II_HAVE_FP_EXCEPTIONS
25 # include <cfenv>
26 #endif
27 
28 // Intel-MKL specific functions
29 #ifdef DEAL_II_LAPACK_WITH_MKL
30 // see
31 // https://software.intel.com/en-us/mkl-windows-developer-guide-using-complex-types-in-c-c
32 # define MKL_Complex8 std::complex<float>
33 # define MKL_Complex16 std::complex<double>
34 # include <mkl_trans.h>
35 #endif
36 
37 
39 
40 
41 template <typename number1, typename number2, typename number3>
42 inline void
43 omatcopy(char,
44  char,
47  const number1,
48  const number2 *,
50  number3 *,
52 {
53  Assert(false, ExcNotImplemented());
54 }
55 
56 
57 
58 inline void
59 omatcopy(char ordering,
60  char trans,
61  ::types::blas_int rows,
62  ::types::blas_int cols,
63  const float alpha,
64  const float * A,
65  ::types::blas_int lda,
66  float * B,
67  ::types::blas_int ldb)
68 {
69 #ifdef DEAL_II_LAPACK_WITH_MKL
70  mkl_somatcopy(ordering, trans, rows, cols, alpha, A, lda, B, ldb);
71 #else
72  (void)ordering;
73  (void)trans;
74  (void)rows;
75  (void)cols;
76  (void)alpha;
77  (void)A;
78  (void)lda;
79  (void)B;
80  (void)ldb;
81  Assert(false, LAPACKSupport::ExcMissing("mkl_somatcopy"));
82 #endif // DEAL_II_LAPACK_WITH_MKL
83 }
84 
85 
86 
87 inline void
88 omatcopy(char ordering,
89  char trans,
90  ::types::blas_int rows,
91  ::types::blas_int cols,
92  const double alpha,
93  const double * A,
94  ::types::blas_int lda,
95  double * B,
96  ::types::blas_int ldb)
97 {
98 #ifdef DEAL_II_LAPACK_WITH_MKL
99  mkl_domatcopy(ordering, trans, rows, cols, alpha, A, lda, B, ldb);
100 #else
101  (void)ordering;
102  (void)trans;
103  (void)rows;
104  (void)cols;
105  (void)alpha;
106  (void)A;
107  (void)lda;
108  (void)B;
109  (void)ldb;
110  Assert(false, LAPACKSupport::ExcMissing("mkl_domatcopy"));
111 #endif // DEAL_II_LAPACK_WITH_MKL
112 }
113 
114 
115 
116 inline void
117 omatcopy(char ordering,
118  char trans,
119  ::types::blas_int rows,
120  ::types::blas_int cols,
121  const std::complex<float> alpha,
122  const std::complex<float> *A,
123  ::types::blas_int lda,
124  std::complex<float> * B,
125  ::types::blas_int ldb)
126 {
127 #ifdef DEAL_II_LAPACK_WITH_MKL
128  mkl_comatcopy(ordering, trans, rows, cols, alpha, A, lda, B, ldb);
129 #else
130  (void)ordering;
131  (void)trans;
132  (void)rows;
133  (void)cols;
134  (void)alpha;
135  (void)A;
136  (void)lda;
137  (void)B;
138  (void)ldb;
139  Assert(false, LAPACKSupport::ExcMissing("mkl_comatcopy"));
140 #endif // DEAL_II_LAPACK_WITH_MKL
141 }
142 
143 
144 
145 inline void
146 omatcopy(char ordering,
147  char trans,
148  ::types::blas_int rows,
149  ::types::blas_int cols,
150  const std::complex<double> alpha,
151  const std::complex<double> *A,
152  ::types::blas_int lda,
153  std::complex<double> * B,
154  ::types::blas_int ldb)
155 {
156 #ifdef DEAL_II_LAPACK_WITH_MKL
157  mkl_zomatcopy(ordering, trans, rows, cols, alpha, A, lda, B, ldb);
158 #else
159  (void)ordering;
160  (void)trans;
161  (void)rows;
162  (void)cols;
163  (void)alpha;
164  (void)A;
165  (void)lda;
166  (void)B;
167  (void)ldb;
168  Assert(false, LAPACKSupport::ExcMissing("mkl_zomatcopy"));
169 #endif // DEAL_II_LAPACK_WITH_MKL
170 }
171 
173 
174 #endif
#define Assert(cond, exc)
Definition: exceptions.h:1419
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:359
static ::ExceptionBase & ExcMissing(std::string arg1)
static const char A
void omatcopy(char, char, ::types::blas_int, ::types::blas_int, const number1, const number2 *, ::types::blas_int, number3 *, ::types::blas_int)
int blas_int
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:358
static ::ExceptionBase & ExcNotImplemented()