DFT-EFE
 
Loading...
Searching...
No Matches
BlasLapackTypedef.h
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright (c) 2021. *
3 * The Regents of the University of Michigan and DFT-EFE developers. *
4 * *
5 * This file is part of the DFT-EFE code. *
6 * *
7 * DFT-EFE is free software: you can redistribute it and/or modify *
8 * it under the terms of the Lesser GNU General Public License as *
9 * published by the Free Software Foundation, either version 3 of *
10 * the License, or (at your option) any later version. *
11 * *
12 * DFT-EFE is distributed in the hope that it will be useful, but *
13 * WITHOUT ANY WARRANTY; without even the implied warranty *
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
15 * See the Lesser GNU General Public License for more details. *
16 * *
17 * You should have received a copy of the GNU Lesser General Public *
18 * License at the top level of DFT-EFE distribution. If not, see *
19 * <https://www.gnu.org/licenses/>. *
20 ******************************************************************************/
21
22/*
23 * @author Sambit Das, Vishal Subramanian, Avirup Sircar
24 */
25
26#ifndef dftefeBlasWrapperTypedef_h
27#define dftefeBlasWrapperTypedef_h
28
29#include <blas.hh>
30#define LAPACK_COMPLEX_CPP
31#define HAVE_LAPACK_CONFIG_H
32#include <lapack.hh>
33#include <lapack/device.hh>
34#include <utils/MemoryStorage.h>
35
36namespace dftefe
37{
38 namespace linearAlgebra
39 {
40 namespace blasLapack
41 {
42 using Side = blas::Side;
43 using Op = blas::Op; // Op::NoTrans, Op::Trans, Op::ConjTrans
44 using Diag = blas::Diag;
45 using Uplo = blas::Uplo;
46 using Layout = blas::Layout;
47
48 // lapack
49 using Job = lapack::Job; // Job::Vec, Job::NoVec
50 using Uplo = lapack::Uplo; // Uplo::Lower, Uplo::Upper
51 using Diag = lapack::Diag; // Diag::NonUnit, Diag::Unit
52
53 using LapackInt = int64_t;
54
55 enum class ScalarOp
56 {
58 Conj
59 };
60
61 // real_type< float > is float
62 // real_type< float, double, complex<float> > is double
63 template <typename ValueType>
64 using real_type = blas::real_type<ValueType>;
65
66 // scalar_type< float > is float
67 // scalar_type< float, complex<float> > is complex<float>
68 // scalar_type< float, double, complex<float> > is complex<double>
69 template <typename ValueType1, typename ValueType2>
70 using scalar_type = blas::scalar_type<ValueType1, ValueType2>;
71 template <dftefe::utils::MemorySpace memorySpace>
73 {
74 typedef void TYPE; // default
75 };
76
77 // template specified mapping
78 template <>
80 {
81 typedef int TYPE;
82 };
83
84 template <>
86 {
87 typedef int TYPE;
88 };
89
90 template <>
92 {
93 typedef blas::Queue TYPE;
94 };
95
96 template <dftefe::utils::MemorySpace memorySpace>
98
99 template <dftefe::utils::MemorySpace memorySpace>
101 {
102 typedef void LAPACKTYPE; // default
103 };
104
105 // template specified mapping
106 template <>
108 {
109 typedef int LAPACKTYPE;
110 };
111
112 template <>
114 {
115 typedef int LAPACKTYPE;
116 };
117
118 template <>
120 {
121 typedef lapack::Queue LAPACKTYPE;
122 };
123
124 template <dftefe::utils::MemorySpace memorySpace>
126
127 } // namespace blasLapack
128
129 } // namespace linearAlgebra
130
131} // namespace dftefe
132
133#endif // define blasWrapperTypedef
blas::Diag Diag
Definition: BlasLapackTypedef.h:44
blas::Uplo Uplo
Definition: BlasLapackTypedef.h:45
blas::Layout Layout
Definition: BlasLapackTypedef.h:46
blas::Op Op
Definition: BlasLapackTypedef.h:43
int64_t LapackInt
Definition: BlasLapackTypedef.h:53
blas::scalar_type< ValueType1, ValueType2 > scalar_type
Definition: BlasLapackTypedef.h:70
blas::real_type< ValueType > real_type
Definition: BlasLapackTypedef.h:64
typename BlasQueueTypedef< memorySpace >::TYPE BlasQueue
Definition: BlasLapackTypedef.h:97
blas::Side Side
Definition: BlasLapackTypedef.h:42
ScalarOp
Definition: BlasLapackTypedef.h:56
typename LapackQueueTypedef< memorySpace >::LAPACKTYPE LapackQueue
Definition: BlasLapackTypedef.h:125
lapack::Job Job
Definition: BlasLapackTypedef.h:49
dealii includes
Definition: AtomFieldDataSpherical.cpp:31
Definition: BlasLapackTypedef.h:73
void TYPE
Definition: BlasLapackTypedef.h:74
void LAPACKTYPE
Definition: BlasLapackTypedef.h:102