<T>LAPACK 0.1.1
C++ Template Linear Algebra PACKage
Loading...
Searching...
No Matches
testdefinitions.hpp
Go to the documentation of this file.
1
6//
7// Copyright (c) 2021-2023, University of Colorado Denver. All rights reserved.
8//
9// This file is part of <T>LAPACK.
10// <T>LAPACK is free software: you can redistribute it and/or modify it under
11// the terms of the BSD 3-Clause license. See the accompanying LICENSE file.
12
13#ifndef TLAPACK_TESTDEFINITIONS_HH
14#define TLAPACK_TESTDEFINITIONS_HH
15
17
18#ifdef TLAPACK_TEST_EIGEN
21#endif
22
23#ifdef TLAPACK_TEST_MDSPAN
25#endif
26
27#ifdef TLAPACK_TEST_MPFR
29#endif
30
31#ifdef TLAPACK_TEST_QUAD
33#endif
34
35//
36// The matrix types that will be tested for routines
37// that only accept real matrices
38//
39#ifndef TLAPACK_REAL_TYPES_TO_TEST
40
41 #ifndef TLAPACK_LEGACY_REAL_TYPES_TO_TEST
42 #define TLAPACK_LEGACY_REAL_TYPES_TO_TEST \
43 (tlapack::LegacyMatrix<float, std::size_t, \
44 tlapack::Layout::ColMajor>), \
45 (tlapack::LegacyMatrix<double, std::size_t, \
46 tlapack::Layout::ColMajor>), \
47 (tlapack::LegacyMatrix<float, std::size_t, \
48 tlapack::Layout::RowMajor>), \
49 (tlapack::LegacyMatrix<double, std::size_t, \
50 tlapack::Layout::RowMajor>)
51template class tlapack::
53template class tlapack::
55template class tlapack::
57template class tlapack::
59 #endif
60
61 #ifdef TLAPACK_TEST_MPFR
62 #define TLAPACK_LEGACY_REAL_TYPES_TO_TEST_WITH_MPREAL \
63 , tlapack::LegacyMatrix<mpfr::mpreal>
65 #else
66 #define TLAPACK_LEGACY_REAL_TYPES_TO_TEST_WITH_MPREAL
67 #endif
68
69 #ifdef TLAPACK_TEST_QUAD
70 #define TLAPACK_LEGACY_REAL_TYPES_TO_TEST_WITH_QUAD \
71 , tlapack::LegacyMatrix<__float128>
73 #else
74 #define TLAPACK_LEGACY_REAL_TYPES_TO_TEST_WITH_QUAD
75 #endif
76
77 #ifdef TLAPACK_TEST_EIGEN
78 #define TLAPACK_EIGEN_REAL_TYPES_TO_TEST \
79 , Eigen::MatrixXf, Eigen::MatrixXd, \
80 (Eigen::Matrix<float, Eigen::Dynamic, Eigen::Dynamic, \
81 Eigen::RowMajor>), \
82 (Eigen::Matrix<Eigen::half, Eigen::Dynamic, Eigen::Dynamic>)
83 #else
84 #define TLAPACK_EIGEN_REAL_TYPES_TO_TEST
85 #endif
86
87 #ifdef TLAPACK_TEST_MDSPAN
88 #define TLAPACK_MDSPAN_REAL_TYPES_TO_TEST \
89 , \
90 (std::experimental::mdspan< \
91 float, std::experimental::dextents<std::size_t, 2>, \
92 std::experimental::layout_left>), \
93 (std::experimental::mdspan< \
94 float, std::experimental::dextents<std::size_t, 2>, \
95 std::experimental::layout_right>)
96template class std::experimental::mdspan<
97 float,
98 std::experimental::dextents<std::size_t, 2>,
99 std::experimental::layout_left>;
100template class std::experimental::mdspan<
101 float,
102 std::experimental::dextents<std::size_t, 2>,
103 std::experimental::layout_right>;
104 #else
105 #define TLAPACK_MDSPAN_REAL_TYPES_TO_TEST
106 #endif
107
108 #define TLAPACK_REAL_TYPES_TO_TEST \
109 TLAPACK_LEGACY_REAL_TYPES_TO_TEST \
110 TLAPACK_LEGACY_REAL_TYPES_TO_TEST_WITH_MPREAL \
111 TLAPACK_EIGEN_REAL_TYPES_TO_TEST \
112 TLAPACK_MDSPAN_REAL_TYPES_TO_TEST \
113 TLAPACK_LEGACY_REAL_TYPES_TO_TEST_WITH_QUAD
114#endif
115
116//
117// The matrix types that will be tested for routines
118// that only accept complex matrices
119//
120#ifndef TLAPACK_COMPLEX_TYPES_TO_TEST
121
122 #ifndef TLAPACK_LEGACY_COMPLEX_TYPES_TO_TEST
123 #define TLAPACK_LEGACY_COMPLEX_TYPES_TO_TEST \
124 (tlapack::LegacyMatrix<std::complex<float>, std::size_t, \
125 tlapack::Layout::ColMajor>), \
126 (tlapack::LegacyMatrix<std::complex<double>, std::size_t, \
127 tlapack::Layout::ColMajor>), \
128 (tlapack::LegacyMatrix<std::complex<float>, std::size_t, \
129 tlapack::Layout::RowMajor>), \
130 (tlapack::LegacyMatrix<std::complex<double>, std::size_t, \
131 tlapack::Layout::RowMajor>)
132template class tlapack::
133 LegacyMatrix<std::complex<float>, std::size_t, tlapack::Layout::ColMajor>;
134template class tlapack::
135 LegacyMatrix<std::complex<double>, std::size_t, tlapack::Layout::ColMajor>;
136template class tlapack::
137 LegacyMatrix<std::complex<float>, std::size_t, tlapack::Layout::RowMajor>;
138template class tlapack::
139 LegacyMatrix<std::complex<double>, std::size_t, tlapack::Layout::RowMajor>;
140 #endif
141
142 #ifdef TLAPACK_TEST_EIGEN
143 #define TLAPACK_EIGEN_COMPLEX_TYPES_TO_TEST \
144 , Eigen::MatrixXcf, Eigen::MatrixXcd, \
145 (Eigen::Matrix<std::complex<float>, Eigen::Dynamic, \
146 Eigen::Dynamic, Eigen::RowMajor>)
147 #else
148 #define TLAPACK_EIGEN_COMPLEX_TYPES_TO_TEST
149 #endif
150
151 #define TLAPACK_COMPLEX_TYPES_TO_TEST \
152 TLAPACK_LEGACY_COMPLEX_TYPES_TO_TEST \
153 TLAPACK_EIGEN_COMPLEX_TYPES_TO_TEST
154
155#endif
156
157//
158// List of matrix types that will be tested
159//
160#ifndef TLAPACK_TYPES_TO_TEST
161 #define TLAPACK_TYPES_TO_TEST \
162 TLAPACK_REAL_TYPES_TO_TEST, TLAPACK_COMPLEX_TYPES_TO_TEST
163#endif
164
165#endif // TLAPACK_TESTDEFINITIONS_HH
Eigen::half compatibility with tlapack::concepts::Real.
Compatibility layer for the GNU type __float128.
mpfr::mpreal compatibility with tlapack::concepts::Real
typename traits::real_type_traits< Types..., int >::type real_type
The common real type of the list of types.
Definition scalar_type_traits.hpp:113