deal.II version GIT relicensing-6842-g793a97d2aa 2026-10-02 14:00:01+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: Apache-2.0 WITH LLVM-exception OR LGPL-2.1-or-later
4// Copyright (C) 2018 - 2026 by the deal.II authors
5//
6// This file is part of the deal.II library.
7//
8// Detailed license information governing the source code and contributions
9// can be found in LICENSE.md and CONTRIBUTING.md at the top level directory.
10//
11// -----------------------------------------------------------------------------
12
13
14#ifndef dealii_blas_extension_templates_h
15#define dealii_blas_extension_templates_h
16
17#include <deal.II/base/config.h>
18
20
21// Intel-MKL specific functions
22#ifdef DEAL_II_LAPACK_WITH_MKL
23// see
24// https://software.intel.com/en-us/mkl-windows-developer-guide-using-complex-types-in-c-c
25# define MKL_Complex8 std::complex<float>
26# define MKL_Complex16 std::complex<double>
27# include <mkl_trans.h>
28#endif
29
30#ifdef DEAL_II_HAVE_FP_EXCEPTIONS
31# include <cfenv>
32#endif
33
34#include <complex>
35
37
38
39template <typename number1, typename number2, typename number3>
40inline void
42 char,
45 const number1,
46 const number2 *,
48 number3 *,
50{
52}
53
54
55
56inline void
57omatcopy(char ordering,
58 char trans,
61 const float alpha,
62 const float *A,
64 float *B,
66{
67#ifdef DEAL_II_LAPACK_WITH_MKL
68 mkl_somatcopy(ordering, trans, rows, cols, alpha, A, lda, B, ldb);
69#else
70 (void)ordering;
71 (void)trans;
72 (void)rows;
73 (void)cols;
74 (void)alpha;
75 (void)A;
76 (void)lda;
77 (void)B;
78 (void)ldb;
79 Assert(false, LAPACKSupport::ExcMissing("mkl_somatcopy"));
80#endif // DEAL_II_LAPACK_WITH_MKL
81}
82
83
84
85inline void
86omatcopy(char ordering,
87 char trans,
90 const double alpha,
91 const double *A,
93 double *B,
95{
96#ifdef DEAL_II_LAPACK_WITH_MKL
97 mkl_domatcopy(ordering, trans, rows, cols, alpha, A, lda, B, ldb);
98#else
99 (void)ordering;
100 (void)trans;
101 (void)rows;
102 (void)cols;
103 (void)alpha;
104 (void)A;
105 (void)lda;
106 (void)B;
107 (void)ldb;
108 Assert(false, LAPACKSupport::ExcMissing("mkl_domatcopy"));
109#endif // DEAL_II_LAPACK_WITH_MKL
110}
111
112
113
114inline void
115omatcopy(char ordering,
116 char trans,
119 const std::complex<float> alpha,
120 const std::complex<float> *A,
122 std::complex<float> *B,
124{
125#ifdef DEAL_II_LAPACK_WITH_MKL
126 mkl_comatcopy(ordering, trans, rows, cols, alpha, A, lda, B, ldb);
127#else
128 (void)ordering;
129 (void)trans;
130 (void)rows;
131 (void)cols;
132 (void)alpha;
133 (void)A;
134 (void)lda;
135 (void)B;
136 (void)ldb;
137 Assert(false, LAPACKSupport::ExcMissing("mkl_comatcopy"));
138#endif // DEAL_II_LAPACK_WITH_MKL
139}
140
141
142
143inline void
144omatcopy(char ordering,
145 char trans,
148 const std::complex<double> alpha,
149 const std::complex<double> *A,
151 std::complex<double> *B,
153{
154#ifdef DEAL_II_LAPACK_WITH_MKL
155 mkl_zomatcopy(ordering, trans, rows, cols, alpha, A, lda, B, ldb);
156#else
157 (void)ordering;
158 (void)trans;
159 (void)rows;
160 (void)cols;
161 (void)alpha;
162 (void)A;
163 (void)lda;
164 (void)B;
165 (void)ldb;
166 Assert(false, LAPACKSupport::ExcMissing("mkl_zomatcopy"));
167#endif // DEAL_II_LAPACK_WITH_MKL
168}
169
171
172#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:38
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:39
#define DEAL_II_NOT_IMPLEMENTED()
static ::ExceptionBase & ExcMissing(std::string arg1)
#define Assert(cond, exc)