Reference documentation for deal.II version GIT relicensing-422-gb369f187d8 2024-04-17 18:10:02+00:00
\(\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\}}\)
Loading...
Searching...
No Matches
blas_extension_templates.h
Go to the documentation of this file.
1// ------------------------------------------------------------------------
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4// Copyright (C) 2018 - 2024 by the deal.II authors
5//
6// This file is part of the deal.II library.
7//
8// Part of the source code is dual licensed under Apache-2.0 WITH
9// LLVM-exception OR LGPL-2.1-or-later. Detailed license information
10// governing the source code and code contributions can be found in
11// LICENSE.md and CONTRIBUTING.md at the top level directory of deal.II.
12//
13// ------------------------------------------------------------------------
14
15
16#ifndef dealii_blas_extension_templates_h
17#define dealii_blas_extension_templates_h
18
19#include <deal.II/base/config.h>
20
22
23#ifdef DEAL_II_HAVE_FP_EXCEPTIONS
24# include <cfenv>
25#endif
26
27// Intel-MKL specific functions
28#ifdef DEAL_II_LAPACK_WITH_MKL
29// see
30// https://software.intel.com/en-us/mkl-windows-developer-guide-using-complex-types-in-c-c
31# define MKL_Complex8 std::complex<float>
32# define MKL_Complex16 std::complex<double>
33# include <mkl_trans.h>
34#endif
35
36
38
39
40template <typename number1, typename number2, typename number3>
41inline void
43 char,
46 const number1,
47 const number2 *,
49 number3 *,
51{
53}
54
55
56
57inline void
58omatcopy(char ordering,
59 char trans,
62 const float alpha,
63 const float *A,
65 float *B,
67{
68#ifdef DEAL_II_LAPACK_WITH_MKL
69 mkl_somatcopy(ordering, trans, rows, cols, alpha, A, lda, B, ldb);
70#else
71 (void)ordering;
72 (void)trans;
73 (void)rows;
74 (void)cols;
75 (void)alpha;
76 (void)A;
77 (void)lda;
78 (void)B;
79 (void)ldb;
80 Assert(false, LAPACKSupport::ExcMissing("mkl_somatcopy"));
81#endif // DEAL_II_LAPACK_WITH_MKL
82}
83
84
85
86inline void
87omatcopy(char ordering,
88 char trans,
91 const double alpha,
92 const double *A,
94 double *B,
96{
97#ifdef DEAL_II_LAPACK_WITH_MKL
98 mkl_domatcopy(ordering, trans, rows, cols, alpha, A, lda, B, ldb);
99#else
100 (void)ordering;
101 (void)trans;
102 (void)rows;
103 (void)cols;
104 (void)alpha;
105 (void)A;
106 (void)lda;
107 (void)B;
108 (void)ldb;
109 Assert(false, LAPACKSupport::ExcMissing("mkl_domatcopy"));
110#endif // DEAL_II_LAPACK_WITH_MKL
111}
112
113
114
115inline void
116omatcopy(char ordering,
117 char trans,
120 const std::complex<float> alpha,
121 const std::complex<float> *A,
123 std::complex<float> *B,
125{
126#ifdef DEAL_II_LAPACK_WITH_MKL
127 mkl_comatcopy(ordering, trans, rows, cols, alpha, A, lda, B, ldb);
128#else
129 (void)ordering;
130 (void)trans;
131 (void)rows;
132 (void)cols;
133 (void)alpha;
134 (void)A;
135 (void)lda;
136 (void)B;
137 (void)ldb;
138 Assert(false, LAPACKSupport::ExcMissing("mkl_comatcopy"));
139#endif // DEAL_II_LAPACK_WITH_MKL
140}
141
142
143
144inline void
145omatcopy(char ordering,
146 char trans,
149 const std::complex<double> alpha,
150 const std::complex<double> *A,
152 std::complex<double> *B,
154{
155#ifdef DEAL_II_LAPACK_WITH_MKL
156 mkl_zomatcopy(ordering, trans, rows, cols, alpha, A, lda, B, ldb);
157#else
158 (void)ordering;
159 (void)trans;
160 (void)rows;
161 (void)cols;
162 (void)alpha;
163 (void)A;
164 (void)lda;
165 (void)B;
166 (void)ldb;
167 Assert(false, LAPACKSupport::ExcMissing("mkl_zomatcopy"));
168#endif // DEAL_II_LAPACK_WITH_MKL
169}
170
172
173#endif
void omatcopy(char, char, ::types::blas_int, ::types::blas_int, const number1, const number2 *, ::types::blas_int, number3 *, ::types::blas_int)
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:502
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:503
static ::ExceptionBase & ExcMissing(std::string arg1)
#define Assert(cond, exc)
#define DEAL_II_NOT_IMPLEMENTED()