Teuchos - Trilinos Tools Package Version of the Day
Loading...
Searching...
No Matches
Teuchos_LAPACK.cpp
1// @HEADER
2// *****************************************************************************
3// Teuchos: Common Tools Package
4//
5// Copyright 2004 NTESS and the Teuchos contributors.
6// SPDX-License-Identifier: BSD-3-Clause
7// *****************************************************************************
8// @HEADER
9
10#include <vector>
13#include "Teuchos_LAPACK.hpp"
15#ifdef HAVE_TEUCHOSCORE_QUADMATH
16# include "Teuchos_Details_Lapack128.hpp" // impl for __float128
17#endif // HAVE_TEUCHOSCORE_QUADMATH
18#ifdef HAVE_TEUCHOS_LONG_DOUBLE
19# include "Teuchos_Details_LapackLongDouble.hpp" // impl for long double
20#endif // HAVE_TEUCHOS_LONG_DOUBLE
22
23/* for INTEL_CXML, the second arg may need to be changed to 'one'. If so
24the appropriate declaration of one will need to be added back into
25functions that include the macro:
26*/
27
28#ifdef CHAR_MACRO
29#undef CHAR_MACRO
30#endif
31#if defined (INTEL_CXML)
32#define CHAR_MACRO(char_var) &char_var, one
33#else
34#define CHAR_MACRO(char_var) &char_var
35#endif
36
37#ifdef CHARPTR_MACRO
38#undef CHARPR_MACRO
39#endif
40#if defined (INTEL_CXML)
41#define CHARPTR_MACRO(charptr_var) charptr_var, one
42#else
43#define CHARPTR_MACRO(charptr_var) charptr_var
44#endif
45
46namespace {
47
48#if defined (INTEL_CXML)
49 unsigned int one=1;
50#endif
51
52// Use a wrapper function to handle calling ILAENV(). This removes
53// duplicaiton and avoid name lookup problems with member functions called
54// ILAENV() trying to call nonmember functions called ILAENV() (which does not
55// work on Intel compiler on Windows, see Trilinos bug 5762).
56inline
57int ilaenv_wrapper(
58 const int* ispec, const char* name, const unsigned int& name_length,
59 const char* opts, const unsigned int& opts_length,
60 const int* N1, const int* N2, const int* N3, const int* N4 )
61{
62#if defined (INTEL_CXML)
63 return ILAENV_F77(ispec, name, name_length, opts, opts_length, N1, N2, N3, N4 );
64#else
65 return ILAENV_F77(ispec, name, opts, N1, N2, N3, N4, name_length, opts_length );
66#endif
67}
68
69} // namespace
70
71
72
73extern "C" {
74
75
76typedef int (*gees_nullfptr_t)(double*,double*);
77
78
79} // extern "C"
80
81
82namespace Teuchos
83{
84 // BEGIN INT, FLOAT SPECIALIZATION IMPLEMENTATION //
85
86 void LAPACK<int, float>::PTTRF(const int& n, float* d, float* e, int* info) const
87 { SPTTRF_F77(&n,d,e,info); }
88
89
90 void LAPACK<int, float>::PTTRS(const int& n, const int& nrhs, const float* d, const float* e, float* B, const int& ldb, int* info) const
91 { SPTTRS_F77(&n,&nrhs,d,e,B,&ldb,info); }
92
93
94 void LAPACK<int, float>::POTRF(const char& UPLO, const int& n, float* A, const int& lda, int* info) const
95 { SPOTRF_F77(CHAR_MACRO(UPLO), &n, A, &lda, info); }
96
97
98 void LAPACK<int, float>::POTRS(const char& UPLO, const int& n, const int& nrhs, const float* A, const int& lda, float* B, const int& ldb, int* info) const
99 { SPOTRS_F77(CHAR_MACRO(UPLO), &n, &nrhs, A, &lda, B, &ldb, info); }
100
101
102 void LAPACK<int, float>::POTRI(const char& UPLO, const int& n, float* A, const int& lda, int* info) const
103 { SPOTRI_F77(CHAR_MACRO(UPLO), &n, A, &lda, info); }
104
105
106 void LAPACK<int, float>::POCON(const char& UPLO, const int& n, const float* A, const int& lda, const float& anorm, float* rcond, float* WORK, int* IWORK, int* info) const
107 { SPOCON_F77(CHAR_MACRO(UPLO), &n, A, &lda, &anorm, rcond, WORK, IWORK, info); }
108
109
110 void LAPACK<int, float>::POSV(const char& UPLO, const int& n, const int& nrhs, float* A, const int& lda, float* B, const int& ldb, int* info) const
111 { SPOSV_F77(CHAR_MACRO(UPLO), &n, &nrhs, A, &lda, B, &ldb, info); }
112
113
114 void LAPACK<int, float>::POEQU(const int& n, const float* A, const int& lda, float* S, float* scond, float* amax, int* info) const
115 { SPOEQU_F77(&n, A, &lda, S, scond, amax, info); }
116
117 void LAPACK<int, float>::PORFS(const char& UPLO, const int& n, const int& nrhs, const float* A, const int& lda, const float* AF, const int& ldaf, const float* B, const int& ldb, float* X, const int& ldx, float* FERR, float* BERR, float* WORK, int* IWORK, int* info) const
118 { SPORFS_F77(CHAR_MACRO(UPLO), &n, &nrhs, A, &lda, AF, &ldaf, B, &ldb, X, &ldx, FERR, BERR, WORK, IWORK, info); }
119
120 void LAPACK<int, float>::POSVX(const char& FACT, const char& UPLO, const int& n, const int& nrhs, float* A, const int& lda, float* AF, const int& ldaf, char* EQUED, float* S, float* B, const int& ldb, float* X, const int& ldx, float* rcond, float* FERR, float* BERR, float* WORK, int* IWORK, int* info) const
121 { SPOSVX_F77(CHAR_MACRO(FACT), CHAR_MACRO(UPLO), &n, &nrhs, A, &lda, AF, &ldaf, CHARPTR_MACRO(EQUED), S, B, &ldb, X, &ldx, rcond, FERR, BERR, WORK, IWORK, info); }
122
123
124 void LAPACK<int,float>::GELS(const char& TRANS, const int& m, const int& n, const int& nrhs, float* A, const int& lda, float* B, const int& ldb, float* WORK, const int& lwork, int* info) const
125 { SGELS_F77(CHAR_MACRO(TRANS), &m, &n, &nrhs, A, &lda, B, &ldb, WORK, &lwork, info); }
126
127 void LAPACK<int,float>::GELSS (const int& m, const int& n, const int& nrhs, float* A, const int& lda, float* B, const int& ldb, float* S, const float& rcond, int* rank, float* WORK, const int& lwork, float* rwork, int* info) const
128 {
129 (void) rwork;
130 SGELSS_F77(&m, &n, &nrhs, A, &lda, B, &ldb, S, &rcond, rank, WORK, &lwork, info);
131 }
132
133 void LAPACK<int,float>::GELSS(const int& m, const int& n, const int& nrhs, float* A, const int& lda, float* B, const int& ldb, float* S, const float& rcond, int* rank, float* WORK, const int& lwork, int* info) const
134 { SGELSS_F77(&m, &n, &nrhs, A, &lda, B, &ldb, S, &rcond, rank, WORK, &lwork, info); }
135
136
137 void LAPACK<int,float>::GGLSE(const int& m, const int& n, const int& p, float* A, const int& lda, float* B, const int& ldb, float* C, float* D, float* X, float* WORK, const int& lwork, int* info) const
138 { SGGLSE_F77(&m, &n, &p, A, &lda, B, &ldb, C, D, X, WORK, &lwork, info); }
139
140
141 void LAPACK<int,float>::GEQRF( const int& m, const int& n, float* A, const int& lda, float* TAU, float* WORK, const int& lwork, int* info) const
142 { SGEQRF_F77(&m, &n, A, &lda, TAU, WORK, &lwork, info); }
143
144 void LAPACK<int,float>::GEQR2 (const int& m, const int& n, float* A, const int& lda, float* TAU, float* WORK, int* const info) const
145 {
146 SGEQR2_F77(&m, &n, A, &lda, TAU, WORK, info);
147 }
148
149 void LAPACK<int,float>::GETRF(const int& m, const int& n, float* A, const int& lda, int* IPIV, int* info) const
150 { SGETRF_F77(&m, &n, A, &lda, IPIV, info); }
151
152
153 void LAPACK<int,float>::GETRS(const char& TRANS, const int& n, const int& nrhs, const float* A, const int& lda, const int* IPIV, float* B, const int& ldb, int* info) const
154 { SGETRS_F77(CHAR_MACRO(TRANS), &n, &nrhs, A, &lda, IPIV, B, &ldb, info); }
155
156
157 void LAPACK<int,float>::LASCL(const char& TYPE, const int& kl, const int& ku, const float& cfrom, const float& cto, const int& m, const int& n, float* A, const int& lda, int* info) const
158 { SLASCL_F77(CHAR_MACRO(TYPE), &kl, &ku, &cfrom, &cto, &m, &n, A, &lda, info); }
159
160 void LAPACK<int,float>::GEQP3 (const int& m, const int& n, float* A, const int& lda, int* jpvt, float* TAU, float* WORK, const int& lwork, float* RWORK, int* info) const
161 {
162 (void) RWORK;
163 SGEQP3_F77(&m, &n, A, &lda, jpvt, TAU, WORK, &lwork, info);
164 }
165
166 void LAPACK<int, float>::LASWP (const int& N, float* A, const int& LDA, const int& K1, const int& K2, const int* IPIV, const int& INCX) const
167 {
168 SLASWP_F77(&N, A, &LDA, &K1, &K2, IPIV, &INCX);
169 }
170
171 void LAPACK<int,float>::GBTRF(const int& m, const int& n, const int& kl, const int& ku, float* A, const int& lda, int* IPIV, int* info) const
172 { SGBTRF_F77(&m, &n, &kl, &ku, A, &lda, IPIV, info); }
173
174
175 void LAPACK<int,float>::GBTRS(const char& TRANS, const int& n, const int& kl, const int& ku, const int& nrhs, const float* A, const int& lda, const int* IPIV, float* B, const int& ldb, int* info) const
176 { SGBTRS_F77(CHAR_MACRO(TRANS), &n, &kl, &ku, &nrhs, A, &lda, IPIV, B, &ldb, info); }
177
178
179 void LAPACK<int,float>::GTTRF(const int& n, float* dl, float* d, float* du, float* du2, int* IPIV, int* info) const
180 { SGTTRF_F77(&n, dl, d, du, du2, IPIV, info); }
181
182
183 void LAPACK<int,float>::GTTRS(const char& TRANS, const int& n, const int& nrhs, const float* dl, const float* d, const float* du, const float* du2, const int* IPIV, float* B, const int& ldb, int* info) const
184 { SGTTRS_F77(CHAR_MACRO(TRANS), &n, &nrhs, dl, d, du, du2, IPIV, B, &ldb, info); }
185
186
187 void LAPACK<int,float>::GETRI(const int& n, float* A, const int& lda, const int* IPIV, float* WORK, const int& lwork, int* info) const
188 { SGETRI_F77(&n, A, &lda, IPIV, WORK, &lwork, info); }
189
190 void LAPACK<int, float>::LATRS (const char& UPLO, const char& TRANS, const char& DIAG, const char& NORMIN, const int& N, const float* A, const int& LDA, float* X, float* SCALE, float* CNORM, int* INFO) const
191 {
192 SLATRS_F77(CHAR_MACRO(UPLO), CHAR_MACRO(TRANS), CHAR_MACRO(DIAG), CHAR_MACRO(NORMIN), &N, A, &LDA, X, SCALE, CNORM, INFO);
193 }
194
195 void LAPACK<int,float>::GECON(const char& NORM, const int& n, const float* A, const int& lda, const float& anorm, float* rcond, float* WORK, int* IWORK, int* info) const
196 { SGECON_F77(CHAR_MACRO(NORM), &n, A, &lda, &anorm, rcond, WORK, IWORK, info); }
197
198
199 void LAPACK<int,float>::GBCON(const char& NORM, const int& n, const int& kl, const int& ku, const float* A, const int& lda, const int* IPIV, const float& anorm, float* rcond, float* WORK, int* IWORK, int* info) const
200 { SGBCON_F77(CHAR_MACRO(NORM), &n, &kl, &ku, A, &lda, IPIV, &anorm, rcond, WORK, IWORK, info); }
201
202
203 float LAPACK<int,float>::LANGB(const char& NORM, const int& n, const int& kl, const int& ku, const float* A, const int& lda, float* WORK) const
204 { return( SLANGB_F77(CHAR_MACRO(NORM), &n, &kl, &ku, A, &lda, WORK) ); }
205
206
207 void LAPACK<int,float>::GESV(const int& n, const int& nrhs, float* A, const int& lda, int* IPIV, float* B, const int& ldb, int* info) const
208 { SGESV_F77(&n, &nrhs, A, &lda, IPIV, B, &ldb, info); }
209
210
211 void LAPACK<int,float>::GEEQU(const int& m, const int& n, const float* A, const int& lda, float* R, float* C, float* rowcond, float* colcond, float* amax, int* info) const
212 { SGEEQU_F77(&m, &n, A, &lda, R, C, rowcond, colcond, amax, info); }
213
214
215 void LAPACK<int,float>::GERFS(const char& TRANS, const int& n, const int& nrhs, const float* A, const int& lda, const float* AF, const int& ldaf, const int* IPIV, const float* B, const int& ldb, float* X, const int& ldx, float* FERR, float* BERR, float* WORK, int* IWORK, int* info) const
216 { SGERFS_F77(CHAR_MACRO(TRANS), &n, &nrhs, A, &lda, AF, &ldaf, IPIV, B, &ldb, X, &ldx, FERR, BERR, WORK, IWORK, info); }
217
218
219 void LAPACK<int,float>::GBEQU(const int& m, const int& n, const int& kl, const int& ku, const float* A, const int& lda, float* R, float* C, float* rowcond, float* colcond, float* amax, int* info) const
220 { SGBEQU_F77(&m, &n, &kl, &ku, A, &lda, R, C, rowcond, colcond, amax, info); }
221
222
223 void LAPACK<int,float>::GBRFS(const char& TRANS, const int& n, const int& kl, const int& ku, const int& nrhs, const float* A, const int& lda, const float* AF, const int& ldaf, const int* IPIV, const float* B, const int& ldb, float* X, const int& ldx, float* FERR, float* BERR, float* WORK, int* IWORK, int* info) const
224 { SGBRFS_F77(CHAR_MACRO(TRANS), &n, &kl, &ku, &nrhs, A, &lda, AF, &ldaf, IPIV, B, &ldb, X, &ldx, FERR, BERR, WORK, IWORK, info); }
225
226 void LAPACK<int,float>::GESVX(const char& FACT, const char& TRANS, const int& n, const int& nrhs, float* A, const int& lda, float* AF, const int& ldaf, int* IPIV, char* EQUED, float* R, float* C, float* B, const int& ldb, float* X, const int& ldx, float* rcond, float* FERR, float* BERR, float* WORK, int* IWORK, int* info) const
227 { SGESVX_F77(CHAR_MACRO(FACT), CHAR_MACRO(TRANS), &n, &nrhs, A, &lda, AF, &ldaf, IPIV, CHARPTR_MACRO(EQUED), R, C, B, &ldb, X, &ldx, rcond, FERR, BERR, WORK, IWORK, info); }
228
229
230 void LAPACK<int,float>::SYTRD(const char& UPLO, const int& n, float* A, const int& lda, float* D, float* E, float* TAU, float* WORK, const int& lwork, int* info) const
231 { SSYTRD_F77(CHAR_MACRO(UPLO), &n, A, &lda, D, E, TAU, WORK, &lwork, info); }
232
233
234 void LAPACK<int,float>::GEHRD(const int& n, const int& ilo, const int& ihi, float* A, const int& lda, float* TAU, float* WORK, const int& lwork, int* info) const
235 { SGEHRD_F77(&n, &ilo, &ihi, A, &lda, TAU, WORK, &lwork, info); }
236
237
238 void LAPACK<int,float>::TRTRS(const char& UPLO, const char& TRANS, const char& DIAG, const int& n, const int& nrhs, const float* A, const int& lda, float* B, const int& ldb, int* info) const
239 { STRTRS_F77(CHAR_MACRO(UPLO), CHAR_MACRO(TRANS), CHAR_MACRO(DIAG), &n, &nrhs, A, &lda, B, &ldb, info); }
240
241
242 void LAPACK<int,float>::TRTRI(const char& UPLO, const char& DIAG, const int& n, float* A, const int& lda, int* info) const
243 { STRTRI_F77(CHAR_MACRO(UPLO), CHAR_MACRO(DIAG), &n, A, &lda, info); }
244
245
246 void LAPACK<int,float>::SPEV(const char& JOBZ, const char& UPLO, const int& n, float* AP, float* W, float* Z, const int& ldz, float* WORK, int* info) const
247 { SSPEV_F77(CHAR_MACRO(JOBZ), CHAR_MACRO(UPLO), &n, AP, W, Z, &ldz, WORK, info); }
248
249
250 void LAPACK<int,float>::SYEV(const char& JOBZ, const char& UPLO, const int& n, float* A, const int& lda, float* W, float* WORK, const int& lwork, int* info) const
251 { SSYEV_F77(CHAR_MACRO(JOBZ), CHAR_MACRO(UPLO), &n, A, &lda, W, WORK, &lwork, info); }
252
253
254 void LAPACK<int,float>::SYGV(const int& itype, const char& JOBZ, const char& UPLO, const int& n, float* A, const int& lda, float* B, const int& ldb, float* W, float* WORK, const int& lwork, int* info) const
255 { SSYGV_F77(&itype, CHAR_MACRO(JOBZ), CHAR_MACRO(UPLO), &n, A, &lda, B, &ldb, W, WORK, &lwork, info); }
256
257
258 void LAPACK<int,float>::HEEV(const char& JOBZ, const char& UPLO, const int& n, float* A, const int& lda, float* W, float* WORK, const int& lwork, float* /* RWORK */, int* info) const
259 { SSYEV_F77(CHAR_MACRO(JOBZ), CHAR_MACRO(UPLO), &n, A, &lda, W, WORK, &lwork, info); }
260
261
262 void LAPACK<int,float>::HEGV(const int& itype, const char& JOBZ, const char& UPLO, const int& n, float* A, const int& lda, float* B, const int& ldb, float* W, float* WORK, const int& lwork, float* /* RWORK */, int* info) const
263 { SSYGV_F77(&itype, CHAR_MACRO(JOBZ), CHAR_MACRO(UPLO), &n, A, &lda, B, &ldb, W, WORK, &lwork, info); }
264
265
266 void LAPACK<int,float>::STEQR(const char& COMPZ, const int& n, float* D, float* E, float* Z, const int& ldz, float* WORK, int* info) const
267 { SSTEQR_F77(CHAR_MACRO(COMPZ), &n, D, E, Z, &ldz, WORK, info); }
268
269
270 void LAPACK<int,float>::PTEQR(const char& COMPZ, const int& n, float* D, float* E, float* Z, const int& ldz, float* WORK, int* info) const
271 { SPTEQR_F77(CHAR_MACRO(COMPZ), &n, D, E, Z, &ldz, WORK, info); }
272
273
274 void LAPACK<int, float>::HSEQR(const char& JOB, const char& COMPZ, const int& n, const int& ilo, const int& ihi, float* H, const int& ldh, float* WR, float* WI, float* Z, const int& ldz, float* WORK, const int& lwork, int* info) const
275 { SHSEQR_F77(CHAR_MACRO(JOB), CHAR_MACRO(COMPZ), &n, &ilo, &ihi, H, &ldh, WR, WI, Z, &ldz, WORK, &lwork, info); }
276
277
278 void LAPACK<int, float>::GEES(const char& JOBVS, const char& SORT, int (*ptr2func)(float*, float*), const int& n, float* A, const int& lda, int* sdim, float* WR, float* WI, float* VS, const int& ldvs, float* WORK, const int& lwork, int* BWORK, int* info) const
279 { SGEES_F77(CHAR_MACRO(JOBVS), CHAR_MACRO(SORT), ptr2func, &n, A, &lda, sdim, WR, WI, VS, &ldvs, WORK, &lwork, BWORK, info); }
280
281
282 void LAPACK<int, float>::GEES(const char& JOBVS, const int& n, float* A, const int& lda, int* sdim, float* WR, float* WI, float* VS, const int& ldvs, float* WORK, const int& lwork, float* /* RWORK */, int* BWORK, int* info) const
283 {
284 int (*nullfptr)(float*,float*) = NULL;
285 const char sort = 'N';
286 SGEES_F77(CHAR_MACRO(JOBVS), CHAR_MACRO(sort), nullfptr, &n, A, &lda, sdim, WR, WI, VS, &ldvs, WORK, &lwork, BWORK, info);
287 }
288
289
290 void LAPACK<int, float>::GEEV(const char& JOBVL, const char& JOBVR, const int& n, float* A, const int& lda, float* WR, float* WI, float* VL, const int& ldvl, float* VR, const int& ldvr, float* WORK, const int& lwork, int* info) const
291 { SGEEV_F77(CHAR_MACRO(JOBVL), CHAR_MACRO(JOBVR), &n, A, &lda, WR, WI, VL, &ldvl, VR, &ldvr, WORK, &lwork, info); }
292
293 void LAPACK<int, float>::GEEV(const char& JOBVL, const char& JOBVR, const int& n, float* A, const int& lda, float* WR, float* WI, float* VL, const int& ldvl, float* VR, const int& ldvr, float* WORK, const int& lwork, float* /* RWORK */, int* info) const
294 {
295 GEEV (JOBVL, JOBVR, n, A, lda, WR, WI, VL, ldvl, VR, ldvr, WORK, lwork, info);
296 }
297
298
299 void LAPACK<int, float>::GESVD(const char& JOBU, const char& JOBVT, const int& m, const int& n, float* A, const int& lda, float* S, float* U, const int& ldu, float* V, const int& ldv, float* WORK, const int& lwork, float* /* RWORK */, int* info) const
300 { SGESVD_F77(CHAR_MACRO(JOBU), CHAR_MACRO(JOBVT), &m, &n, A, &lda, S, U, &ldu, V, &ldv, WORK, &lwork, info); }
301
302
303 void LAPACK<int,float>::GEEVX(const char& BALANC, const char& JOBVL, const char& JOBVR, const char& SENSE, const int& n, float* A, const int& lda, float* WR, float* WI, float* VL, const int& ldvl, float* VR, const int& ldvr, int* ilo, int* ihi, float* SCALE, float* abnrm, float* RCONDE, float* RCONDV, float* WORK, const int& lwork, int* IWORK, int* info) const
304 { SGEEVX_F77(CHAR_MACRO(BALANC), CHAR_MACRO(JOBVL), CHAR_MACRO(JOBVR), CHAR_MACRO(SENSE), &n, A, &lda, WR, WI, VL, &ldvl, VR, &ldvr, ilo, ihi, SCALE, abnrm, RCONDE, RCONDV, WORK, &lwork, IWORK, info); }
305
306
307 void LAPACK<int,float>::GGEVX(const char& BALANC, const char& JOBVL, const char& JOBVR, const char& SENSE, const int& n, float* A, const int& lda, float* B, const int& ldb, float* ALPHAR, float* ALPHAI, float* BETA, float* VL, const int& ldvl, float* VR, const int& ldvr, int* ilo, int* ihi, float* lscale, float* rscale, float* abnrm, float* bbnrm, float* RCONDE, float* RCONDV, float* WORK, const int& lwork, int* IWORK, int* BWORK, int* info) const
308 { SGGEVX_F77(CHAR_MACRO(BALANC), CHAR_MACRO(JOBVL), CHAR_MACRO(JOBVR), CHAR_MACRO(SENSE), &n, A, &lda, B, &ldb, ALPHAR, ALPHAI, BETA, VL, &ldvl, VR, &ldvr, ilo, ihi, lscale, rscale, abnrm, bbnrm, RCONDE, RCONDV, WORK, &lwork, IWORK, BWORK, info); }
309
310 void LAPACK<int,float>::GGEVX(const char& BALANC, const char& JOBVL, const char& JOBVR, const char& SENSE, const int& n, float* A, const int& lda, float* B, const int& ldb, float* ALPHAR, float* ALPHAI, float* BETA, float* VL, const int& ldvl, float* VR, const int& ldvr, int* ilo, int* ihi, float* lscale, float* rscale, float* abnrm, float* bbnrm, float* RCONDE, float* RCONDV, float* WORK, const int& lwork, float* /* RWORK */, int* IWORK, int* BWORK, int* info) const
311 {
312 GGEVX(BALANC, JOBVL, JOBVR, SENSE, n, A, lda, B, ldb, ALPHAR, ALPHAI, BETA, VL, ldvl, VR, ldvr, ilo, ihi, lscale, rscale, abnrm, bbnrm, RCONDE, RCONDV, WORK, lwork, IWORK, BWORK, info);
313 }
314
315 void LAPACK<int, float>::GGEV(const char& JOBVL, const char& JOBVR, const int& n, float* A, const int& lda, float* B, const int& ldb, float* ALPHAR, float* ALPHAI, float* BETA, float* VL, const int& ldvl, float* VR, const int& ldvr, float* WORK, const int& lwork, int* info) const
316 { SGGEV_F77(CHAR_MACRO(JOBVL), CHAR_MACRO(JOBVR), &n, A, &lda, B, &ldb, ALPHAR, ALPHAI, BETA, VL, &ldvl, VR, &ldvr, WORK, &lwork, info); }
317
318
319 void LAPACK<int, float>::TRSEN(const char& JOB, const char& COMPQ, const int* SELECT, const int& n, float* T, const int& ldt, float* Q, const int& ldq, float* WR, float* WI, int* M, float* S, float* SEP, float* WORK, const int& lwork, int* IWORK, const int& liwork, int* info ) const
320 { STRSEN_F77(CHAR_MACRO(JOB), CHAR_MACRO(COMPQ), SELECT, &n, T, &ldt, Q, &ldq, WR, WI, M, S, SEP, WORK, &lwork, IWORK, &liwork, info); }
321
322
323 void LAPACK<int, float>::TGSEN(const int& ijob, const int& wantq, const int& wantz, const int* SELECT, const int& n, float* A, const int& lda, float* B, const int& ldb, float* ALPHAR, float* ALPHAI, float* BETA, float* Q, const int& ldq, float* Z, const int& ldz, int* M, float* PL, float* PR, float* DIF, float* WORK, const int& lwork, int* IWORK, const int& liwork, int* info ) const
324 { STGSEN_F77(&ijob, &wantq, &wantz, SELECT, &n, A, &lda, B, &ldb, ALPHAR, ALPHAI, BETA, Q, &ldq, Z, &ldz, M, PL, PR, DIF, WORK, &lwork, IWORK, &liwork, info); }
325
326
327 void LAPACK<int, float>::GGES(const char& JOBVL, const char& JOBVR, const char& SORT, int (*ptr2func)(float* , float* , float* ), const int& n, float* A, const int& lda, float* B, const int& ldb, int* sdim, float* ALPHAR, float* ALPHAI, float* BETA, float* VL, const int& ldvl, float* VR, const int& ldvr, float* WORK, const int& lwork, int* BWORK, int* info ) const
328 { SGGES_F77(CHAR_MACRO(JOBVL), CHAR_MACRO(JOBVR), CHAR_MACRO(SORT), ptr2func, &n, A, &lda, B, &ldb, sdim, ALPHAR, ALPHAI, BETA, VL, &ldvl, VR, &ldvr, WORK, &lwork, BWORK, info); }
329
330
331 void LAPACK<int, float>::ORMQR(const char& SIDE, const char& TRANS, const int& m, const int& n, const int& k, const float* A, const int& lda, const float* TAU, float* C, const int& ldc, float* WORK, const int& lwork, int* info) const
332 { SORMQR_F77(CHAR_MACRO(SIDE), CHAR_MACRO(TRANS), &m, &n, &k, A, &lda, TAU, C, &ldc, WORK, &lwork, info); }
333
334
335 void LAPACK<int, float>::ORM2R(const char& SIDE, const char& TRANS, const int& m, const int& n, const int& k, const float* A, const int& lda, const float* TAU, float* C, const int& ldc, float* WORK, int* const info) const
336 { SORM2R_F77(CHAR_MACRO(SIDE), CHAR_MACRO(TRANS), &m, &n, &k, A, &lda, TAU, C, &ldc, WORK, info); }
337
338
339 void LAPACK<int, float>::UNMQR(const char& SIDE, const char& TRANS, const int& m, const int& n, const int& k, const float* A, const int& lda, const float* TAU, float* C, const int& ldc, float* WORK, const int& lwork, int* info) const
340 {
341 // LAPACK only defines UNMQR for Z and C (complex*8 resp. complex*16), but logically, UNMQR means the same thing as ORMQR for real arithmetic.
342 ORMQR (SIDE, TRANS, m, n, k, A, lda, TAU, C, ldc, WORK, lwork, info);
343 }
344
345 void LAPACK<int, float>::UNM2R (const char& SIDE, const char& TRANS, const int& M, const int& N, const int& K, const float* A, const int& LDA, const float* TAU, float* C, const int& LDC, float* WORK, int* const INFO) const
346 {
347 // LAPACK only defines UNM2R for Z and C (complex*8
348 // resp. complex*16), but logically, UNM2R means the same thing as
349 // ORM2R for real arithmetic.
350 ORM2R (SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, WORK, INFO);
351 }
352
353
354 void LAPACK<int, float>::ORGQR(const int& m, const int& n, const int& k, float* A, const int& lda, const float* TAU, float* WORK, const int& lwork, int* info) const
355 { SORGQR_F77( &m, &n, &k, A, &lda, TAU, WORK, &lwork, info); }
356
357
358 void LAPACK<int, float>::UNGQR(const int& m, const int& n, const int& k, float* A, const int& lda, const float* TAU, float* WORK, const int& lwork, int* info) const
359 { SORGQR_F77( &m, &n, &k, A, &lda, TAU, WORK, &lwork, info); }
360
361
362 void LAPACK<int, float>::ORGHR(const int& n, const int& ilo, const int& ihi, float* A, const int& lda, const float* TAU, float* WORK, const int& lwork, int* info) const
363 { SORGHR_F77(&n, &ilo, &ihi, A, &lda, TAU, WORK, &lwork, info); }
364
365
366 void LAPACK<int, float>::ORMHR(const char& SIDE, const char& TRANS, const int& m, const int& n, const int& ilo, const int& ihi, const float* A, const int& lda, const float* TAU, float* C, const int& ldc, float* WORK, const int& lwork, int* info) const
367 { SORMHR_F77(CHAR_MACRO(SIDE), CHAR_MACRO(TRANS), &m, &n, &ilo, &ihi, A, &lda, TAU, C, &ldc, WORK, &lwork, info); }
368
369
370 void LAPACK<int, float>::TREVC(const char& SIDE, const char& HOWMNY, int* select, const int& n, const float* T, const int& ldt, float* VL, const int& ldvl, float* VR, const int& ldvr, const int& mm, int* m, float* WORK, int* info) const
371 { STREVC_F77(CHAR_MACRO(SIDE), CHAR_MACRO(HOWMNY), select, &n, T, &ldt, VL, &ldvl, VR, &ldvr, &mm, m, WORK, info); }
372
373
374 void LAPACK<int, float>::TREVC(const char& SIDE, const int& n, const float* T, const int& ldt, float* VL, const int& ldvl, float* VR, const int& ldvr, const int& mm, int* m, float* WORK, float* /* RWORK */, int* info) const
375 {
376 std::vector<int> select(1);
377 const char whch = 'A';
378 STREVC_F77(CHAR_MACRO(SIDE), CHAR_MACRO(whch), &select[0], &n, T, &ldt, VL, &ldvl, VR, &ldvr, &mm, m, WORK, info);
379 }
380
381 void LAPACK<int, float>::TREXC(const char& COMPQ, const int& n, float* T, const int& ldt, float* Q, const int& ldq, int* ifst, int* ilst, float* WORK, int* info) const
382 { STREXC_F77(CHAR_MACRO(COMPQ), &n, T, &ldt, Q, &ldq, ifst, ilst, WORK, info); }
383
384
385 void LAPACK<int, float>::TGEVC(const char& SIDE, const char& HOWMNY, const int* SELECT, const int& n, const float* S, const int& lds, const float* P, const int& ldp, float* VL, const int& ldvl, float* VR, const int& ldvr, const int& mm, int* M, float* WORK, int* info) const
386 { STGEVC_F77(CHAR_MACRO(SIDE), CHAR_MACRO(HOWMNY), SELECT, &n, S, &lds, P, &ldp, VL, &ldvl, VR, &ldvr, &mm, M, WORK, info); }
387
388
389 void LAPACK<int, float>::LARTG( const float& f, const float& g, float* c, float* s, float* r ) const
390 { SLARTG_F77(&f, &g, c, s, r); }
391
392
393 void LAPACK<int, float>::LARFG( const int& n, float* alpha, float* x, const int& incx, float* tau ) const
394 { SLARFG_F77(&n, alpha, x, &incx, tau); }
395
396 void LAPACK<int, float>::GEBAL(const char& JOBZ, const int& n, float* A, const int& lda, int* ilo, int* ihi, float* scale, int* info) const
397 { SGEBAL_F77(CHAR_MACRO(JOBZ),&n, A, &lda, ilo, ihi, scale, info); }
398
399
400 void LAPACK<int, float>::GEBAK(const char& JOBZ, const char& SIDE, const int& n, const int& ilo, const int& ihi, const float* scale, const int& m, float* V, const int& ldv, int* info) const
401 { SGEBAK_F77(CHAR_MACRO(JOBZ), CHAR_MACRO(SIDE), &n, &ilo, &ihi, scale, &m, V, &ldv, info); }
402
403#ifdef HAVE_TEUCHOS_LAPACKLARND
404 float LAPACK<int, float>::LARND( const int& idist, int* seed ) const
405 { return(SLARND_F77(&idist, seed)); }
406#endif
407
408 void LAPACK<int, float>::LARNV( const int& idist, int* seed, const int& n, float* v ) const
409 { SLARNV_F77(&idist, seed, &n, v); }
410
411
412 float LAPACK<int, float>::LAMCH(const char& CMACH) const
413 { return(SLAMCH_F77(CHAR_MACRO(CMACH))); }
414
415
416 int LAPACK<int, float>::ILAENV( const int& ispec, const std::string& NAME, const std::string& OPTS, const int& N1, const int& N2, const int& N3, const int& N4 ) const
417 {
418 unsigned int opts_length = OPTS.length();
419 // if user queries a Hermitian routine, change it to a symmetric routine
420 std::string temp_NAME = "s" + NAME;
421 if (temp_NAME.substr(1,2) == "he") {
422 temp_NAME.replace(1,2,"sy");
423 }
424 unsigned int name_length = temp_NAME.length();
425 return ilaenv_wrapper(&ispec, &temp_NAME[0], name_length, &OPTS[0], opts_length, &N1, &N2, &N3, &N4);
426 }
427
428
429 float LAPACK<int, float>::LAPY2(const float& x, const float& y) const
430 {
431#if defined(HAVE_TEUCHOS_BLASFLOAT)
432 return SLAPY2_F77(&x, &y);
433#else
434 typedef ScalarTraits<float> ST;
435 const float xabs = ST::magnitude(x);
436 const float yabs = ST::magnitude(y);
437 const float w = TEUCHOS_MAX(xabs, yabs);
438 const float z = TEUCHOS_MIN(xabs, yabs);
439 if ( z == 0.0 ) {
440 return w;
441 }
442 const float z_over_w = z/w;
443 return w*ST::squareroot( 1.0+(z_over_w*z_over_w));
444#endif
445 }
446
447 // END INT, FLOAT SPECIALIZATION IMPLEMENTATION //
448
449 // BEGIN INT, DOUBLE SPECIALIZATION IMPLEMENTATION //
450
451 void LAPACK<int, double>::PTTRF(const int& n, double* d, double* e, int* info) const
452 { DPTTRF_F77(&n,d,e,info); }
453
454
455 void LAPACK<int, double>::PTTRS(const int& n, const int& nrhs, const double* d, const double* e, double* B, const int& ldb, int* info) const
456 { DPTTRS_F77(&n,&nrhs,d,e,B,&ldb,info); }
457
458
459 void LAPACK<int, double>::POTRF(const char& UPLO, const int& n, double* A, const int& lda, int* info) const
460 { DPOTRF_F77(CHAR_MACRO(UPLO), &n, A, &lda, info); }
461
462
463 void LAPACK<int, double>::POTRS(const char& UPLO, const int& n, const int& nrhs, const double* A, const int& lda, double* B, const int& ldb, int* info) const
464 { DPOTRS_F77(CHAR_MACRO(UPLO), &n, &nrhs, A, &lda, B, &ldb, info); }
465
466
467 void LAPACK<int, double>::POTRI(const char& UPLO, const int& n, double* A, const int& lda, int* info) const
468 { DPOTRI_F77(CHAR_MACRO(UPLO), &n, A, &lda, info); }
469
470
471 void LAPACK<int, double>::POCON(const char& UPLO, const int& n, const double* A, const int& lda, const double& anorm, double* rcond, double* WORK, int* IWORK, int* info) const
472 { DPOCON_F77(CHAR_MACRO(UPLO), &n, A, &lda, &anorm, rcond, WORK, IWORK, info); }
473
474
475 void LAPACK<int, double>::POSV(const char& UPLO, const int& n, const int& nrhs, double* A, const int& lda, double* B, const int& ldb, int* info) const
476 { DPOSV_F77(CHAR_MACRO(UPLO), &n, &nrhs, A, &lda, B, &ldb, info); }
477
478
479 void LAPACK<int, double>::POEQU(const int& n, const double* A, const int& lda, double* S, double* scond, double* amax, int* info) const
480 { DPOEQU_F77(&n, A, &lda, S, scond, amax, info); }
481
482
483 void LAPACK<int, double>::PORFS(const char& UPLO, const int& n, const int& nrhs, const double* A, const int& lda, const double* AF, const int& ldaf, const double* B, const int& ldb, double* X, const int& ldx, double* FERR, double* BERR, double* WORK, int* IWORK, int* info) const
484 { DPORFS_F77(CHAR_MACRO(UPLO), &n, &nrhs, A, &lda, AF, &ldaf, B, &ldb, X, &ldx, FERR, BERR, WORK, IWORK, info); }
485
486 void LAPACK<int, double>::POSVX(const char& FACT, const char& UPLO, const int& n, const int& nrhs, double* A, const int& lda, double* AF, const int& ldaf, char* EQUED, double* S, double* B, const int& ldb, double* X, const int& ldx, double* rcond, double* FERR, double* BERR, double* WORK, int* IWORK, int* info) const
487 { DPOSVX_F77(CHAR_MACRO(FACT), CHAR_MACRO(UPLO), &n, &nrhs, A, &lda, AF, &ldaf, CHARPTR_MACRO(EQUED), S, B, &ldb, X, &ldx, rcond, FERR, BERR, WORK, IWORK, info); }
488
489
490 void LAPACK<int,double>::GELS(const char& TRANS, const int& m, const int& n, const int& nrhs, double* A, const int& lda, double* B, const int& ldb, double* WORK, const int& lwork, int* info) const
491 { DGELS_F77(CHAR_MACRO(TRANS), &m, &n, &nrhs, A, &lda, B, &ldb, WORK, &lwork, info); }
492
493
494 void LAPACK<int,double>::GELSS(const int& m, const int& n, const int& nrhs, double* A, const int& lda, double* B, const int& ldb, double* S, const double& rcond, int* rank, double* WORK, const int& lwork, double* rwork, int* info) const
495 {
496 (void) rwork;
497 DGELSS_F77(&m, &n, &nrhs, A, &lda, B, &ldb, S, &rcond, rank, WORK, &lwork, info);
498 }
499
500
501 void LAPACK<int,double>::GELSS(const int& m, const int& n, const int& nrhs, double* A, const int& lda, double* B, const int& ldb, double* S, const double& rcond, int* rank, double* WORK, const int& lwork, int* info) const
502 { DGELSS_F77(&m, &n, &nrhs, A, &lda, B, &ldb, S, &rcond, rank, WORK, &lwork, info); }
503
504
505 void LAPACK<int,double>::GGLSE(const int& m, const int& n, const int& p, double* A, const int& lda, double* B, const int& ldb, double* C, double* D, double* X, double* WORK, const int& lwork, int* info) const
506 { DGGLSE_F77(&m, &n, &p, A, &lda, B, &ldb, C, D, X, WORK, &lwork, info); }
507
508
509 void LAPACK<int,double>::GEQRF( const int& m, const int& n, double* A, const int& lda, double* TAU, double* WORK, const int& lwork, int* info) const
510 { DGEQRF_F77(&m, &n, A, &lda, TAU, WORK, &lwork, info); }
511
512 void LAPACK<int,double>::GEQR2 (const int& m, const int& n, double* A, const int& lda, double* TAU, double* WORK, int* const info) const
513 {
514 DGEQR2_F77(&m, &n, A, &lda, TAU, WORK, info);
515 }
516
517 void LAPACK<int,double>::GETRF(const int& m, const int& n, double* A, const int& lda, int* IPIV, int* info) const
518 { DGETRF_F77(&m, &n, A, &lda, IPIV, info); }
519
520
521 void LAPACK<int,double>::GETRS(const char& TRANS, const int& n, const int& nrhs, const double* A, const int& lda, const int* IPIV, double* B, const int& ldb, int* info) const
522 { DGETRS_F77(CHAR_MACRO(TRANS), &n, &nrhs, A, &lda, IPIV, B, &ldb, info); }
523
524
525 void LAPACK<int,double>::LASCL(const char& TYPE, const int& kl, const int& ku, const double& cfrom, const double& cto, const int& m, const int& n, double* A, const int& lda, int* info) const
526 { DLASCL_F77(CHAR_MACRO(TYPE), &kl, &ku, &cfrom, &cto, &m, &n, A, &lda, info); }
527
528 void LAPACK<int,double>::GEQP3(const int& m, const int& n, double* A, const int& lda, int* jpvt, double* TAU, double* WORK, const int& lwork, double* RWORK, int* info ) const
529 {
530 (void) RWORK;
531 DGEQP3_F77(&m, &n, A, &lda, jpvt, TAU, WORK, &lwork, info);
532 }
533
534 void LAPACK<int, double>::LASWP (const int& N, double* A, const int& LDA, const int& K1, const int& K2, const int* IPIV, const int& INCX) const
535 { DLASWP_F77(&N, A, &LDA, &K1, &K2, IPIV, &INCX); }
536
537 void LAPACK<int,double>::GBTRF(const int& m, const int& n, const int& kl, const int& ku, double* A, const int& lda, int* IPIV, int* info) const
538 { DGBTRF_F77(&m, &n, &kl, &ku, A, &lda, IPIV, info); }
539
540
541 void LAPACK<int,double>::GBTRS(const char& TRANS, const int& n, const int& kl, const int& ku, const int& nrhs, const double* A, const int& lda, const int* IPIV, double* B, const int& ldb, int* info) const
542 { DGBTRS_F77(CHAR_MACRO(TRANS), &n, &kl, &ku, &nrhs, A, &lda, IPIV, B, &ldb, info); }
543
544
545 void LAPACK<int,double>::GTTRF(const int& n, double* dl, double* d, double* du, double* du2, int* IPIV, int* info) const
546 { DGTTRF_F77(&n, dl, d, du, du2, IPIV, info); }
547
548
549 void LAPACK<int,double>::GTTRS(const char& TRANS, const int& n, const int& nrhs, const double* dl, const double* d, const double* du, const double* du2, const int* IPIV, double* B, const int& ldb, int* info) const
550 { DGTTRS_F77(CHAR_MACRO(TRANS), &n, &nrhs, dl, d, du, du2, IPIV, B, &ldb, info); }
551
552
553 void LAPACK<int,double>::GETRI(const int& n, double* A, const int& lda, const int* IPIV, double* WORK, const int& lwork, int* info) const
554 { DGETRI_F77(&n, A, &lda, IPIV, WORK, &lwork, info); }
555
556 void LAPACK<int, double>::LATRS (const char& UPLO, const char& TRANS, const char& DIAG, const char& NORMIN, const int& N, const double* A, const int& LDA, double* X, double* SCALE, double* CNORM, int* INFO) const
557 {
558 DLATRS_F77(CHAR_MACRO(UPLO), CHAR_MACRO(TRANS), CHAR_MACRO(DIAG), CHAR_MACRO(NORMIN), &N, A, &LDA, X, SCALE, CNORM, INFO);
559 }
560
561 void LAPACK<int,double>::GECON(const char& NORM, const int& n, const double* A, const int& lda, const double& anorm, double* rcond, double* WORK, int* IWORK, int* info) const
562 { DGECON_F77(CHAR_MACRO(NORM), &n, A, &lda, &anorm, rcond, WORK, IWORK, info); }
563
564
565 void LAPACK<int,double>::GBCON(const char& NORM, const int& n, const int& kl, const int& ku, const double* A, const int& lda, const int* IPIV, const double& anorm, double* rcond, double* WORK, int* IWORK, int* info) const
566 { DGBCON_F77(CHAR_MACRO(NORM), &n, &kl, &ku, A, &lda, IPIV, &anorm, rcond, WORK, IWORK, info); }
567
568
569 double LAPACK<int,double>::LANGB(const char& NORM, const int& n, const int& kl, const int& ku, const double* A, const int& lda, double* WORK) const
570 { return( DLANGB_F77(CHAR_MACRO(NORM), &n, &kl, &ku, A, &lda, WORK) ); }
571
572
573 void LAPACK<int,double>::GESV(const int& n, const int& nrhs, double* A, const int& lda, int* IPIV, double* B, const int& ldb, int* info) const
574 { DGESV_F77(&n, &nrhs, A, &lda, IPIV, B, &ldb, info); }
575
576
577 void LAPACK<int,double>::GEEQU(const int& m, const int& n, const double* A, const int& lda, double* R, double* C, double* rowcond, double* colcond, double* amax, int* info) const
578 { DGEEQU_F77(&m, &n, A, &lda, R, C, rowcond, colcond, amax, info); }
579
580
581 void LAPACK<int,double>::GERFS(const char& TRANS, const int& n, const int& nrhs, const double* A, const int& lda, const double* AF, const int& ldaf, const int* IPIV, const double* B, const int& ldb, double* X, const int& ldx, double* FERR, double* BERR, double* WORK, int* IWORK, int* info) const
582 { DGERFS_F77(CHAR_MACRO(TRANS), &n, &nrhs, A, &lda, AF, &ldaf, IPIV, B, &ldb, X, &ldx, FERR, BERR, WORK, IWORK, info); }
583
584
585 void LAPACK<int,double>::GBEQU(const int& m, const int& n, const int& kl, const int& ku, const double* A, const int& lda, double* R, double* C, double* rowcond, double* colcond, double* amax, int* info) const
586 { DGBEQU_F77(&m, &n, &kl, &ku, A, &lda, R, C, rowcond, colcond, amax, info); }
587
588
589 void LAPACK<int,double>::GBRFS(const char& TRANS, const int& n, const int& kl, const int& ku, const int& nrhs, const double* A, const int& lda, const double* AF, const int& ldaf, const int* IPIV, const double* B, const int& ldb, double* X, const int& ldx, double* FERR, double* BERR, double* WORK, int* IWORK, int* info) const
590 { DGBRFS_F77(CHAR_MACRO(TRANS), &n, &kl, &ku, &nrhs, A, &lda, AF, &ldaf, IPIV, B, &ldb, X, &ldx, FERR, BERR, WORK, IWORK, info); }
591
592 void LAPACK<int,double>::GESVX(const char& FACT, const char& TRANS, const int& n, const int& nrhs, double* A, const int& lda, double* AF, const int& ldaf, int* IPIV, char* EQUED, double* R, double* C, double* B, const int& ldb, double* X, const int& ldx, double* rcond, double* FERR, double* BERR, double* WORK, int* IWORK, int* info) const
593 { DGESVX_F77(CHAR_MACRO(FACT), CHAR_MACRO(TRANS), &n, &nrhs, A, &lda, AF, &ldaf, IPIV, CHARPTR_MACRO(EQUED), R, C, B, &ldb, X, &ldx, rcond, FERR, BERR, WORK, IWORK, info); }
594
595
596 void LAPACK<int,double>::SYTRD(const char& UPLO, const int& n, double* A, const int& lda, double* D, double* E, double* TAU, double* WORK, const int& lwork, int* info) const
597 { DSYTRD_F77(CHAR_MACRO(UPLO), &n, A, &lda, D, E, TAU, WORK, &lwork, info); }
598
599
600 void LAPACK<int, double>::GEHRD(const int& n, const int& ilo, const int& ihi, double* A, const int& lda, double* TAU, double* WORK, const int& lwork, int* info) const
601 { DGEHRD_F77(&n, &ilo, &ihi, A, &lda, TAU, WORK, &lwork, info); }
602
603
604 void LAPACK<int,double>::TRTRS(const char& UPLO, const char& TRANS, const char& DIAG, const int& n, const int& nrhs, const double* A, const int& lda, double* B, const int& ldb, int* info) const
605 { DTRTRS_F77(CHAR_MACRO(UPLO), CHAR_MACRO(TRANS), CHAR_MACRO(DIAG), &n, &nrhs, A, &lda, B, &ldb, info); }
606
607
608 void LAPACK<int,double>::TRTRI(const char& UPLO, const char& DIAG, const int& n, double* A, const int& lda, int* info) const
609 { DTRTRI_F77(CHAR_MACRO(UPLO), CHAR_MACRO(DIAG), &n, A, &lda, info); }
610
611
612 void LAPACK<int,double>::SPEV(const char& JOBZ, const char& UPLO, const int& n, double* AP, double* W, double* Z, const int& ldz, double* WORK, int* info) const
613 { DSPEV_F77(CHAR_MACRO(JOBZ), CHAR_MACRO(UPLO), &n, AP, W, Z, &ldz, WORK, info); }
614
615
616 void LAPACK<int,double>::SYEV(const char& JOBZ, const char& UPLO, const int& n, double* A, const int& lda, double* W, double* WORK, const int& lwork, int* info) const
617 {
618 DSYEV_F77(CHAR_MACRO(JOBZ), CHAR_MACRO(UPLO), &n, A, &lda, W, WORK, &lwork, info);
619 }
620
621
622 void LAPACK<int,double>::SYGV(const int& itype, const char& JOBZ, const char& UPLO, const int& n, double* A, const int& lda, double* B, const int& ldb, double* W, double* WORK, const int& lwork, int* info) const
623 {
624 DSYGV_F77(&itype, CHAR_MACRO(JOBZ), CHAR_MACRO(UPLO), &n, A, &lda, B, &ldb, W, WORK, &lwork, info);
625 }
626
627
628 void LAPACK<int,double>::HEEV(const char& JOBZ, const char& UPLO, const int& n, double* A, const int& lda, double* W, double* WORK, const int& lwork, double* /* RWORK */, int* info) const
629 {
630 DSYEV_F77(CHAR_MACRO(JOBZ), CHAR_MACRO(UPLO), &n, A, &lda, W, WORK, &lwork, info);
631 }
632
633
634 void LAPACK<int,double>::HEGV(const int& itype, const char& JOBZ, const char& UPLO, const int& n, double* A, const int& lda, double* B, const int& ldb, double* W, double* WORK, const int& lwork, double* /* RWORK */, int* info) const
635 {
636 DSYGV_F77(&itype, CHAR_MACRO(JOBZ), CHAR_MACRO(UPLO), &n, A, &lda, B, &ldb, W, WORK, &lwork, info);
637 }
638
639
640 void LAPACK<int,double>::STEQR(const char& COMPZ, const int& n, double* D, double* E, double* Z, const int& ldz, double* WORK, int* info) const
641 { DSTEQR_F77(CHAR_MACRO(COMPZ), &n, D, E, Z, &ldz, WORK, info); }
642
643
644 void LAPACK<int,double>::PTEQR(const char& COMPZ, const int& n, double* D, double* E, double* Z, const int& ldz, double* WORK, int* info) const
645 { DPTEQR_F77(CHAR_MACRO(COMPZ), &n, D, E, Z, &ldz, WORK, info); }
646
647
648 void LAPACK<int, double>::HSEQR(const char& JOB, const char& COMPZ, const int& n, const int& ilo, const int& ihi, double* H, const int& ldh, double* WR, double* WI, double* Z, const int& ldz, double* WORK, const int& lwork, int* info) const
649 {
650 DHSEQR_F77(CHAR_MACRO(JOB), CHAR_MACRO(COMPZ), &n, &ilo, &ihi, H, &ldh, WR, WI, Z, &ldz, WORK, &lwork, info);
651 }
652
653
654 void LAPACK<int, double>::GEES(const char& JOBVS, const char& SORT, int (*ptr2func)(double*, double*), const int& n, double* A, const int& lda, int* sdim, double* WR, double* WI, double* VS, const int& ldvs, double* WORK, const int& lwork, int* BWORK, int* info) const
655 {
656 DGEES_F77(CHAR_MACRO(JOBVS), CHAR_MACRO(SORT), ptr2func, &n, A, &lda, sdim, WR, WI, VS, &ldvs, WORK, &lwork, BWORK, info);
657 }
658
659
660 void LAPACK<int, double>::GEES(const char& JOBVS, const int& n, double* A, const int& lda, int* sdim, double* WR, double* WI, double* VS, const int& ldvs, double* WORK, const int& lwork, double* /* RWORK */, int* BWORK, int* info) const
661 {
662 //int (*nullfptr)(double*,double*) = NULL;
663 gees_nullfptr_t nullfptr = 0;
664 const char sort = 'N';
665 DGEES_F77(CHAR_MACRO(JOBVS), CHAR_MACRO(sort), nullfptr, &n, A, &lda, sdim, WR, WI, VS, &ldvs, WORK, &lwork, BWORK, info);
666 }
667
668
669 void LAPACK<int, double>::GEEV(const char& JOBVL, const char& JOBVR, const int& n, double* A, const int& lda, double* WR, double* WI, double* VL, const int& ldvl, double* VR, const int& ldvr, double* WORK, const int& lwork, int* info) const
670 {
671 DGEEV_F77(CHAR_MACRO(JOBVL), CHAR_MACRO(JOBVR), &n, A, &lda, WR, WI, VL, &ldvl, VR, &ldvr, WORK, &lwork, info);
672 }
673
674 void LAPACK<int, double>::GEEV(const char& JOBVL, const char& JOBVR, const int& n, double* A, const int& lda, double* WR, double* WI, double* VL, const int& ldvl, double* VR, const int& ldvr, double* WORK, const int& lwork, double* /* RWORK */, int* info) const
675 {
676 GEEV (JOBVL, JOBVR, n, A, lda, WR, WI, VL, ldvl, VR, ldvr, WORK, lwork, info);
677 }
678
679
680 void LAPACK<int, double>::GESVD(const char& JOBU, const char& JOBVT, const int& m, const int& n, double* A, const int& lda, double* S, double* U, const int& ldu, double* V, const int& ldv, double* WORK, const int& lwork, double* /* RWORK */, int* info) const {
681 DGESVD_F77(CHAR_MACRO(JOBU), CHAR_MACRO(JOBVT), &m, &n, A, &lda, S, U, &ldu, V, &ldv, WORK, &lwork, info);
682 }
683
684
685 void LAPACK<int,double>::GEEVX(const char& BALANC, const char& JOBVL, const char& JOBVR, const char& SENSE, const int& n, double* A, const int& lda, double* WR, double* WI, double* VL, const int& ldvl, double* VR, const int& ldvr, int* ilo, int* ihi, double* SCALE, double* abnrm, double* RCONDE, double* RCONDV, double* WORK, const int& lwork, int* IWORK, int* info) const
686 {
687 DGEEVX_F77(CHAR_MACRO(BALANC), CHAR_MACRO(JOBVL), CHAR_MACRO(JOBVR), CHAR_MACRO(SENSE), &n, A, &lda, WR, WI, VL, &ldvl, VR, &ldvr, ilo, ihi, SCALE, abnrm, RCONDE, RCONDV, WORK, &lwork, IWORK, info);
688 }
689
690
691 void LAPACK<int, double>::GGEVX(const char& BALANC, const char& JOBVL, const char& JOBVR, const char& SENSE, const int& n, double* A, const int& lda, double* B, const int& ldb, double* ALPHAR, double* ALPHAI, double* BETA, double* VL, const int& ldvl, double* VR, const int& ldvr, int* ilo, int* ihi, double* lscale, double* rscale, double* abnrm, double* bbnrm, double* RCONDE, double* RCONDV, double* WORK, const int& lwork, int* IWORK, int* BWORK, int* info) const
692 {
693 DGGEVX_F77(CHAR_MACRO(BALANC), CHAR_MACRO(JOBVL), CHAR_MACRO(JOBVR), CHAR_MACRO(SENSE), &n, A, &lda, B, &ldb, ALPHAR, ALPHAI, BETA, VL, &ldvl, VR, &ldvr, ilo, ihi, lscale, rscale, abnrm, bbnrm, RCONDE, RCONDV, WORK, &lwork, IWORK, BWORK, info);
694 }
695
696 void LAPACK<int, double>::GGEVX(const char& BALANC, const char& JOBVL, const char& JOBVR, const char& SENSE, const int& n, double* A, const int& lda, double* B, const int& ldb, double* ALPHAR, double* ALPHAI, double* BETA, double* VL, const int& ldvl, double* VR, const int& ldvr, int* ilo, int* ihi, double* lscale, double* rscale, double* abnrm, double* bbnrm, double* RCONDE, double* RCONDV, double* WORK, const int& lwork, double* /* RWORK */, int* IWORK, int* BWORK, int* info) const
697 {
698 GGEVX(BALANC, JOBVL, JOBVR, SENSE, n, A, lda, B, ldb, ALPHAR, ALPHAI, BETA, VL, ldvl, VR, ldvr, ilo, ihi, lscale, rscale, abnrm, bbnrm, RCONDE, RCONDV, WORK, lwork, IWORK, BWORK, info);
699 }
700
701 void LAPACK<int, double>::GGEV(const char& JOBVL, const char& JOBVR, const int& n, double* A, const int& lda, double* B, const int& ldb, double* ALPHAR, double* ALPHAI, double* BETA, double* VL, const int& ldvl, double* VR, const int& ldvr, double* WORK, const int& lwork, int* info) const
702 {
703 DGGEV_F77(CHAR_MACRO(JOBVL), CHAR_MACRO(JOBVR), &n, A, &lda, B, &ldb, ALPHAR, ALPHAI, BETA, VL, &ldvl, VR, &ldvr, WORK, &lwork, info);
704 }
705
706 void LAPACK<int, double>::TRSEN(const char& JOB, const char& COMPQ, const int* SELECT, const int& n, double* T, const int& ldt, double* Q, const int& ldq, double* WR, double* WI, int* M, double* S, double* SEP, double* WORK, const int& lwork, int* IWORK, const int& liwork, int* info ) const
707 { DTRSEN_F77(CHAR_MACRO(JOB), CHAR_MACRO(COMPQ), SELECT, &n, T, &ldt, Q, &ldq, WR, WI, M, S, SEP, WORK, &lwork, IWORK, &liwork, info); }
708
709
710 void LAPACK<int, double>::TGSEN(const int& ijob, const int& wantq, const int& wantz, const int* SELECT, const int& n, double* A, const int& lda, double* B, const int& ldb, double* ALPHAR, double* ALPHAI, double* BETA, double* Q, const int& ldq, double* Z, const int& ldz, int* M, double* PL, double* PR, double* DIF, double* WORK, const int& lwork, int* IWORK, const int& liwork, int* info ) const
711 { DTGSEN_F77(&ijob, &wantq, &wantz, SELECT, &n, A, &lda, B, &ldb, ALPHAR, ALPHAI, BETA, Q, &ldq, Z, &ldz, M, PL, PR, DIF, WORK, &lwork, IWORK, &liwork, info); }
712
713
714 void LAPACK<int, double>::GGES(const char& JOBVL, const char& JOBVR, const char& SORT, int (*ptr2func)(double* , double* , double* ), const int& n, double* A, const int& lda, double* B, const int& ldb, int* sdim, double* ALPHAR, double* ALPHAI, double* BETA, double* VL, const int& ldvl, double* VR, const int& ldvr, double* WORK, const int& lwork, int* BWORK, int* info ) const
715 { DGGES_F77(CHAR_MACRO(JOBVL), CHAR_MACRO(JOBVR), CHAR_MACRO(SORT), ptr2func, &n, A, &lda, B, &ldb, sdim, ALPHAR, ALPHAI, BETA, VL, &ldvl, VR, &ldvr, WORK, &lwork, BWORK, info); }
716
717
718 void LAPACK<int, double>::ORMQR(const char& SIDE, const char& TRANS, const int& m, const int& n, const int& k, const double* A, const int& lda, const double* TAU, double* C, const int& ldc, double* WORK, const int& lwork, int* info) const
719 {
720 DORMQR_F77(CHAR_MACRO(SIDE), CHAR_MACRO(TRANS), &m, &n, &k, A, &lda, TAU, C, &ldc, WORK, &lwork, info);
721 }
722
723 void LAPACK<int, double>::ORM2R(const char& SIDE, const char& TRANS, const int& m, const int& n, const int& k, const double* A, const int& lda, const double* TAU, double* C, const int& ldc, double* WORK, int* const info) const
724 {
725 DORM2R_F77(CHAR_MACRO(SIDE), CHAR_MACRO(TRANS), &m, &n, &k, A, &lda, TAU, C, &ldc, WORK, info);
726 }
727
728 void LAPACK<int, double>::UNMQR(const char& SIDE, const char& TRANS, const int& m, const int& n, const int& k, const double* A, const int& lda, const double* TAU, double* C, const int& ldc, double* WORK, const int& lwork, int* info) const
729 {
730 // LAPACK only defines UNMQR for Z and C (complex*8 resp. complex*16), but logically, UNMQR means the same thing as ORMQR for real arithmetic.
731 ORMQR (SIDE, TRANS, m, n, k, A, lda, TAU, C, ldc, WORK, lwork, info);
732 }
733
734 void LAPACK<int, double>::UNM2R (const char& SIDE, const char& TRANS, const int& M, const int& N, const int& K, const double* A, const int& LDA, const double* TAU, double* C, const int& LDC, double* WORK, int* const INFO) const
735 {
736 // LAPACK only defines UNM2R for Z and C (complex*8
737 // resp. complex*16), but logically, UNM2R means the same thing as
738 // ORM2R for real arithmetic.
739 ORM2R (SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, WORK, INFO);
740 }
741
742 void LAPACK<int, double>::ORGQR(const int& m, const int& n, const int& k, double* A, const int& lda, const double* TAU, double* WORK, const int& lwork, int* info) const
743 {
744 DORGQR_F77( &m, &n, &k, A, &lda, TAU, WORK, &lwork, info);
745 }
746
747
748 void LAPACK<int, double>::UNGQR(const int& m, const int& n, const int& k, double* A, const int& lda, const double* TAU, double* WORK, const int& lwork, int* info) const
749 {
750 DORGQR_F77( &m, &n, &k, A, &lda, TAU, WORK, &lwork, info);
751 }
752
753
754 void LAPACK<int, double>::ORGHR(const int& n, const int& ilo, const int& ihi, double* A, const int& lda, const double* TAU, double* WORK, const int& lwork, int* info) const
755 {
756 DORGHR_F77(&n, &ilo, &ihi, A, &lda, TAU, WORK, &lwork, info);
757 }
758
759
760 void LAPACK<int, double>::ORMHR(const char& SIDE, const char& TRANS, const int& m, const int& n, const int& ilo, const int& ihi, const double* A, const int& lda, const double* TAU, double* C, const int& ldc, double* WORK, const int& lwork, int* info) const
761 {
762 DORMHR_F77(CHAR_MACRO(SIDE), CHAR_MACRO(TRANS), &m, &n, &ilo, &ihi, A, &lda, TAU, C, &ldc, WORK, &lwork, info);
763 }
764
765
766 void LAPACK<int, double>::TREVC(const char& SIDE, const char& HOWMNY, int* select, const int& n, const double* T, const int& ldt, double* VL, const int& ldvl, double* VR, const int& ldvr, const int& mm, int* m, double* WORK, int* info) const
767 {
768 DTREVC_F77(CHAR_MACRO(SIDE), CHAR_MACRO(HOWMNY), select, &n, T, &ldt, VL, &ldvl, VR, &ldvr, &mm, m, WORK, info);
769 }
770
771
772 void LAPACK<int, double>::TREVC(const char& SIDE, const int& n, const double* T, const int& ldt, double* VL, const int& ldvl, double* VR, const int& ldvr, const int& mm, int* m, double* WORK, double* /* RWORK */, int* info) const
773 {
774 std::vector<int> select(1);
775 const char whch = 'A';
776 DTREVC_F77(CHAR_MACRO(SIDE), CHAR_MACRO(whch), &select[0], &n, T, &ldt, VL, &ldvl, VR, &ldvr, &mm, m, WORK, info);
777 }
778
779 void LAPACK<int, double>::TREXC(const char& COMPQ, const int& n, double* T, const int& ldt, double* Q, const int& ldq, int* ifst, int* ilst, double* WORK, int* info) const
780 {
781 DTREXC_F77(CHAR_MACRO(COMPQ), &n, T, &ldt, Q, &ldq, ifst, ilst, WORK, info);
782 }
783
784
785 void LAPACK<int, double>::TGEVC(const char& SIDE, const char& HOWMNY, const int* SELECT, const int& n, const double* S, const int& lds, const double* P, const int& ldp, double* VL, const int& ldvl, double* VR, const int& ldvr, const int& mm, int* M, double* WORK, int* info) const
786 { DTGEVC_F77(CHAR_MACRO(SIDE), CHAR_MACRO(HOWMNY), SELECT, &n, S, &lds, P, &ldp, VL, &ldvl, VR, &ldvr, &mm, M, WORK, info); }
787
788
789 void LAPACK<int, double>::LARTG( const double& f, const double& g, double* c, double* s, double* r ) const
790 {
791 DLARTG_F77(&f, &g, c, s, r);
792 }
793
794
795 void LAPACK<int, double>::LARFG( const int& n, double* alpha, double* x, const int& incx, double* tau ) const
796 {
797 DLARFG_F77(&n, alpha, x, &incx, tau);
798 }
799
800 void LAPACK<int, double>::GEBAL(const char& JOBZ, const int& n, double* A, const int& lda, int* ilo, int* ihi, double* scale, int* info) const
801 {
802 DGEBAL_F77(CHAR_MACRO(JOBZ),&n, A, &lda, ilo, ihi, scale, info);
803 }
804
805
806 void LAPACK<int, double>::GEBAK(const char& JOBZ, const char& SIDE, const int& n, const int& ilo, const int& ihi, const double* scale, const int& m, double* V, const int& ldv, int* info) const
807 {
808 DGEBAK_F77(CHAR_MACRO(JOBZ), CHAR_MACRO(SIDE), &n, &ilo, &ihi, scale, &m, V, &ldv, info);
809 }
810
811
812#ifdef HAVE_TEUCHOS_LAPACKLARND
813 double LAPACK<int, double>::LARND( const int& idist, int* seed ) const
814 {
815 return(DLARND_F77(&idist, seed));
816 }
817#endif
818
819 void LAPACK<int, double>::LARNV( const int& idist, int* seed, const int& n, double* v ) const
820 {
821 DLARNV_F77(&idist, seed, &n, v);
822 }
823
824
825 double LAPACK<int, double>::LAMCH(const char& CMACH) const
826 {
827 return(DLAMCH_F77(CHAR_MACRO(CMACH)));
828 }
829
830
831 int LAPACK<int, double>::ILAENV( const int& ispec, const std::string& NAME, const std::string& OPTS, const int& N1, const int& N2, const int& N3, const int& N4 ) const
832 {
833 unsigned int opts_length = OPTS.length();
834 // if user queries a Hermitian routine, change it to a symmetric routine
835 std::string temp_NAME = "d" + NAME;
836 if (temp_NAME.substr(1,2) == "he") {
837 temp_NAME.replace(1,2,"sy");
838 }
839 unsigned int name_length = temp_NAME.length();
840 return ilaenv_wrapper(&ispec, &temp_NAME[0], name_length, &OPTS[0], opts_length, &N1, &N2, &N3, &N4);
841 }
842
843
844 double LAPACK<int, double>::LAPY2(const double& x, const double& y) const
845 {
846 return DLAPY2_F77(&x, &y);
847 }
848
849 // END INT, DOUBLE SPECIALIZATION IMPLEMENTATION //
850
851#ifdef HAVE_TEUCHOS_COMPLEX
852
853 // BEGIN INT, COMPLEX<FLOAT> SPECIALIZATION IMPLEMENTATION //
854
855
856 void LAPACK<int, std::complex<float> >::PTTRF(const int& n, float* d, std::complex<float>* e, int* info) const
857 {
858 CPTTRF_F77(&n,d,e,info);
859 }
860
861
862 void LAPACK<int, std::complex<float> >::PTTRS(const char& UPLO, const int& n, const int& nrhs, const float* d, const std::complex<float>* e, std::complex<float>* B, const int& ldb, int* info) const
863 {
864 CPTTRS_F77(CHAR_MACRO(UPLO),&n,&nrhs,d,e,B,&ldb,info);
865 }
866
867
868 void LAPACK<int, std::complex<float> >::POTRF(const char& UPLO, const int& n, std::complex<float>* A, const int& lda, int* info) const
869 {
870 CPOTRF_F77(CHAR_MACRO(UPLO), &n, A, &lda, info);
871 }
872
873
874 void LAPACK<int, std::complex<float> >::POTRS(const char& UPLO, const int& n, const int& nrhs, const std::complex<float>* A, const int& lda, std::complex<float>* B, const int& ldb, int* info) const
875 {
876 CPOTRS_F77(CHAR_MACRO(UPLO), &n, &nrhs, A, &lda, B, &ldb, info);
877 }
878
879
880 void LAPACK<int, std::complex<float> >::POTRI(const char& UPLO, const int& n, std::complex<float>* A, const int& lda, int* info) const
881 {
882 CPOTRI_F77(CHAR_MACRO(UPLO), &n, A, &lda, info);
883 }
884
885
886 void LAPACK<int, std::complex<float> >::POCON(const char& UPLO, const int& n, const std::complex<float>* A, const int& lda, const float& anorm, float* rcond, std::complex<float>* WORK, float* RWORK, int* info) const
887 {
888 CPOCON_F77(CHAR_MACRO(UPLO), &n, A, &lda, &anorm, rcond, WORK, RWORK, info);
889 }
890
891
892 void LAPACK<int, std::complex<float> >::POSV(const char& UPLO, const int& n, const int& nrhs, std::complex<float>* A, const int& lda, std::complex<float>* B, const int& ldb, int* info) const
893 {
894 CPOSV_F77(CHAR_MACRO(UPLO), &n, &nrhs, A, &lda, B, &ldb, info);
895 }
896
897
898 void LAPACK<int, std::complex<float> >::POEQU(const int& n, const std::complex<float>* A, const int& lda, float* S, float* scond, float* amax, int* info) const
899 {
900 CPOEQU_F77(&n, A, &lda, S, scond, amax, info);
901 }
902
903
904 void LAPACK<int, std::complex<float> >::PORFS(const char& UPLO, const int& n, const int& nrhs, const std::complex<float>* A, const int& lda, const std::complex<float>* AF, const int& ldaf, const std::complex<float>* B, const int& ldb, std::complex<float>* X, const int& ldx, float* FERR, float* BERR, std::complex<float>* WORK, float* RWORK, int* info) const
905 {
906 CPORFS_F77(CHAR_MACRO(UPLO), &n, &nrhs, A, &lda, AF, &ldaf, B, &ldb, X, &ldx, FERR, BERR, WORK, RWORK, info);
907 }
908
909 void LAPACK<int, std::complex<float> >::POSVX(const char& FACT, const char& UPLO, const int& n, const int& nrhs, std::complex<float>* A, const int& lda, std::complex<float>* AF, const int& ldaf, char* EQUED, float* S, std::complex<float>* B, const int& ldb, std::complex<float>* X, const int& ldx, float* rcond, float* FERR, float* BERR, std::complex<float>* WORK, float* RWORK, int* info) const
910 {
911 CPOSVX_F77(CHAR_MACRO(FACT), CHAR_MACRO(UPLO), &n, &nrhs, A, &lda, AF, &ldaf, CHARPTR_MACRO(EQUED), S, B, &ldb, X, &ldx, rcond, FERR, BERR, WORK, RWORK, info);
912 }
913
914
915 void LAPACK<int,std::complex<float> >::GELS(const char& TRANS, const int& m, const int& n, const int& nrhs, std::complex<float>* A, const int& lda, std::complex<float>* B, const int& ldb, std::complex<float>* WORK, const int& lwork, int* info) const
916 {
917 CGELS_F77(CHAR_MACRO(TRANS), &m, &n, &nrhs, A, &lda, B, &ldb, WORK, &lwork, info);
918 }
919
920 void LAPACK<int, std::complex<float> >::GELSS(const int& m, const int& n, const int& nrhs, std::complex<float>* A, const int& lda, std::complex<float>* B, const int& ldb, float* S, const float& rcond, int* rank, std::complex<float>* WORK, const int& lwork, float* rwork, int* info) const
921 {
922 CGELSS_F77(&m, &n, &nrhs, A, &lda, B, &ldb, S, &rcond, rank, WORK, &lwork, rwork, info);
923 }
924
925 void LAPACK<int,std::complex<float> >::GEQRF( const int& m, const int& n, std::complex<float>* A, const int& lda, std::complex<float>* TAU, std::complex<float>* WORK, const int& lwork, int* info) const
926 {
927 CGEQRF_F77(&m, &n, A, &lda, TAU, WORK, &lwork, info);
928 }
929
930 void LAPACK<int,std::complex<float> >::GEQR2 (const int& m, const int& n, std::complex<float>* A, const int& lda, std::complex<float>* TAU, std::complex<float>* WORK, int* const info) const
931 {
932 CGEQR2_F77(&m, &n, A, &lda, TAU, WORK, info);
933 }
934
935 void LAPACK<int,std::complex<float> >::UNGQR(const int& m, const int& n, const int& k, std::complex<float>* A, const int& lda, const std::complex<float>* TAU, std::complex<float>* WORK, const int& lwork, int* info) const
936 {
937 CUNGQR_F77( &m, &n, &k, A, &lda, TAU, WORK, &lwork, info);
938 }
939
940 void LAPACK<int,std::complex<float> >::UNMQR(const char& SIDE, const char& TRANS, const int& m, const int& n, const int& k, const std::complex<float>* A, const int& lda, const std::complex<float>* TAU, std::complex<float>* C, const int& ldc, std::complex<float>* WORK, const int& lwork, int* info) const
941 {
942 CUNMQR_F77(CHAR_MACRO(SIDE), CHAR_MACRO(TRANS), &m, &n, &k, A, &lda, TAU, C, &ldc, WORK, &lwork, info);
943 }
944
945 void LAPACK<int,std::complex<float> >::UNM2R (const char& SIDE, const char& TRANS, const int& M, const int& N, const int& K, const std::complex<float>* A, const int& LDA, const std::complex<float>* TAU, std::complex<float>* C, const int& LDC, std::complex<float>* WORK, int* const INFO) const
946 {
947 CUNM2R_F77(CHAR_MACRO(SIDE), CHAR_MACRO(TRANS), &M, &N, &K, A, &LDA, TAU, C, &LDC, WORK, INFO);
948 }
949
950 void LAPACK<int,std::complex<float> >::GETRF(const int& m, const int& n, std::complex<float>* A, const int& lda, int* IPIV, int* info) const
951 {
952 CGETRF_F77(&m, &n, A, &lda, IPIV, info);
953 }
954
955 void LAPACK<int,std::complex<float> >::GETRS(const char& TRANS, const int& n, const int& nrhs, const std::complex<float>* A, const int& lda, const int* IPIV, std::complex<float>* B , const int& ldb, int* info) const
956 {
957 CGETRS_F77(CHAR_MACRO(TRANS), &n, &nrhs, A, &lda, IPIV, B, &ldb, info);
958 }
959
960 void LAPACK<int,std::complex<float> >::LASCL(const char& TYPE, const int& kl, const int& ku, const float& cfrom, const float& cto, const int& m, const int& n, std::complex<float>* A, const int& lda, int* info) const
961 { CLASCL_F77(CHAR_MACRO(TYPE), &kl, &ku, &cfrom, &cto, &m, &n, A, &lda, info); }
962
963 void LAPACK<int,std::complex<float> >::GEQP3(const int& m, const int& n, std::complex<float>* A, const int& lda, int* jpvt, std::complex<float>* TAU, std::complex<float>* WORK, const int& lwork, float* RWORK, int* info ) const
964 {
965 CGEQP3_F77(&m, &n, A, &lda, jpvt, TAU, WORK, &lwork, RWORK, info);
966 }
967
969 LASWP (const int& N,
970 std::complex<float>* A,
971 const int& LDA,
972 const int& K1,
973 const int& K2,
974 const int* IPIV,
975 const int& INCX) const
976 {
977 CLASWP_F77(&N, A, &LDA, &K1, &K2, IPIV, &INCX);
978 }
979
980 void LAPACK<int,std::complex<float> >::GBTRF(const int& m, const int& n, const int& kl, const int& ku, std::complex<float>* A, const int& lda, int* IPIV, int* info) const
981 {
982 CGBTRF_F77(&m, &kl, &ku, &n, A, &lda, IPIV, info);
983 }
984
985
986 void LAPACK<int,std::complex<float> >::GBTRS(const char& TRANS, const int& n, const int& kl, const int& ku, const int& nrhs, const std::complex<float>* A, const int& lda, const int* IPIV, std::complex<float>* B , const int& ldb, int* info) const
987 {
988 CGBTRS_F77(CHAR_MACRO(TRANS), &n, &kl, &ku, &nrhs, A, &lda, IPIV, B, &ldb, info);
989 }
990
991
992 void LAPACK<int,std::complex<float> >::GTTRF(const int& n, std::complex<float>* dl, std::complex<float>* d, std::complex<float>* du, std::complex<float>* du2, int* IPIV, int* info) const
993 {
994 CGTTRF_F77(&n, dl, d, du, du2, IPIV, info);
995 }
996
997
998 void LAPACK<int,std::complex<float> >::GTTRS(const char& TRANS, const int& n, const int& nrhs, const std::complex<float>* dl, const std::complex<float>* d, const std::complex<float>* du, const std::complex<float>* du2, const int* IPIV, std::complex<float>* B, const int& ldb, int* info) const
999 {
1000 CGTTRS_F77(CHAR_MACRO(TRANS), &n, &nrhs, dl, d, du, du2, IPIV, B, &ldb, info);
1001 }
1002
1003
1004 void LAPACK<int,std::complex<float> >::GETRI(const int& n, std::complex<float>* A, const int& lda, const int* IPIV, std::complex<float>* WORK, const int& lwork, int* info) const
1005 {
1006 CGETRI_F77(&n, A, &lda, IPIV, WORK, &lwork, info);
1007 }
1008
1009
1010 void LAPACK<int, std::complex<float> >::LATRS (const char& UPLO, const char& TRANS, const char& DIAG, const char& NORMIN, const int& N, const std::complex<float>* A, const int& LDA, std::complex<float>* X, float* SCALE, float* CNORM, int* INFO) const
1011 {
1012 CLATRS_F77(CHAR_MACRO(UPLO), CHAR_MACRO(TRANS), CHAR_MACRO(DIAG), CHAR_MACRO(NORMIN), &N, A, &LDA, X, SCALE, CNORM, INFO);
1013 }
1014
1015
1016 void LAPACK<int,std::complex<float> >::GECON(const char& NORM, const int& n, const std::complex<float>* A, const int& lda, const float& anorm, float* rcond, std::complex<float>* WORK, float* RWORK, int* info) const
1017 {
1018 CGECON_F77(CHAR_MACRO(NORM), &n, A, &lda, &anorm, rcond, WORK, RWORK, info);
1019 }
1020
1021
1022 void LAPACK<int,std::complex<float> >::GBCON(const char& NORM, const int& n, const int& kl, const int& ku, const std::complex<float>* A, const int& lda, const int* IPIV, const float& anorm, float* rcond, std::complex<float>* WORK, float* RWORK, int* info) const
1023 {
1024 CGBCON_F77(CHAR_MACRO(NORM), &n, &kl, &ku, A, &lda, IPIV, &anorm, rcond, WORK, RWORK, info);
1025 }
1026
1027
1028 float LAPACK<int,std::complex<float> >::LANGB(const char& NORM, const int& n, const int& kl, const int& ku, const std::complex<float>* A, const int& lda, float* WORK) const
1029 {
1030 return( CLANGB_F77(CHAR_MACRO(NORM), &n, &kl, &ku, A, &lda, WORK) );
1031 }
1032
1033
1034 void LAPACK<int,std::complex<float> >::GESV(const int& n, const int& nrhs, std::complex<float>* A, const int& lda, int* IPIV, std::complex<float>* B, const int& ldb, int* info) const
1035 {
1036 CGESV_F77(&n, &nrhs, A, &lda, IPIV, B, &ldb, info);
1037 }
1038
1039
1040 void LAPACK<int,std::complex<float> >::GEEQU(const int& m, const int& n, const std::complex<float>* A, const int& lda, float* R, float* C, float* rowcond, float* colcond, float* amax, int* info) const
1041 {
1042 CGEEQU_F77(&m, &n, A, &lda, R, C, rowcond, colcond, amax, info);
1043 }
1044
1045
1046 void LAPACK<int,std::complex<float> >::GERFS(const char& TRANS, const int& n, const int& nrhs, const std::complex<float>* A, const int& lda, const std::complex<float>* AF, const int& ldaf, const int* IPIV, const std::complex<float>* B, const int& ldb, std::complex<float>* X, const int& ldx, float* FERR, float* BERR, std::complex<float>* WORK, float* RWORK, int* info) const
1047 {
1048 CGERFS_F77(CHAR_MACRO(TRANS), &n, &nrhs, A, &lda, AF, &ldaf, IPIV, B, &ldb, X, &ldx, FERR, BERR, WORK, RWORK, info);
1049 }
1050
1051
1052 void LAPACK<int,std::complex<float> >::GBEQU(const int& m, const int& n, const int& kl, const int& ku, const std::complex<float>* A, const int& lda, float* R, float* C, float* rowcond, float* colcond, float* amax, int* info) const
1053 {
1054 CGBEQU_F77(&m, &n, &kl, &ku, A, &lda, R, C, rowcond, colcond, amax, info);
1055 }
1056
1057
1058 void LAPACK<int,std::complex<float> >::GBRFS(const char& TRANS, const int& n, const int& kl, const int& ku, const int& nrhs, const std::complex<float>* A, const int& lda, const std::complex<float>* AF, const int& ldaf, const int* IPIV, const std::complex<float>* B, const int& ldb, std::complex<float>* X, const int& ldx, float* FERR, float* BERR, std::complex<float>* WORK, float* RWORK, int* info) const
1059 {
1060 CGBRFS_F77(CHAR_MACRO(TRANS), &n, &kl, &ku, &nrhs, A, &lda, AF, &ldaf, IPIV, B, &ldb, X, &ldx, FERR, BERR, WORK, RWORK, info);
1061 }
1062
1063 void LAPACK<int,std::complex<float> >::GESVX(const char& FACT, const char& TRANS, const int& n, const int& nrhs, std::complex<float>* A, const int& lda, std::complex<float>* AF, const int& ldaf, int* IPIV, char* EQUED, float* R, float* C, std::complex<float>* B, const int& ldb, std::complex<float>* X, const int& ldx, float* rcond, float* FERR, float* BERR, std::complex<float>* WORK, float* RWORK, int* info) const
1064 {
1065 CGESVX_F77(CHAR_MACRO(FACT), CHAR_MACRO(TRANS), &n, &nrhs, A, &lda, AF, &ldaf, IPIV, CHARPTR_MACRO(EQUED), R, C, B, &ldb, X, &ldx, rcond, FERR, BERR, WORK, RWORK, info);
1066 }
1067
1068
1069 void LAPACK<int,std::complex<float> >::GEHRD(const int& n, const int& ilo, const int& ihi, std::complex<float>* A, const int& lda, std::complex<float>* TAU, std::complex<float>* WORK, const int& lwork, int* info) const
1070 {
1071 CGEHRD_F77(&n, &ilo, &ihi, A, &lda, TAU, WORK, &lwork, info);
1072 }
1073
1074
1075 void LAPACK<int,std::complex<float> >::TRTRS(const char& UPLO, const char& TRANS, const char& DIAG, const int& n, const int& nrhs, const std::complex<float>* A, const int& lda, std::complex<float>* B, const int& ldb, int* info) const
1076 {
1077 CTRTRS_F77(CHAR_MACRO(UPLO), CHAR_MACRO(TRANS), CHAR_MACRO(DIAG), &n, &nrhs, A, &lda, B, &ldb, info);
1078 }
1079
1080
1081 void LAPACK<int,std::complex<float> >::TRTRI(const char& UPLO, const char& DIAG, const int& n, std::complex<float>* A, const int& lda, int* info) const
1082 {
1083 CTRTRI_F77(CHAR_MACRO(UPLO), CHAR_MACRO(DIAG), &n, A, &lda, info);
1084 }
1085
1086
1087 void LAPACK<int,std::complex<float> >::STEQR(const char& COMPZ, const int& n, float* D, float* E, std::complex<float>* Z, const int& ldz, float* WORK, int* info) const
1088 {
1089 CSTEQR_F77(CHAR_MACRO(COMPZ), &n, D, E, Z, &ldz, WORK, info);
1090 }
1091
1092
1093 void LAPACK<int,std::complex<float> >::PTEQR(const char& COMPZ, const int& n, float* D, float* E, std::complex<float>* Z, const int& ldz, float* WORK, int* info) const
1094 {
1095 CPTEQR_F77(CHAR_MACRO(COMPZ), &n, D, E, Z, &ldz, WORK, info);
1096 }
1097
1098
1099 void LAPACK<int,std::complex<float> >::HEEV(const char& JOBZ, const char& UPLO, const int& n, std::complex<float> * A, const int& lda, float* W, std::complex<float> * WORK, const int& lwork, float* RWORK, int* info) const
1100 {
1101 CHEEV_F77(CHAR_MACRO(JOBZ), CHAR_MACRO(UPLO), &n, A, &lda, W, WORK, &lwork, RWORK, info);
1102 }
1103
1104
1105 void LAPACK<int,std::complex<float> >::HEGV(const int& itype, const char& JOBZ, const char& UPLO, const int& n, std::complex<float> * A, const int& lda, std::complex<float> * B, const int& ldb, float* W, std::complex<float> * WORK, const int& lwork, float* RWORK, int* info) const
1106 {
1107 CHEGV_F77(&itype, CHAR_MACRO(JOBZ), CHAR_MACRO(UPLO), &n, A, &lda, B, &ldb, W, WORK, &lwork, RWORK, info);
1108 }
1109
1110
1111 void LAPACK<int, std::complex<float> >::HSEQR(const char& JOB, const char& COMPZ, const int& n, const int& ilo, const int& ihi, std::complex<float>* H, const int& ldh, std::complex<float>* W, std::complex<float>* Z, const int& ldz, std::complex<float>* WORK, const int& lwork, int* info) const
1112 {
1113 CHSEQR_F77(CHAR_MACRO(JOB), CHAR_MACRO(COMPZ), &n, &ilo, &ihi, H, &ldh, W, Z, &ldz, WORK, &lwork, info);
1114 }
1115
1116
1117 void LAPACK<int, std::complex<float> >::GEES(const char& JOBVS, const char& SORT, int (*ptr2func)(std::complex<float>*), const int& n, std::complex<float>* A, const int& lda, int* sdim, std::complex<float>* W, std::complex<float>* VS, const int& ldvs, std::complex<float>* WORK, const int& lwork, float* RWORK, int* BWORK, int* info) const
1118 {
1119 CGEES_F77(CHAR_MACRO(JOBVS), CHAR_MACRO(SORT), ptr2func, &n, A, &lda, sdim, W, VS, &ldvs, WORK, &lwork, RWORK, BWORK, info);
1120 }
1121
1122
1123 void LAPACK<int, std::complex<float> >::GEES(const char& JOBVS, const int& n, std::complex<float>* A, const int& lda, int* sdim, float* WR, float* WI, std::complex<float>* VS, const int& ldvs, std::complex<float>* WORK, const int& lwork, float* RWORK, int* BWORK, int* info) const
1124 {
1125 int (*nullfptr)(std::complex<float>*) = NULL;
1126 std::vector< std::complex<float> > W(n);
1127 const char sort = 'N';
1128 CGEES_F77(CHAR_MACRO(JOBVS), CHAR_MACRO(sort), nullfptr, &n, A, &lda, sdim, &W[0], VS, &ldvs, WORK, &lwork, RWORK, BWORK, info);
1129 for (int i=0; i<n; i++) {
1130 WR[i] = W[i].real();
1131 WI[i] = W[i].imag();
1132 }
1133 }
1134
1135
1136 void LAPACK<int, std::complex<float> >::GEEV(const char& JOBVL, const char& JOBVR, const int& n, std::complex<float>* A, const int& lda, std::complex<float>* W, std::complex<float>* VL, const int& ldvl, std::complex<float>* VR, const int& ldvr, std::complex<float>* WORK, const int& lwork, float* RWORK, int* info) const
1137 {
1138 CGEEV_F77(CHAR_MACRO(JOBVL), CHAR_MACRO(JOBVR), &n, A, &lda, W, VL, &ldvl, VR, &ldvr, WORK, &lwork, RWORK, info);
1139 }
1140
1141 void LAPACK<int, std::complex<float> >::GEEV(const char& JOBVL, const char& JOBVR, const int& n, std::complex<float>* A, const int& lda, float* WR, float* WI, std::complex<float>* VL, const int& ldvl, std::complex<float>* VR, const int& ldvr, std::complex<float>* WORK, const int& lwork, float* RWORK, int* info) const
1142 {
1143 std::vector<std::complex<float> > w (n);
1144 std::complex<float>* w_rawPtr = (n == 0) ? NULL : &w[0];
1145 GEEV (JOBVL, JOBVR, n, A, lda, w_rawPtr, VL, ldvl, VR, ldvr, WORK, lwork, RWORK, info);
1146 if (*info == 0) {
1147 // The eigenvalues are only valid on output if INFO is zero.
1148 // Otherwise, we shouldn't even write to WR or WI.
1149 for (int k = 0; k < n; ++k) {
1150 WR[k] = w[k].real ();
1151 WI[k] = w[k].imag ();
1152 }
1153 }
1154 }
1155
1156 void LAPACK<int, std::complex<float> >::GESVD(const char& JOBU, const char& JOBVT, const int& m, const int& n, std::complex<float> * A, const int& lda, float* S, std::complex<float> * U, const int& ldu, std::complex<float> * V, const int& ldv, std::complex<float> * WORK, const int& lwork, float* RWORK, int* info) const {
1157 CGESVD_F77(CHAR_MACRO(JOBU), CHAR_MACRO(JOBVT), &m, &n, A, &lda, S, U, &ldu, V, &ldv, WORK, &lwork, RWORK, info);
1158 }
1159
1160
1161 void LAPACK<int, std::complex<float> >::GEEVX(const char& BALANC, const char& JOBVL, const char& JOBVR, const char& SENSE, const int& n, std::complex<float>* A, const int& lda, std::complex<float>* W, std::complex<float>* VL, const int& ldvl, std::complex<float>* VR, const int& ldvr, int* ilo, int* ihi, float* SCALE, float* abnrm, float* RCONDE, float* RCONDV, std::complex<float>* WORK, const int& lwork, float* RWORK, int* info) const
1162 {
1163 CGEEVX_F77(CHAR_MACRO(BALANC), CHAR_MACRO(JOBVL), CHAR_MACRO(JOBVR), CHAR_MACRO(SENSE), &n, A, &lda, W, VL, &ldvl, VR, &ldvr, ilo, ihi, SCALE, abnrm, RCONDE, RCONDV, WORK, &lwork, RWORK, info);
1164 }
1165
1166
1167 void LAPACK<int, std::complex<float> >::GGEVX(const char& BALANC, const char& JOBVL, const char& JOBVR, const char& SENSE, const int& n, std::complex<float>* A, const int& lda, std::complex<float>* B, const int& ldb, std::complex<float>* ALPHA, std::complex<float>* BETA, std::complex<float>* VL, const int& ldvl, std::complex<float>* VR, const int& ldvr, int* ilo, int* ihi, float* lscale, float* rscale, float* abnrm, float* bbnrm, float* RCONDE, float* RCONDV, std::complex<float>* WORK, const int& lwork, float* RWORK, int* IWORK, int* BWORK, int* info) const
1168 {
1169 CGGEVX_F77(CHAR_MACRO(BALANC), CHAR_MACRO(JOBVL), CHAR_MACRO(JOBVR), CHAR_MACRO(SENSE), &n, A, &lda, B, &ldb, ALPHA, BETA, VL, &ldvl, VR, &ldvr, ilo, ihi, lscale, rscale, abnrm, bbnrm, RCONDE, RCONDV, WORK, &lwork, RWORK, IWORK, BWORK, info);
1170 }
1171
1172 void LAPACK<int, std::complex<float> >::GGEVX(const char& BALANC, const char& JOBVL, const char& JOBVR, const char& SENSE, const int& n, std::complex<float>* A, const int& lda, std::complex<float>* B, const int& ldb, float* ALPHAR, float* ALPHAI, std::complex<float>* BETA, std::complex<float>* VL, const int& ldvl, std::complex<float>* VR, const int& ldvr, int* ilo, int* ihi, float* lscale, float* rscale, float* abnrm, float* bbnrm, float* RCONDE, float* RCONDV, std::complex<float>* WORK, const int& lwork, float* RWORK, int* IWORK, int* BWORK, int* info) const
1173 {
1174 std::vector<std::complex<float> > w (n);
1175 std::complex<float>* w_rawPtr = (n == 0) ? NULL : &w[0];
1176 GGEVX(BALANC, JOBVL, JOBVR, SENSE, n, A, lda, B, ldb, w_rawPtr, BETA, VL, ldvl, VR, ldvr, ilo, ihi, lscale, rscale, abnrm, bbnrm, RCONDE, RCONDV, WORK, lwork, RWORK, IWORK, BWORK, info);
1177 if (*info == 0) {
1178 // The eigenvalues are only valid on output if INFO is zero.
1179 // Otherwise, we shouldn't even write to WR or WI.
1180 for (int k = 0; k < n; ++k) {
1181 ALPHAR[k] = w[k].real ();
1182 ALPHAI[k] = w[k].imag ();
1183 }
1184 }
1185 }
1186
1187 void LAPACK<int, std::complex<float> >::GGEV(const char& JOBVL, const char& JOBVR, const int& n, std::complex<float> *A, const int& lda, std::complex<float> *B, const int& ldb, std::complex<float>* ALPHA, std::complex<float>* BETA, std::complex<float>* VL, const int& ldvl, std::complex<float>* VR, const int& ldvr, std::complex<float> *WORK, const int& lwork, float* RWORK, int* info) const
1188 {
1189 CGGEV_F77(CHAR_MACRO(JOBVL), CHAR_MACRO(JOBVR), &n, A, &lda, B, &ldb, ALPHA, BETA, VL, &ldvl, VR, &ldvr, WORK, &lwork, RWORK, info);
1190 }
1191
1192 void LAPACK<int, std::complex<float> >::GGES(const char& JOBVL, const char& JOBVR, const char& SORT, int (*ptr2func)(std::complex<float>*, std::complex<float>*), const int& n, std::complex<float>* A, const int& lda, std::complex<float>* B, const int& ldb, int* sdim, std::complex<float>* ALPHA, std::complex<float>* BETA, std::complex<float>* VL, const int& ldvl, std::complex<float>* VR, const int& ldvr, std::complex<float>* WORK, const int& lwork, float* rwork, int* bwork, int* info ) const
1193 {
1194 CGGES_F77(CHAR_MACRO(JOBVL), CHAR_MACRO(JOBVR), CHAR_MACRO(SORT), ptr2func, &n, A, &lda, B, &ldb, sdim, ALPHA, BETA, VL, &ldvl, VR, &ldvr, WORK, &lwork, rwork, bwork, info);
1195 }
1196 void LAPACK<int, std::complex<float> >::TGSEN(const int& ijob, const int& wantq, const int& wantz, const int* SELECT, const int& n, std::complex<float>* A, const int& lda, std::complex<float>* B, const int& ldb, std::complex<float>* ALPHA, std::complex<float>* BETA, std::complex<float>* Q, const int& ldq, std::complex<float>* Z, const int& ldz, int* M, float* PL, float* PR, float* DIF, std::complex<float>* WORK, const int& lwork, int* IWORK, const int& liwork, int* info ) const
1197 {
1198 CTGSEN_F77(&ijob, &wantq, &wantz, SELECT, &n, A, &lda, B, &ldb, ALPHA, BETA, Q, &ldq, Z, &ldz, M, PL, PR, DIF, WORK, &lwork, IWORK, &liwork, info);
1199 }
1200
1201 void LAPACK<int, std::complex<float> >::TREVC(const char& SIDE, const char& HOWMNY, int* select, const int& n, const std::complex<float>* T, const int& ldt, std::complex<float>* VL, const int& ldvl, std::complex<float>* VR, const int& ldvr, const int& mm, int* m, std::complex<float>* WORK, float* RWORK, int* info) const
1202 {
1203 CTREVC_F77(CHAR_MACRO(SIDE), CHAR_MACRO(HOWMNY), select, &n, T, &ldt, VL, &ldvl, VR, &ldvr, &mm, m, WORK, RWORK, info);
1204 }
1205
1206
1207 void LAPACK<int, std::complex<float> >::TREVC(const char& SIDE, const int& n, const std::complex<float>* T, const int& ldt, std::complex<float>* VL, const int& ldvl, std::complex<float>* VR, const int& ldvr, const int& mm, int* m, std::complex<float>* WORK, float* RWORK, int* info) const
1208 {
1209 std::vector<int> select(1);
1210 const char& whch = 'A';
1211 CTREVC_F77(CHAR_MACRO(SIDE), CHAR_MACRO(whch), &select[0], &n, T, &ldt, VL, &ldvl, VR, &ldvr, &mm, m, WORK, RWORK, info);
1212 }
1213
1214 void LAPACK<int, std::complex<float> >::TREXC(const char& COMPQ, const int& n, std::complex<float>* T, const int& ldt, std::complex<float>* Q, const int& ldq, int* ifst, int* ilst, std::complex<float>* WORK, int* info) const
1215 {
1216 CTREXC_F77(CHAR_MACRO(COMPQ), &n, T, &ldt, Q, &ldq, ifst, ilst, info);
1217 }
1218
1219
1220 void LAPACK<int, std::complex<float> >::LARTG( const std::complex<float> f, const std::complex<float> g, float* c, std::complex<float>* s, std::complex<float>* r ) const
1221 {
1222 CLARTG_F77(&f, &g, c, s, r);
1223 }
1224
1225
1226 void LAPACK<int, std::complex<float> >::LARFG( const int& n, std::complex<float>* alpha, std::complex<float>* x, const int& incx, std::complex<float>* tau ) const
1227 {
1228 CLARFG_F77(&n, alpha, x, &incx, tau);
1229 }
1230
1231 void LAPACK<int, std::complex<float> >::GEBAL(const char& JOBZ, const int& n, std::complex<float>* A, const int& lda, int* ilo, int* ihi, float* scale, int* info) const
1232 {
1233 CGEBAL_F77(CHAR_MACRO(JOBZ),&n, A, &lda, ilo, ihi, scale, info);
1234 }
1235
1236
1237 void LAPACK<int, std::complex<float> >::GEBAK(const char& JOBZ, const char& SIDE, const int& n, const int& ilo, const int& ihi, const float* scale, const int& m, std::complex<float>* V, const int& ldv, int* info) const
1238 {
1239 CGEBAK_F77(CHAR_MACRO(JOBZ), CHAR_MACRO(SIDE), &n, &ilo, &ihi, scale, &m, V, &ldv, info);
1240 }
1241
1242
1243#ifdef HAVE_TEUCHOS_LAPACKLARND
1244 std::complex<float> LAPACK<int, std::complex<float> >::LARND( const int& idist, int* seed ) const
1245 {
1246 float _Complex z = CLARND_F77(&idist, seed);
1247 return TEUCHOS_LAPACK_CONVERT_COMPLEX_FORTRAN_TO_CXX(float, z);
1248 }
1249#endif
1250
1251 void LAPACK<int, std::complex<float> >::LARNV( const int& idist, int* seed, const int& n, std::complex<float>* v ) const
1252 {
1253 CLARNV_F77(&idist, seed, &n, v);
1254 }
1255
1256
1257 int LAPACK<int, std::complex<float> >::ILAENV( const int& ispec, const std::string& NAME, const std::string& OPTS, const int& N1, const int& N2, const int& N3, const int& N4 ) const
1258 {
1259 unsigned int opts_length = OPTS.length();
1260 std::string temp_NAME = "c" + NAME;
1261 unsigned int name_length = temp_NAME.length();
1262 return ilaenv_wrapper(&ispec, &temp_NAME[0], name_length, &OPTS[0], opts_length, &N1, &N2, &N3, &N4);
1263 }
1264
1265 // END INT, COMPLEX<FLOAT> SPECIALIZATION IMPLEMENTATION //
1266
1267 // BEGIN INT, COMPLEX<DOUBLE> SPECIALIZATION IMPLEMENTATION //
1268
1269
1270 void LAPACK<int, std::complex<double> >::PTTRF(const int& n, double* d, std::complex<double>* e, int* info) const
1271 {
1272 ZPTTRF_F77(&n,d,e,info);
1273 }
1274
1275
1276 void LAPACK<int, std::complex<double> >::PTTRS(const char& UPLO, const int& n, const int& nrhs, const double* d, const std::complex<double>* e, std::complex<double>* B, const int& ldb, int* info) const
1277 {
1278 ZPTTRS_F77(CHAR_MACRO(UPLO),&n,&nrhs,d,e,B,&ldb,info);
1279 }
1280
1281
1282 void LAPACK<int, std::complex<double> >::POTRF(const char& UPLO, const int& n, std::complex<double>* A, const int& lda, int* info) const
1283 {
1284 ZPOTRF_F77(CHAR_MACRO(UPLO), &n, A, &lda, info);
1285 }
1286
1287
1288 void LAPACK<int, std::complex<double> >::POTRS(const char& UPLO, const int& n, const int& nrhs, const std::complex<double>* A, const int& lda, std::complex<double>* B, const int& ldb, int* info) const
1289 {
1290 ZPOTRS_F77(CHAR_MACRO(UPLO), &n, &nrhs, A, &lda, B, &ldb, info);
1291 }
1292
1293
1294 void LAPACK<int, std::complex<double> >::POTRI(const char& UPLO, const int& n, std::complex<double>* A, const int& lda, int* info) const
1295 {
1296 ZPOTRI_F77(CHAR_MACRO(UPLO), &n, A, &lda, info);
1297 }
1298
1299
1300 void LAPACK<int, std::complex<double> >::POCON(const char& UPLO, const int& n, const std::complex<double>* A, const int& lda, const double& anorm, double* rcond, std::complex<double>* WORK, double* RWORK, int* info) const
1301 {
1302 ZPOCON_F77(CHAR_MACRO(UPLO), &n, A, &lda, &anorm, rcond, WORK, RWORK, info);
1303 }
1304
1305
1306 void LAPACK<int, std::complex<double> >::POSV(const char& UPLO, const int& n, const int& nrhs, std::complex<double>* A, const int& lda, std::complex<double>* B, const int& ldb, int* info) const
1307 {
1308 ZPOSV_F77(CHAR_MACRO(UPLO), &n, &nrhs, A, &lda, B, &ldb, info);
1309 }
1310
1311
1312 void LAPACK<int, std::complex<double> >::POEQU(const int& n, const std::complex<double>* A, const int& lda, double* S, double* scond, double* amax, int* info) const
1313 {
1314 ZPOEQU_F77(&n, A, &lda, S, scond, amax, info);
1315 }
1316
1317
1318 void LAPACK<int, std::complex<double> >::PORFS(const char& UPLO, const int& n, const int& nrhs, const std::complex<double>* A, const int& lda, const std::complex<double>* AF, const int& ldaf, const std::complex<double>* B, const int& ldb, std::complex<double>* X, const int& ldx, double* FERR, double* BERR, std::complex<double>* WORK, double* RWORK, int* info) const
1319 {
1320 ZPORFS_F77(CHAR_MACRO(UPLO), &n, &nrhs, A, &lda, AF, &ldaf, B, &ldb, X, &ldx, FERR, BERR, WORK, RWORK, info);
1321 }
1322
1323 void LAPACK<int, std::complex<double> >::POSVX(const char& FACT, const char& UPLO, const int& n, const int& nrhs, std::complex<double>* A, const int& lda, std::complex<double>* AF, const int& ldaf, char* EQUED, double* S, std::complex<double>* B, const int& ldb, std::complex<double>* X, const int& ldx, double* rcond, double* FERR, double* BERR, std::complex<double>* WORK, double* RWORK, int* info) const
1324 {
1325 ZPOSVX_F77(CHAR_MACRO(FACT), CHAR_MACRO(UPLO), &n, &nrhs, A, &lda, AF, &ldaf, CHARPTR_MACRO(EQUED), S, B, &ldb, X, &ldx, rcond, FERR, BERR, WORK, RWORK, info);
1326 }
1327
1328
1329 void LAPACK<int,std::complex<double> >::GELS(const char& TRANS, const int& m, const int& n, const int& nrhs, std::complex<double>* A, const int& lda, std::complex<double>* B, const int& ldb, std::complex<double>* WORK, const int& lwork, int* info) const
1330 {
1331 ZGELS_F77(CHAR_MACRO(TRANS), &m, &n, &nrhs, A, &lda, B, &ldb, WORK, &lwork, info);
1332 }
1333
1334
1335 void LAPACK<int, std::complex<double> >::GELSS(const int& m, const int& n, const int& nrhs, std::complex<double>* A, const int& lda, std::complex<double>* B, const int& ldb, double* S, const double& rcond, int* rank, std::complex<double>* WORK, const int& lwork, double* rwork, int* info) const
1336 {
1337 ZGELSS_F77(&m, &n, &nrhs, A, &lda, B, &ldb, S, &rcond, rank, WORK, &lwork, rwork, info);
1338 }
1339
1340
1341 void LAPACK<int,std::complex<double> >::GEQRF( const int& m, const int& n, std::complex<double>* A, const int& lda, std::complex<double>* TAU, std::complex<double>* WORK, const int& lwork, int* info) const
1342 {
1343 ZGEQRF_F77(&m, &n, A, &lda, TAU, WORK, &lwork, info);
1344 }
1345
1346 void LAPACK<int,std::complex<double> >::GEQR2 (const int& m, const int& n, std::complex<double>* A, const int& lda, std::complex<double>* TAU, std::complex<double>* WORK, int* const info) const
1347 {
1348 ZGEQR2_F77(&m, &n, A, &lda, TAU, WORK, info);
1349 }
1350
1351 void LAPACK<int,std::complex<double> >::UNGQR(const int& m, const int& n, const int& k, std::complex<double>* A, const int& lda, const std::complex<double>* TAU, std::complex<double>* WORK, const int& lwork, int* info) const
1352 {
1353 ZUNGQR_F77( &m, &n, &k, A, &lda, TAU, WORK, &lwork, info);
1354 }
1355
1356
1357 void LAPACK<int,std::complex<double> >::UNMQR(const char& SIDE, const char& TRANS, const int& m, const int& n, const int& k, const std::complex<double>* A, const int& lda, const std::complex<double>* TAU, std::complex<double>* C, const int& ldc, std::complex<double>* WORK, const int& lwork, int* info) const
1358 {
1359 ZUNMQR_F77(CHAR_MACRO(SIDE), CHAR_MACRO(TRANS), &m, &n, &k, A, &lda, TAU, C, &ldc, WORK, &lwork, info);
1360 }
1361
1362 void LAPACK<int,std::complex<double> >::UNM2R (const char& SIDE, const char& TRANS, const int& M, const int& N, const int& K, const std::complex<double>* A, const int& LDA, const std::complex<double>* TAU, std::complex<double>* C, const int& LDC, std::complex<double>* WORK, int* const INFO) const
1363 {
1364 ZUNM2R_F77(CHAR_MACRO(SIDE), CHAR_MACRO(TRANS), &M, &N, &K, A, &LDA, TAU, C, &LDC, WORK, INFO);
1365 }
1366
1367 void LAPACK<int,std::complex<double> >::GETRF(const int& m, const int& n, std::complex<double>* A, const int& lda, int* IPIV, int* info) const
1368 {
1369 ZGETRF_F77(&m, &n, A, &lda, IPIV, info);
1370 }
1371
1372
1373 void LAPACK<int,std::complex<double> >::GETRS(const char& TRANS, const int& n, const int& nrhs, const std::complex<double>* A, const int& lda, const int* IPIV, std::complex<double>* B, const int& ldb, int* info) const
1374 {
1375 ZGETRS_F77(CHAR_MACRO(TRANS), &n, &nrhs, A, &lda, IPIV, B, &ldb, info);
1376 }
1377
1378
1379 void LAPACK<int,std::complex<double> >::LASCL(const char& TYPE, const int& kl, const int& ku, const double& cfrom, const double& cto, const int& m, const int& n, std::complex<double>* A, const int& lda, int* info) const
1380 { ZLASCL_F77(CHAR_MACRO(TYPE), &kl, &ku, &cfrom, &cto, &m, &n, A, &lda, info); }
1381
1382 void LAPACK<int,std::complex<double> >::GEQP3(const int& m, const int& n, std::complex<double>* A, const int& lda, int* jpvt, std::complex<double>* TAU, std::complex<double>* WORK, const int& lwork, double* RWORK, int* info ) const
1383 {
1384 ZGEQP3_F77(&m, &n, A, &lda, jpvt, TAU, WORK, &lwork, RWORK, info);
1385 }
1386
1387 void LAPACK<int, std::complex<double> >::LASWP (const int& N, std::complex<double>* A, const int& LDA, const int& K1, const int& K2, const int* IPIV, const int& INCX) const
1388 {
1389 ZLASWP_F77(&N, A, &LDA, &K1, &K2, IPIV, &INCX);
1390 }
1391
1392 void LAPACK<int,std::complex<double> >::GBTRF(const int& m, const int& n, const int& kl, const int& ku, std::complex<double>* A, const int& lda, int* IPIV, int* info) const
1393 {
1394 ZGBTRF_F77(&m, &n, &kl, &ku, A, &lda, IPIV, info);
1395 }
1396
1397
1398 void LAPACK<int,std::complex<double> >::GBTRS(const char& TRANS, const int& n, const int& kl, const int& ku, const int& nrhs, const std::complex<double>* A, const int& lda, const int* IPIV, std::complex<double>* B, const int& ldb, int* info) const
1399 {
1400 ZGBTRS_F77(CHAR_MACRO(TRANS), &n, &kl, &ku, &nrhs, A, &lda, IPIV, B, &ldb, info);
1401 }
1402
1403
1404 void LAPACK<int,std::complex<double> >::GTTRF(const int& n, std::complex<double>* dl, std::complex<double>* d, std::complex<double>* du, std::complex<double>* du2, int* IPIV, int* info) const
1405 {
1406 ZGTTRF_F77(&n, dl, d, du, du2, IPIV, info);
1407 }
1408
1409
1410 void LAPACK<int,std::complex<double> >::GTTRS(const char& TRANS, const int& n, const int& nrhs, const std::complex<double>* dl, const std::complex<double>* d, const std::complex<double>* du, const std::complex<double>* du2, const int* IPIV, std::complex<double>* B, const int& ldb, int* info) const
1411 {
1412 ZGTTRS_F77(CHAR_MACRO(TRANS), &n, &nrhs, dl, d, du, du2, IPIV, B, &ldb, info);
1413 }
1414
1415
1416 void LAPACK<int,std::complex<double> >::GETRI(const int& n, std::complex<double>* A, const int& lda, const int* IPIV, std::complex<double>* WORK, const int& lwork, int* info) const
1417 {
1418 ZGETRI_F77(&n, A, &lda, IPIV, WORK, &lwork, info);
1419 }
1420
1421 void LAPACK<int, std::complex<double> >::LATRS (const char& UPLO, const char& TRANS, const char& DIAG, const char& NORMIN, const int& N, const std::complex<double>* A, const int& LDA, std::complex<double>* X, double* SCALE, double* CNORM, int* INFO) const
1422 {
1423 ZLATRS_F77(CHAR_MACRO(UPLO), CHAR_MACRO(TRANS), CHAR_MACRO(DIAG), CHAR_MACRO(NORMIN), &N, A, &LDA, X, SCALE, CNORM, INFO);
1424 }
1425
1426 void LAPACK<int,std::complex<double> >::GECON(const char& NORM, const int& n, const std::complex<double>* A, const int& lda, const double& anorm, double* rcond, std::complex<double>* WORK, double* RWORK, int* info) const
1427 {
1428 ZGECON_F77(CHAR_MACRO(NORM), &n, A, &lda, &anorm, rcond, WORK, RWORK, info);
1429 }
1430
1431
1432 void LAPACK<int,std::complex<double> >::GBCON(const char& NORM, const int& n, const int& kl, const int& ku, const std::complex<double>* A, const int& lda, const int* IPIV, const double& anorm, double* rcond, std::complex<double>* WORK, double* RWORK, int* info) const
1433 {
1434 ZGBCON_F77(CHAR_MACRO(NORM), &n, &kl, &ku, A, &lda, IPIV, &anorm, rcond, WORK, RWORK, info);
1435 }
1436
1437
1438 double LAPACK<int,std::complex<double> >::LANGB(const char& NORM, const int& n, const int& kl, const int& ku, const std::complex<double>* A, const int& lda, double* WORK) const
1439 {
1440 return( ZLANGB_F77(CHAR_MACRO(NORM), &n, &kl, &ku, A, &lda, WORK) );
1441 }
1442
1443
1444 void LAPACK<int,std::complex<double> >::GESV(const int& n, const int& nrhs, std::complex<double>* A, const int& lda, int* IPIV, std::complex<double>* B, const int& ldb, int* info) const
1445 {
1446 ZGESV_F77(&n, &nrhs, A, &lda, IPIV, B, &ldb, info);
1447 }
1448
1449
1450 void LAPACK<int,std::complex<double> >::GEEQU(const int& m, const int& n, const std::complex<double>* A, const int& lda, double* R, double* C, double* rowcond, double* colcond, double* amax, int* info) const
1451 {
1452 ZGEEQU_F77(&m, &n, A, &lda, R, C, rowcond, colcond, amax, info);
1453 }
1454
1455
1456 void LAPACK<int,std::complex<double> >::GERFS(const char& TRANS, const int& n, const int& nrhs, const std::complex<double>* A, const int& lda, const std::complex<double>* AF, const int& ldaf, const int* IPIV, const std::complex<double>* B, const int& ldb, std::complex<double>* X, const int& ldx, double* FERR, double* BERR, std::complex<double>* WORK, double* RWORK, int* info) const
1457 {
1458 ZGERFS_F77(CHAR_MACRO(TRANS), &n, &nrhs, A, &lda, AF, &ldaf, IPIV, B, &ldb, X, &ldx, FERR, BERR, WORK, RWORK, info);
1459 }
1460
1461
1462 void LAPACK<int,std::complex<double> >::GBEQU(const int& m, const int& n, const int& kl, const int& ku, const std::complex<double>* A, const int& lda, double* R, double* C, double* rowcond, double* colcond, double* amax, int* info) const
1463 {
1464 ZGBEQU_F77(&m, &n, &kl, &ku, A, &lda, R, C, rowcond, colcond, amax, info);
1465 }
1466
1467
1468 void LAPACK<int,std::complex<double> >::GBRFS(const char& TRANS, const int& n, const int& kl, const int& ku, const int& nrhs, const std::complex<double>* A, const int& lda, const std::complex<double>* AF, const int& ldaf, const int* IPIV, const std::complex<double>* B, const int& ldb, std::complex<double>* X, const int& ldx, double* FERR, double* BERR, std::complex<double>* WORK, double* RWORK, int* info) const
1469 {
1470 ZGBRFS_F77(CHAR_MACRO(TRANS), &n, &kl, &ku, &nrhs, A, &lda, AF, &ldaf, IPIV, B, &ldb, X, &ldx, FERR, BERR, WORK, RWORK, info);
1471 }
1472
1473 void LAPACK<int,std::complex<double> >::GESVX(const char& FACT, const char& TRANS, const int& n, const int& nrhs, std::complex<double>* A, const int& lda, std::complex<double>* AF, const int& ldaf, int* IPIV, char* EQUED, double* R, double* C, std::complex<double>* B, const int& ldb, std::complex<double>* X, const int& ldx, double* rcond, double* FERR, double* BERR, std::complex<double>* WORK, double* RWORK, int* info) const
1474 {
1475 ZGESVX_F77(CHAR_MACRO(FACT), CHAR_MACRO(TRANS), &n, &nrhs, A, &lda, AF, &ldaf, IPIV, CHARPTR_MACRO(EQUED), R, C, B, &ldb, X, &ldx, rcond, FERR, BERR, WORK, RWORK, info);
1476 }
1477
1478
1479 void LAPACK<int,std::complex<double> >::GEHRD(const int& n, const int& ilo, const int& ihi, std::complex<double>* A, const int& lda, std::complex<double>* TAU, std::complex<double>* WORK, const int& lwork, int* info) const
1480 {
1481 ZGEHRD_F77(&n, &ilo, &ihi, A, &lda, TAU, WORK, &lwork, info);
1482 }
1483
1484
1485 void LAPACK<int,std::complex<double> >::TRTRS(const char& UPLO, const char& TRANS, const char& DIAG, const int& n, const int& nrhs, const std::complex<double>* A, const int& lda, std::complex<double>* B, const int& ldb, int* info) const
1486 {
1487 ZTRTRS_F77(CHAR_MACRO(UPLO), CHAR_MACRO(TRANS), CHAR_MACRO(DIAG), &n, &nrhs, A, &lda, B, &ldb, info);
1488 }
1489
1490
1491 void LAPACK<int,std::complex<double> >::TRTRI(const char& UPLO, const char& DIAG, const int& n, std::complex<double>* A, const int& lda, int* info) const
1492 {
1493 ZTRTRI_F77(CHAR_MACRO(UPLO), CHAR_MACRO(DIAG), &n, A, &lda, info);
1494 }
1495
1496
1497 void LAPACK<int,std::complex<double> >::STEQR(const char& COMPZ, const int& n, double* D, double* E, std::complex<double>* Z, const int& ldz, double* WORK, int* info) const
1498 {
1499 ZSTEQR_F77(CHAR_MACRO(COMPZ), &n, D, E, Z, &ldz, WORK, info);
1500 }
1501
1502
1503 void LAPACK<int,std::complex<double> >::PTEQR(const char& COMPZ, const int& n, double* D, double* E, std::complex<double>* Z, const int& ldz, double* WORK, int* info) const
1504 {
1505 ZPTEQR_F77(CHAR_MACRO(COMPZ), &n, D, E, Z, &ldz, WORK, info);
1506 }
1507
1508
1509 void LAPACK<int,std::complex<double> >::HEEV(const char& JOBZ, const char& UPLO, const int& n, std::complex<double> * A, const int& lda, double* W, std::complex<double> * WORK, const int& lwork, double* RWORK, int* info) const
1510 {
1511 ZHEEV_F77(CHAR_MACRO(JOBZ), CHAR_MACRO(UPLO), &n, A, &lda, W, WORK, &lwork, RWORK, info);
1512 }
1513
1514
1515 void LAPACK<int,std::complex<double> >::HEGV(const int& itype, const char& JOBZ, const char& UPLO, const int& n, std::complex<double> * A, const int& lda, std::complex<double> * B, const int& ldb, double* W, std::complex<double> * WORK, const int& lwork, double* RWORK, int* info) const
1516 {
1517 ZHEGV_F77(&itype, CHAR_MACRO(JOBZ), CHAR_MACRO(UPLO), &n, A, &lda, B, &ldb, W, WORK, &lwork, RWORK, info);
1518 }
1519
1520
1521 void LAPACK<int, std::complex<double> >::HSEQR(const char& JOB, const char& COMPZ, const int& n, const int& ilo, const int& ihi, std::complex<double>* H, const int& ldh, std::complex<double>* W, std::complex<double>* Z, const int& ldz, std::complex<double>* WORK, const int& lwork, int* info) const
1522 {
1523 ZHSEQR_F77(CHAR_MACRO(JOB), CHAR_MACRO(COMPZ), &n, &ilo, &ihi, H, &ldh, W, Z, &ldz, WORK, &lwork, info);
1524 }
1525
1526
1527 void LAPACK<int, std::complex<double> >::GEES(const char& JOBVS, const char& SORT, int (*ptr2func)(std::complex<double>*), const int& n, std::complex<double>* A, const int& lda, int* sdim, std::complex<double>* W, std::complex<double>* VS, const int& ldvs, std::complex<double>* WORK, const int& lwork, double* RWORK, int* BWORK, int* info) const
1528 {
1529 ZGEES_F77(CHAR_MACRO(JOBVS), CHAR_MACRO(SORT), ptr2func, &n, A, &lda, sdim, W, VS, &ldvs, WORK, &lwork, RWORK, BWORK, info);
1530 }
1531
1532
1533 void LAPACK<int, std::complex<double> >::GEES(const char& JOBVS, const int& n, std::complex<double>* A, const int& lda, int* sdim, double* WR, double* WI, std::complex<double>* VS, const int& ldvs, std::complex<double>* WORK, const int& lwork, double* RWORK, int* BWORK, int* info) const
1534 {
1535 int (*nullfptr)(std::complex<double>*) = NULL;
1536 std::vector< std::complex<double> > W(n);
1537 const char sort = 'N';
1538 ZGEES_F77(CHAR_MACRO(JOBVS), CHAR_MACRO(sort), nullfptr, &n, A, &lda, sdim, &W[0], VS, &ldvs, WORK, &lwork, RWORK, BWORK, info);
1539 for (int i=0; i<n; i++) {
1540 WR[i] = W[i].real();
1541 WI[i] = W[i].imag();
1542 }
1543 }
1544
1545
1546 void LAPACK<int, std::complex<double> >::GEEV(const char& JOBVL, const char& JOBVR, const int& n, std::complex<double>* A, const int& lda, std::complex<double>* W, std::complex<double>* VL, const int& ldvl, std::complex<double>* VR, const int& ldvr, std::complex<double>* WORK, const int& lwork, double* RWORK, int* info) const
1547 {
1548 ZGEEV_F77(CHAR_MACRO(JOBVL), CHAR_MACRO(JOBVR), &n, A, &lda, W, VL, &ldvl, VR, &ldvr, WORK, &lwork, RWORK, info);
1549 }
1550
1551
1552 void LAPACK<int, std::complex<double> >::GEEV(const char& JOBVL, const char& JOBVR, const int& n, std::complex<double>* A, const int& lda, double* WR, double* WI, std::complex<double>* VL, const int& ldvl, std::complex<double>* VR, const int& ldvr, std::complex<double>* WORK, const int& lwork, double* RWORK, int* info) const
1553 {
1554 std::vector<std::complex<double> > w (n);
1555 std::complex<double>* w_rawPtr = (n == 0) ? NULL : &w[0];
1556 GEEV (JOBVL, JOBVR, n, A, lda, w_rawPtr, VL, ldvl, VR, ldvr, WORK, lwork, RWORK, info);
1557 if (*info == 0) {
1558 // The eigenvalues are only valid on output if INFO is zero.
1559 // Otherwise, we shouldn't even write to WR or WI.
1560 for (int k = 0; k < n; ++k) {
1561 WR[k] = w[k].real ();
1562 WI[k] = w[k].imag ();
1563 }
1564 }
1565 }
1566
1567
1568 void LAPACK<int, std::complex<double> >::GESVD(const char& JOBU, const char& JOBVT, const int& m, const int& n, std::complex<double> * A, const int& lda, double* S, std::complex<double> * U, const int& ldu, std::complex<double> * V, const int& ldv, std::complex<double> * WORK, const int& lwork, double* RWORK, int* info) const {
1569 ZGESVD_F77(CHAR_MACRO(JOBU), CHAR_MACRO(JOBVT), &m, &n, A, &lda, S, U, &ldu, V, &ldv, WORK, &lwork, RWORK, info);
1570 }
1571
1572 void LAPACK<int, std::complex<double> >::GEEVX(const char& BALANC, const char& JOBVL, const char& JOBVR, const char& SENSE, const int& n, std::complex<double>* A, const int& lda, std::complex<double>* W, std::complex<double>* VL, const int& ldvl, std::complex<double>* VR, const int& ldvr, int* ilo, int* ihi, double* SCALE, double* abnrm, double* RCONDE, double* RCONDV, std::complex<double>* WORK, const int& lwork, double* RWORK, int* info) const
1573 {
1574 ZGEEVX_F77(CHAR_MACRO(BALANC), CHAR_MACRO(JOBVL), CHAR_MACRO(JOBVR), CHAR_MACRO(SENSE), &n, A, &lda, W, VL, &ldvl, VR, &ldvr, ilo, ihi, SCALE, abnrm, RCONDE, RCONDV, WORK, &lwork, RWORK, info);
1575 }
1576
1577 void LAPACK<int, std::complex<double> >::GGEVX(const char& BALANC, const char& JOBVL, const char& JOBVR, const char& SENSE, const int& n, std::complex<double>* A, const int& lda, std::complex<double>* B, const int& ldb, std::complex<double>* ALPHA, std::complex<double>* BETA, std::complex<double>* VL, const int& ldvl, std::complex<double>* VR, const int& ldvr, int* ilo, int* ihi, double* lscale, double* rscale, double* abnrm, double* bbnrm, double* RCONDE, double* RCONDV, std::complex<double>* WORK, const int& lwork, double* RWORK, int* IWORK, int* BWORK, int* info) const
1578 {
1579 ZGGEVX_F77(CHAR_MACRO(BALANC), CHAR_MACRO(JOBVL), CHAR_MACRO(JOBVR), CHAR_MACRO(SENSE), &n, A, &lda, B, &ldb, ALPHA, BETA, VL, &ldvl, VR, &ldvr, ilo, ihi, lscale, rscale, abnrm, bbnrm, RCONDE, RCONDV, WORK, &lwork, RWORK, IWORK, BWORK, info);
1580 }
1581
1582 void LAPACK<int, std::complex<double> >::GGEVX(const char& BALANC, const char& JOBVL, const char& JOBVR, const char& SENSE, const int& n, std::complex<double>* A, const int& lda, std::complex<double>* B, const int& ldb, double* ALPHAR, double* ALPHAI, std::complex<double>* BETA, std::complex<double>* VL, const int& ldvl, std::complex<double>* VR, const int& ldvr, int* ilo, int* ihi, double* lscale, double* rscale, double* abnrm, double* bbnrm, double* RCONDE, double* RCONDV, std::complex<double>* WORK, const int& lwork, double* RWORK, int* IWORK, int* BWORK, int* info) const
1583 {
1584 std::vector<std::complex<double> > w (n);
1585 std::complex<double>* w_rawPtr = (n == 0) ? NULL : &w[0];
1586 GGEVX(BALANC, JOBVL, JOBVR, SENSE, n, A, lda, B, ldb, w_rawPtr, BETA, VL, ldvl, VR, ldvr, ilo, ihi, lscale, rscale, abnrm, bbnrm, RCONDE, RCONDV, WORK, lwork, RWORK, IWORK, BWORK, info);
1587 if (*info == 0) {
1588 // The eigenvalues are only valid on output if INFO is zero.
1589 // Otherwise, we shouldn't even write to WR or WI.
1590 for (int k = 0; k < n; ++k) {
1591 ALPHAR[k] = w[k].real ();
1592 ALPHAI[k] = w[k].imag ();
1593 }
1594 }
1595 }
1596
1597 void LAPACK<int, std::complex<double> >::GGEV(const char& JOBVL, const char& JOBVR, const int& n, std::complex<double> *A, const int& lda, std::complex<double> *B, const int& ldb, std::complex<double>* ALPHA, std::complex<double>* BETA, std::complex<double>* VL, const int& ldvl, std::complex<double>* VR, const int& ldvr, std::complex<double> *WORK, const int& lwork, double* RWORK, int* info) const
1598 {
1599 ZGGEV_F77(CHAR_MACRO(JOBVL), CHAR_MACRO(JOBVR), &n, A, &lda, B, &ldb, ALPHA, BETA, VL, &ldvl, VR, &ldvr, WORK, &lwork, RWORK, info);
1600 }
1601
1602 void LAPACK<int, std::complex<double> >::GGES(const char& JOBVL, const char& JOBVR, const char& SORT, int (*ptr2func)(std::complex<double>*, std::complex<double>*), const int& n, std::complex<double>* A, const int& lda, std::complex<double>* B, const int& ldb, int* sdim, std::complex<double>* ALPHA, std::complex<double>* BETA, std::complex<double>* VL, const int& ldvl, std::complex<double>* VR, const int& ldvr, std::complex<double>* WORK, const int& lwork, double* rwork, int* bwork, int* info ) const
1603 {
1604 ZGGES_F77(CHAR_MACRO(JOBVL), CHAR_MACRO(JOBVR), CHAR_MACRO(SORT), ptr2func, &n, A, &lda, B, &ldb, sdim, ALPHA, BETA, VL, &ldvl, VR, &ldvr, WORK, &lwork, rwork, bwork, info);
1605 }
1606 void LAPACK<int, std::complex<double> >::TGSEN(const int& ijob, const int& wantq, const int& wantz, const int* SELECT, const int& n, std::complex<double>* A, const int& lda, std::complex<double>* B, const int& ldb, std::complex<double>* ALPHA, std::complex<double>* BETA, std::complex<double>* Q, const int& ldq, std::complex<double>* Z, const int& ldz, int* M, double* PL, double* PR, double* DIF, std::complex<double>* WORK, const int& lwork, int* IWORK, const int& liwork, int* info ) const
1607 {
1608 ZTGSEN_F77(&ijob, &wantq, &wantz, SELECT, &n, A, &lda, B, &ldb, ALPHA, BETA, Q, &ldq, Z, &ldz, M, PL, PR, DIF, WORK, &lwork, IWORK, &liwork, info);
1609 }
1610
1611 void LAPACK<int, std::complex<double> >::TREVC(const char& SIDE, const char& HOWMNY, int* select, const int& n, const std::complex<double>* T, const int& ldt, std::complex<double>* VL, const int& ldvl, std::complex<double>* VR, const int& ldvr, const int& mm, int* m, std::complex<double>* WORK, double* RWORK, int* info) const
1612 {
1613 ZTREVC_F77(CHAR_MACRO(SIDE), CHAR_MACRO(HOWMNY), select, &n, T, &ldt, VL, &ldvl, VR, &ldvr, &mm, m, WORK, RWORK, info);
1614 }
1615
1616
1617 void LAPACK<int, std::complex<double> >::TREVC(const char& SIDE, const int& n, const std::complex<double>* T, const int& ldt, std::complex<double>* VL, const int& ldvl, std::complex<double>* VR, const int& ldvr, const int& mm, int* m, std::complex<double>* WORK, double* RWORK, int* info) const
1618 {
1619 std::vector<int> select(1);
1620 const char& whch = 'A';
1621 ZTREVC_F77(CHAR_MACRO(SIDE), CHAR_MACRO(whch), &select[0], &n, T, &ldt, VL, &ldvl, VR, &ldvr, &mm, m, WORK, RWORK, info);
1622 }
1623
1624 void LAPACK<int, std::complex<double> >::TREXC(const char& COMPQ, const int& n, std::complex<double>* T, const int& ldt, std::complex<double>* Q, const int& ldq, int* ifst, int* ilst, std::complex<double>* WORK, int* info) const
1625 {
1626 ZTREXC_F77(CHAR_MACRO(COMPQ), &n, T, &ldt, Q, &ldq, ifst, ilst, info);
1627 }
1628
1629 void LAPACK<int, std::complex<double> >::LARTG( const std::complex<double> f, const std::complex<double> g, double* c, std::complex<double>* s, std::complex<double>* r ) const
1630 {
1631 ZLARTG_F77(&f, &g, c, s, r);
1632 }
1633
1634
1635 void LAPACK<int, std::complex<double> >::LARFG( const int& n, std::complex<double>* alpha, std::complex<double>* x, const int& incx, std::complex<double>* tau ) const
1636 {
1637 ZLARFG_F77(&n, alpha, x, &incx, tau);
1638 }
1639
1640 void LAPACK<int, std::complex<double> >::GEBAL(const char& JOBZ, const int& n, std::complex<double>* A, const int& lda, int* ilo, int* ihi, double* scale, int* info) const
1641 {
1642 ZGEBAL_F77(CHAR_MACRO(JOBZ),&n, A, &lda, ilo, ihi, scale, info);
1643 }
1644
1645
1646 void LAPACK<int, std::complex<double> >::GEBAK(const char& JOBZ, const char& SIDE, const int& n, const int& ilo, const int& ihi, const double* scale, const int& m, std::complex<double>* V, const int& ldv, int* info) const
1647 {
1648 ZGEBAK_F77(CHAR_MACRO(JOBZ), CHAR_MACRO(SIDE), &n, &ilo, &ihi, scale, &m, V, &ldv, info);
1649 }
1650
1651
1652#ifdef HAVE_TEUCHOS_LAPACKLARND
1653 std::complex<double> LAPACK<int, std::complex<double> >::LARND( const int& idist, int* seed ) const
1654 {
1655 double _Complex z = ZLARND_F77(&idist, seed);
1656 return TEUCHOS_LAPACK_CONVERT_COMPLEX_FORTRAN_TO_CXX(double, z);
1657 }
1658#endif
1659
1660 void LAPACK<int, std::complex<double> >::LARNV( const int& idist, int* seed, const int& n, std::complex<double>* v ) const
1661 {
1662 ZLARNV_F77(&idist, seed, &n, v);
1663 }
1664
1665
1666 int LAPACK<int, std::complex<double> >::ILAENV( const int& ispec, const std::string& NAME, const std::string& OPTS, const int& N1, const int& N2, const int& N3, const int& N4 ) const
1667 {
1668 unsigned int opts_length = OPTS.length();
1669 std::string temp_NAME = "z" + NAME;
1670 unsigned int name_length = temp_NAME.length();
1671 return ilaenv_wrapper(&ispec, &temp_NAME[0], name_length, &OPTS[0], opts_length, &N1, &N2, &N3, &N4);
1672 }
1673
1674 // END INT, COMPLEX<DOUBLE> SPECIALIZATION IMPLEMENTATION //
1675
1676 // BEGIN INT, KOKKOS::COMPLEX<DOUBLE> SPECIALIZATION IMPLEMENTATION //
1677
1678 void LAPACK<int, Kokkos::complex<double> >::PTTRF(const int& n, double* d, Kokkos::complex<double>* e, int* info) const
1679 {
1680 ZPTTRF_F77(&n, d, reinterpret_cast<std::complex<double>*>(e), info);
1681 }
1682
1683
1684 void LAPACK<int, Kokkos::complex<double> >::PTTRS(const char& UPLO, const int& n, const int& nrhs, const double* d, const Kokkos::complex<double>* e, Kokkos::complex<double>* B, const int& ldb, int* info) const
1685 {
1686 ZPTTRS_F77(CHAR_MACRO(UPLO), &n, &nrhs, d, reinterpret_cast<const std::complex<double>*>(e), reinterpret_cast<std::complex<double>*>(B), &ldb, info);
1687 }
1688
1689
1690 void LAPACK<int, Kokkos::complex<double> >::POTRF(const char& UPLO, const int& n, Kokkos::complex<double>* A, const int& lda, int* info) const
1691 {
1692 ZPOTRF_F77(CHAR_MACRO(UPLO), &n, reinterpret_cast<std::complex<double>*>(A), &lda, info);
1693 }
1694
1695
1696 void LAPACK<int, Kokkos::complex<double> >::POTRS(const char& UPLO, const int& n, const int& nrhs, const Kokkos::complex<double>* A, const int& lda, Kokkos::complex<double>* B, const int& ldb, int* info) const
1697 {
1698 ZPOTRS_F77(CHAR_MACRO(UPLO), &n, &nrhs, reinterpret_cast<const std::complex<double>*>(A), &lda, reinterpret_cast<std::complex<double>*>(B), &ldb, info);
1699 }
1700
1701
1702 void LAPACK<int, Kokkos::complex<double> >::POTRI(const char& UPLO, const int& n, Kokkos::complex<double>* A, const int& lda, int* info) const
1703 {
1704 ZPOTRI_F77(CHAR_MACRO(UPLO), &n, reinterpret_cast<std::complex<double>*>(A), &lda, info);
1705 }
1706
1707
1708 void LAPACK<int, Kokkos::complex<double> >::POCON(const char& UPLO, const int& n, const Kokkos::complex<double>* A, const int& lda, const double& anorm, double* rcond, Kokkos::complex<double>* WORK, double* RWORK, int* info) const
1709 {
1710 ZPOCON_F77(CHAR_MACRO(UPLO), &n, reinterpret_cast<const std::complex<double>*>(A), &lda, &anorm, rcond, reinterpret_cast<std::complex<double>*>(WORK), RWORK, info);
1711 }
1712
1713
1714 void LAPACK<int, Kokkos::complex<double> >::POSV(const char& UPLO, const int& n, const int& nrhs, Kokkos::complex<double>* A, const int& lda, Kokkos::complex<double>* B, const int& ldb, int* info) const
1715 {
1716 ZPOSV_F77(CHAR_MACRO(UPLO), &n, &nrhs, reinterpret_cast<std::complex<double>*>(A), &lda, reinterpret_cast<std::complex<double>*>(B), &ldb, info);
1717 }
1718
1719
1720 void LAPACK<int, Kokkos::complex<double> >::POEQU(const int& n, const Kokkos::complex<double>* A, const int& lda, double* S, double* scond, double* amax, int* info) const
1721 {
1722 ZPOEQU_F77(&n, reinterpret_cast<const std::complex<double>*>(A), &lda, S, scond, amax, info);
1723 }
1724
1725
1726 void LAPACK<int, Kokkos::complex<double> >::PORFS(const char& UPLO, const int& n, const int& nrhs, const Kokkos::complex<double>* A, const int& lda, const Kokkos::complex<double>* AF, const int& ldaf, const Kokkos::complex<double>* B, const int& ldb, Kokkos::complex<double>* X, const int& ldx, double* FERR, double* BERR, Kokkos::complex<double>* WORK, double* RWORK, int* info) const
1727 {
1728 ZPORFS_F77(CHAR_MACRO(UPLO), &n, &nrhs, reinterpret_cast<const std::complex<double>*>(A), &lda, reinterpret_cast<const std::complex<double>*>(AF), &ldaf, reinterpret_cast<const std::complex<double>*>(B), &ldb, reinterpret_cast<std::complex<double>*>(X), &ldx, FERR, BERR, reinterpret_cast<std::complex<double>*>(WORK), RWORK, info);
1729 }
1730
1731 void LAPACK<int, Kokkos::complex<double> >::POSVX(const char& FACT, const char& UPLO, const int& n, const int& nrhs, Kokkos::complex<double>* A, const int& lda, Kokkos::complex<double>* AF, const int& ldaf, char* EQUED, double* S, Kokkos::complex<double>* B, const int& ldb, Kokkos::complex<double>* X, const int& ldx, double* rcond, double* FERR, double* BERR, Kokkos::complex<double>* WORK, double* RWORK, int* info) const
1732 {
1733 ZPOSVX_F77(CHAR_MACRO(FACT), CHAR_MACRO(UPLO), &n, &nrhs, reinterpret_cast<std::complex<double>*>(A), &lda, reinterpret_cast<std::complex<double>*>(AF), &ldaf, CHARPTR_MACRO(EQUED), S, reinterpret_cast<std::complex<double>*>(B), &ldb, reinterpret_cast<std::complex<double>*>(X), &ldx, rcond, FERR, BERR, reinterpret_cast<std::complex<double>*>(WORK), RWORK, info);
1734 }
1735
1736
1737 void LAPACK<int,Kokkos::complex<double> >::GELS(const char& TRANS, const int& m, const int& n, const int& nrhs, Kokkos::complex<double>* A, const int& lda, Kokkos::complex<double>* B, const int& ldb, Kokkos::complex<double>* WORK, const int& lwork, int* info) const
1738 {
1739 ZGELS_F77(CHAR_MACRO(TRANS), &m, &n, &nrhs, reinterpret_cast<std::complex<double>*>(A), &lda, reinterpret_cast<std::complex<double>*>(B), &ldb, reinterpret_cast<std::complex<double>*>(WORK), &lwork, info);
1740 }
1741
1742
1743 void LAPACK<int, Kokkos::complex<double> >::GELSS(const int& m, const int& n, const int& nrhs, Kokkos::complex<double>* A, const int& lda, Kokkos::complex<double>* B, const int& ldb, double* S, const double& rcond, int* rank, Kokkos::complex<double>* WORK, const int& lwork, double* rwork, int* info) const
1744 {
1745 ZGELSS_F77(&m, &n, &nrhs, reinterpret_cast<std::complex<double>*>(A), &lda, reinterpret_cast<std::complex<double>*>(B), &ldb, S, &rcond, rank, reinterpret_cast<std::complex<double>*>(WORK), &lwork, rwork, info);
1746 }
1747
1748
1749 void LAPACK<int,Kokkos::complex<double> >::GEQRF( const int& m, const int& n, Kokkos::complex<double>* A, const int& lda, Kokkos::complex<double>* TAU, Kokkos::complex<double>* WORK, const int& lwork, int* info) const
1750 {
1751 ZGEQRF_F77(&m, &n, reinterpret_cast<std::complex<double>*>(A), &lda, reinterpret_cast<std::complex<double>*>(TAU), reinterpret_cast<std::complex<double>*>(WORK), &lwork, info);
1752 }
1753
1754 void LAPACK<int,Kokkos::complex<double> >::GEQR2 (const int& m, const int& n, Kokkos::complex<double>* A, const int& lda, Kokkos::complex<double>* TAU, Kokkos::complex<double>* WORK, int* const info) const
1755 {
1756 ZGEQR2_F77(&m, &n, reinterpret_cast<std::complex<double>*>(A), &lda, reinterpret_cast<std::complex<double>*>(TAU), reinterpret_cast<std::complex<double>*>(WORK), info);
1757 }
1758
1759 void LAPACK<int,Kokkos::complex<double> >::UNGQR(const int& m, const int& n, const int& k, Kokkos::complex<double>* A, const int& lda, const Kokkos::complex<double>* TAU, Kokkos::complex<double>* WORK, const int& lwork, int* info) const
1760 {
1761 ZUNGQR_F77( &m, &n, &k, reinterpret_cast<std::complex<double>*>(A), &lda, reinterpret_cast<const std::complex<double>*>(TAU), reinterpret_cast<std::complex<double>*>(WORK), &lwork, info);
1762 }
1763
1764
1765 void LAPACK<int,Kokkos::complex<double> >::UNMQR(const char& SIDE, const char& TRANS, const int& m, const int& n, const int& k, const Kokkos::complex<double>* A, const int& lda, const Kokkos::complex<double>* TAU, Kokkos::complex<double>* C, const int& ldc, Kokkos::complex<double>* WORK, const int& lwork, int* info) const
1766 {
1767 ZUNMQR_F77(CHAR_MACRO(SIDE), CHAR_MACRO(TRANS), &m, &n, &k, reinterpret_cast<const std::complex<double>*>(A), &lda, reinterpret_cast<const std::complex<double>*>(TAU), reinterpret_cast<std::complex<double>*>(C), &ldc, reinterpret_cast<std::complex<double>*>(WORK), &lwork, info);
1768 }
1769
1770 void LAPACK<int,Kokkos::complex<double> >::UNM2R (const char& SIDE, const char& TRANS, const int& M, const int& N, const int& K, const Kokkos::complex<double>* A, const int& LDA, const Kokkos::complex<double>* TAU, Kokkos::complex<double>* C, const int& LDC, Kokkos::complex<double>* WORK, int* const INFO) const
1771 {
1772 ZUNM2R_F77(CHAR_MACRO(SIDE), CHAR_MACRO(TRANS), &M, &N, &K, reinterpret_cast<const std::complex<double>*>(A), &LDA, reinterpret_cast<const std::complex<double>*>(TAU), reinterpret_cast<std::complex<double>*>(C), &LDC, reinterpret_cast<std::complex<double>*>(WORK), INFO);
1773 }
1774
1775 void LAPACK<int,Kokkos::complex<double> >::GETRF(const int& m, const int& n, Kokkos::complex<double>* A, const int& lda, int* IPIV, int* info) const
1776 {
1777 ZGETRF_F77(&m, &n, reinterpret_cast<std::complex<double>*>(A), &lda, IPIV, info);
1778 }
1779
1780
1781 void LAPACK<int,Kokkos::complex<double> >::GETRS(const char& TRANS, const int& n, const int& nrhs, const Kokkos::complex<double>* A, const int& lda, const int* IPIV, Kokkos::complex<double>* B, const int& ldb, int* info) const
1782 {
1783 ZGETRS_F77(CHAR_MACRO(TRANS), &n, &nrhs, reinterpret_cast<const std::complex<double>*>(A), &lda, IPIV, reinterpret_cast<std::complex<double>*>(B), &ldb, info);
1784 }
1785
1786
1787 void LAPACK<int,Kokkos::complex<double> >::LASCL(const char& TYPE, const int& kl, const int& ku, const double& cfrom, const double& cto, const int& m, const int& n, Kokkos::complex<double>* A, const int& lda, int* info) const
1788 { ZLASCL_F77(CHAR_MACRO(TYPE), &kl, &ku, &cfrom, &cto, &m, &n, reinterpret_cast<std::complex<double>*>(A), &lda, info); }
1789
1790 void LAPACK<int,Kokkos::complex<double> >::GEQP3(const int& m, const int& n, Kokkos::complex<double>* A, const int& lda, int* jpvt, Kokkos::complex<double>* TAU, Kokkos::complex<double>* WORK, const int& lwork, double* RWORK, int* info ) const
1791 {
1792 ZGEQP3_F77(&m, &n, reinterpret_cast<std::complex<double>*>(A), &lda, jpvt, reinterpret_cast<std::complex<double>*>(TAU), reinterpret_cast<std::complex<double>*>(WORK), &lwork, RWORK, info);
1793 }
1794
1795 void LAPACK<int, Kokkos::complex<double> >::LASWP (const int& N, Kokkos::complex<double>* A, const int& LDA, const int& K1, const int& K2, const int* IPIV, const int& INCX) const
1796 {
1797 ZLASWP_F77(&N, reinterpret_cast<std::complex<double>*>(A), &LDA, &K1, &K2, IPIV, &INCX);
1798 }
1799
1800 void LAPACK<int,Kokkos::complex<double> >::GBTRF(const int& m, const int& n, const int& kl, const int& ku, Kokkos::complex<double>* A, const int& lda, int* IPIV, int* info) const
1801 {
1802 ZGBTRF_F77(&m, &n, &kl, &ku, reinterpret_cast<std::complex<double>*>(A), &lda, IPIV, info);
1803 }
1804
1805
1806 void LAPACK<int,Kokkos::complex<double> >::GBTRS(const char& TRANS, const int& n, const int& kl, const int& ku, const int& nrhs, const Kokkos::complex<double>* A, const int& lda, const int* IPIV, Kokkos::complex<double>* B, const int& ldb, int* info) const
1807 {
1808 ZGBTRS_F77(CHAR_MACRO(TRANS), &n, &kl, &ku, &nrhs, reinterpret_cast<const std::complex<double>*>(A), &lda, IPIV, reinterpret_cast<std::complex<double>*>(B), &ldb, info);
1809 }
1810
1811
1812 void LAPACK<int,Kokkos::complex<double> >::GTTRF(const int& n, Kokkos::complex<double>* dl, Kokkos::complex<double>* d, Kokkos::complex<double>* du, Kokkos::complex<double>* du2, int* IPIV, int* info) const
1813 {
1814 ZGTTRF_F77(&n, reinterpret_cast<std::complex<double>*>(dl), reinterpret_cast<std::complex<double>*>(d), reinterpret_cast<std::complex<double>*>(du), reinterpret_cast<std::complex<double>*>(du2), IPIV, info);
1815 }
1816
1817
1818 void LAPACK<int,Kokkos::complex<double> >::GTTRS(const char& TRANS, const int& n, const int& nrhs, const Kokkos::complex<double>* dl, const Kokkos::complex<double>* d, const Kokkos::complex<double>* du, const Kokkos::complex<double>* du2, const int* IPIV, Kokkos::complex<double>* B, const int& ldb, int* info) const
1819 {
1820 ZGTTRS_F77(CHAR_MACRO(TRANS), &n, &nrhs, reinterpret_cast<const std::complex<double>*>(dl), reinterpret_cast<const std::complex<double>*>(d), reinterpret_cast<const std::complex<double>*>(du), reinterpret_cast<const std::complex<double>*>(du2), IPIV, reinterpret_cast<std::complex<double>*>(B), &ldb, info);
1821 }
1822
1823
1824 void LAPACK<int,Kokkos::complex<double> >::GETRI(const int& n, Kokkos::complex<double>* A, const int& lda, const int* IPIV, Kokkos::complex<double>* WORK, const int& lwork, int* info) const
1825 {
1826 ZGETRI_F77(&n, reinterpret_cast<std::complex<double>*>(A), &lda, IPIV, reinterpret_cast<std::complex<double>*>(WORK), &lwork, info);
1827 }
1828
1829 void LAPACK<int, Kokkos::complex<double> >::LATRS (const char& UPLO, const char& TRANS, const char& DIAG, const char& NORMIN, const int& N, const Kokkos::complex<double>* A, const int& LDA, Kokkos::complex<double>* X, double* SCALE, double* CNORM, int* INFO) const
1830 {
1831 ZLATRS_F77(CHAR_MACRO(UPLO), CHAR_MACRO(TRANS), CHAR_MACRO(DIAG), CHAR_MACRO(NORMIN), &N, reinterpret_cast<const std::complex<double>*>(A), &LDA, reinterpret_cast<std::complex<double>*>(X), SCALE, CNORM, INFO);
1832 }
1833
1834 void LAPACK<int,Kokkos::complex<double> >::GECON(const char& NORM, const int& n, const Kokkos::complex<double>* A, const int& lda, const double& anorm, double* rcond, Kokkos::complex<double>* WORK, double* RWORK, int* info) const
1835 {
1836 ZGECON_F77(CHAR_MACRO(NORM), &n, reinterpret_cast<const std::complex<double>*>(A), &lda, &anorm, rcond, reinterpret_cast<std::complex<double>*>(WORK), RWORK, info);
1837 }
1838
1839
1840 void LAPACK<int,Kokkos::complex<double> >::GBCON(const char& NORM, const int& n, const int& kl, const int& ku, const Kokkos::complex<double>* A, const int& lda, const int* IPIV, const double& anorm, double* rcond, Kokkos::complex<double>* WORK, double* RWORK, int* info) const
1841 {
1842 ZGBCON_F77(CHAR_MACRO(NORM), &n, &kl, &ku, reinterpret_cast<const std::complex<double>*>(A), &lda, IPIV, &anorm, rcond, reinterpret_cast<std::complex<double>*>(WORK), RWORK, info);
1843 }
1844
1845
1846 double LAPACK<int,Kokkos::complex<double> >::LANGB(const char& NORM, const int& n, const int& kl, const int& ku, const Kokkos::complex<double>* A, const int& lda, double* WORK) const
1847 {
1848 return( ZLANGB_F77(CHAR_MACRO(NORM), &n, &kl, &ku, reinterpret_cast<const std::complex<double>*>(A), &lda, WORK) );
1849 }
1850
1851
1852 void LAPACK<int,Kokkos::complex<double> >::GESV(const int& n, const int& nrhs, Kokkos::complex<double>* A, const int& lda, int* IPIV, Kokkos::complex<double>* B, const int& ldb, int* info) const
1853 {
1854 ZGESV_F77(&n, &nrhs, reinterpret_cast<std::complex<double>*>(A), &lda, IPIV, reinterpret_cast<std::complex<double>*>(B), &ldb, info);
1855 }
1856
1857
1858 void LAPACK<int,Kokkos::complex<double> >::GEEQU(const int& m, const int& n, const Kokkos::complex<double>* A, const int& lda, double* R, double* C, double* rowcond, double* colcond, double* amax, int* info) const
1859 {
1860 ZGEEQU_F77(&m, &n, reinterpret_cast<const std::complex<double>*>(A), &lda, R, C, rowcond, colcond, amax, info);
1861 }
1862
1863
1864 void LAPACK<int,Kokkos::complex<double> >::GERFS(const char& TRANS, const int& n, const int& nrhs, const Kokkos::complex<double>* A, const int& lda, const Kokkos::complex<double>* AF, const int& ldaf, const int* IPIV, const Kokkos::complex<double>* B, const int& ldb, Kokkos::complex<double>* X, const int& ldx, double* FERR, double* BERR, Kokkos::complex<double>* WORK, double* RWORK, int* info) const
1865 {
1866 ZGERFS_F77(CHAR_MACRO(TRANS), &n, &nrhs, reinterpret_cast<const std::complex<double>*>(A), &lda, reinterpret_cast<const std::complex<double>*>(AF), &ldaf, IPIV, reinterpret_cast<const std::complex<double>*>(B), &ldb, reinterpret_cast<std::complex<double>*>(X), &ldx, FERR, BERR, reinterpret_cast<std::complex<double>*>(WORK), RWORK, info);
1867 }
1868
1869
1870 void LAPACK<int,Kokkos::complex<double> >::GBEQU(const int& m, const int& n, const int& kl, const int& ku, const Kokkos::complex<double>* A, const int& lda, double* R, double* C, double* rowcond, double* colcond, double* amax, int* info) const
1871 {
1872 ZGBEQU_F77(&m, &n, &kl, &ku, reinterpret_cast<const std::complex<double>*>(A), &lda, R, C, rowcond, colcond, amax, info);
1873 }
1874
1875
1876 void LAPACK<int,Kokkos::complex<double> >::GBRFS(const char& TRANS, const int& n, const int& kl, const int& ku, const int& nrhs, const Kokkos::complex<double>* A, const int& lda, const Kokkos::complex<double>* AF, const int& ldaf, const int* IPIV, const Kokkos::complex<double>* B, const int& ldb, Kokkos::complex<double>* X, const int& ldx, double* FERR, double* BERR, Kokkos::complex<double>* WORK, double* RWORK, int* info) const
1877 {
1878 ZGBRFS_F77(CHAR_MACRO(TRANS), &n, &kl, &ku, &nrhs, reinterpret_cast<const std::complex<double>*>(A), &lda, reinterpret_cast<const std::complex<double>*>(AF), &ldaf, IPIV, reinterpret_cast<const std::complex<double>*>(B), &ldb, reinterpret_cast<std::complex<double>*>(X), &ldx, FERR, BERR, reinterpret_cast<std::complex<double>*>(WORK), RWORK, info);
1879 }
1880
1881 void LAPACK<int,Kokkos::complex<double> >::GESVX(const char& FACT, const char& TRANS, const int& n, const int& nrhs, Kokkos::complex<double>* A, const int& lda, Kokkos::complex<double>* AF, const int& ldaf, int* IPIV, char* EQUED, double* R, double* C, Kokkos::complex<double>* B, const int& ldb, Kokkos::complex<double>* X, const int& ldx, double* rcond, double* FERR, double* BERR, Kokkos::complex<double>* WORK, double* RWORK, int* info) const
1882 {
1883 ZGESVX_F77(CHAR_MACRO(FACT), CHAR_MACRO(TRANS), &n, &nrhs, reinterpret_cast<std::complex<double>*>(A), &lda, reinterpret_cast<std::complex<double>*>(AF), &ldaf, IPIV, CHARPTR_MACRO(EQUED), R, C, reinterpret_cast<std::complex<double>*>(B), &ldb, reinterpret_cast<std::complex<double>*>(X), &ldx, rcond, FERR, BERR, reinterpret_cast<std::complex<double>*>(WORK), RWORK, info);
1884 }
1885
1886
1887 void LAPACK<int,Kokkos::complex<double> >::GEHRD(const int& n, const int& ilo, const int& ihi, Kokkos::complex<double>* A, const int& lda, Kokkos::complex<double>* TAU, Kokkos::complex<double>* WORK, const int& lwork, int* info) const
1888 {
1889 ZGEHRD_F77(&n, &ilo, &ihi, reinterpret_cast<std::complex<double>*>(A), &lda, reinterpret_cast<std::complex<double>*>(TAU), reinterpret_cast<std::complex<double>*>(WORK), &lwork, info);
1890 }
1891
1892
1893 void LAPACK<int,Kokkos::complex<double> >::TRTRS(const char& UPLO, const char& TRANS, const char& DIAG, const int& n, const int& nrhs, const Kokkos::complex<double>* A, const int& lda, Kokkos::complex<double>* B, const int& ldb, int* info) const
1894 {
1895 ZTRTRS_F77(CHAR_MACRO(UPLO), CHAR_MACRO(TRANS), CHAR_MACRO(DIAG), &n, &nrhs, reinterpret_cast<const std::complex<double>*>(A), &lda, reinterpret_cast<std::complex<double>*>(B), &ldb, info);
1896 }
1897
1898
1899 void LAPACK<int,Kokkos::complex<double> >::TRTRI(const char& UPLO, const char& DIAG, const int& n, Kokkos::complex<double>* A, const int& lda, int* info) const
1900 {
1901 ZTRTRI_F77(CHAR_MACRO(UPLO), CHAR_MACRO(DIAG), &n, reinterpret_cast<std::complex<double>*>(A), &lda, info);
1902 }
1903
1904
1905 void LAPACK<int,Kokkos::complex<double> >::STEQR(const char& COMPZ, const int& n, double* D, double* E, Kokkos::complex<double>* Z, const int& ldz, double* WORK, int* info) const
1906 {
1907 ZSTEQR_F77(CHAR_MACRO(COMPZ), &n, D, E, reinterpret_cast<std::complex<double>*>(Z), &ldz, WORK, info);
1908 }
1909
1910
1911 void LAPACK<int,Kokkos::complex<double> >::PTEQR(const char& COMPZ, const int& n, double* D, double* E, Kokkos::complex<double>* Z, const int& ldz, double* WORK, int* info) const
1912 {
1913 ZPTEQR_F77(CHAR_MACRO(COMPZ), &n, D, E, reinterpret_cast<std::complex<double>*>(Z), &ldz, WORK, info);
1914 }
1915
1916
1917 void LAPACK<int,Kokkos::complex<double> >::HEEV(const char& JOBZ, const char& UPLO, const int& n, Kokkos::complex<double> * A, const int& lda, double* W, Kokkos::complex<double> * WORK, const int& lwork, double* RWORK, int* info) const
1918 {
1919 ZHEEV_F77(CHAR_MACRO(JOBZ), CHAR_MACRO(UPLO), &n, reinterpret_cast<std::complex<double>*>(A), &lda, W, reinterpret_cast<std::complex<double>*>(WORK), &lwork, RWORK, info);
1920 }
1921
1922
1923 void LAPACK<int,Kokkos::complex<double> >::HEGV(const int& itype, const char& JOBZ, const char& UPLO, const int& n, Kokkos::complex<double> * A, const int& lda, Kokkos::complex<double> * B, const int& ldb, double* W, Kokkos::complex<double> * WORK, const int& lwork, double* RWORK, int* info) const
1924 {
1925 ZHEGV_F77(&itype, CHAR_MACRO(JOBZ), CHAR_MACRO(UPLO), &n, reinterpret_cast<std::complex<double>*>(A), &lda, reinterpret_cast<std::complex<double>*>(B), &ldb, W, reinterpret_cast<std::complex<double>*>(WORK), &lwork, RWORK, info);
1926 }
1927
1928
1929 void LAPACK<int, Kokkos::complex<double> >::HSEQR(const char& JOB, const char& COMPZ, const int& n, const int& ilo, const int& ihi, Kokkos::complex<double>* H, const int& ldh, Kokkos::complex<double>* W, Kokkos::complex<double>* Z, const int& ldz, Kokkos::complex<double>* WORK, const int& lwork, int* info) const
1930 {
1931 ZHSEQR_F77(CHAR_MACRO(JOB), CHAR_MACRO(COMPZ), &n, &ilo, &ihi, reinterpret_cast<std::complex<double>*>(H), &ldh, reinterpret_cast<std::complex<double>*>(W), reinterpret_cast<std::complex<double>*>(Z), &ldz, reinterpret_cast<std::complex<double>*>(WORK), &lwork, info);
1932 }
1933
1934
1935 void LAPACK<int, Kokkos::complex<double> >::GEES(const char& JOBVS, const char& SORT, int (*ptr2func)(std::complex<double>*), const int& n, Kokkos::complex<double>* A, const int& lda, int* sdim, Kokkos::complex<double>* W, Kokkos::complex<double>* VS, const int& ldvs, Kokkos::complex<double>* WORK, const int& lwork, double* RWORK, int* BWORK, int* info) const
1936 {
1937 ZGEES_F77(CHAR_MACRO(JOBVS), CHAR_MACRO(SORT), ptr2func, &n, reinterpret_cast<std::complex<double>*>(A), &lda, sdim, reinterpret_cast<std::complex<double>*>(W), reinterpret_cast<std::complex<double>*>(VS), &ldvs, reinterpret_cast<std::complex<double>*>(WORK), &lwork, RWORK, BWORK, info);
1938 }
1939
1940
1941 void LAPACK<int, Kokkos::complex<double> >::GEES(const char& JOBVS, const int& n, Kokkos::complex<double>* A, const int& lda, int* sdim, double* WR, double* WI, Kokkos::complex<double>* VS, const int& ldvs, Kokkos::complex<double>* WORK, const int& lwork, double* RWORK, int* BWORK, int* info) const
1942 {
1943 int (*nullfptr)(std::complex<double>*) = NULL;
1944 std::vector< std::complex<double> > W(n);
1945 const char sort = 'N';
1946 ZGEES_F77(CHAR_MACRO(JOBVS), CHAR_MACRO(sort), nullfptr, &n, reinterpret_cast<std::complex<double>*>(A), &lda, sdim, &W[0], reinterpret_cast<std::complex<double>*>(VS), &ldvs, reinterpret_cast<std::complex<double>*>(WORK), &lwork, RWORK, BWORK, info);
1947 for (int i=0; i<n; i++) {
1948 WR[i] = W[i].real();
1949 WI[i] = W[i].imag();
1950 }
1951 }
1952
1953
1954 void LAPACK<int, Kokkos::complex<double> >::GEEV(const char& JOBVL, const char& JOBVR, const int& n, Kokkos::complex<double>* A, const int& lda, Kokkos::complex<double>* W, Kokkos::complex<double>* VL, const int& ldvl, Kokkos::complex<double>* VR, const int& ldvr, Kokkos::complex<double>* WORK, const int& lwork, double* RWORK, int* info) const
1955 {
1956 ZGEEV_F77(CHAR_MACRO(JOBVL), CHAR_MACRO(JOBVR), &n, reinterpret_cast<std::complex<double>*>(A), &lda, reinterpret_cast<std::complex<double>*>(W), reinterpret_cast<std::complex<double>*>(VL), &ldvl, reinterpret_cast<std::complex<double>*>(VR), &ldvr, reinterpret_cast<std::complex<double>*>(WORK), &lwork, RWORK, info);
1957 }
1958
1959
1960 void LAPACK<int, Kokkos::complex<double> >::GEEV(const char& JOBVL, const char& JOBVR, const int& n, Kokkos::complex<double>* A, const int& lda, double* WR, double* WI, Kokkos::complex<double>* VL, const int& ldvl, Kokkos::complex<double>* VR, const int& ldvr, Kokkos::complex<double>* WORK, const int& lwork, double* RWORK, int* info) const
1961 {
1962 std::vector<Kokkos::complex<double> > w (n);
1963 Kokkos::complex<double>* w_rawPtr = (n == 0) ? NULL : &w[0];
1964 GEEV (JOBVL, JOBVR, n, A, lda, w_rawPtr, VL, ldvl, VR, ldvr, WORK, lwork, RWORK, info);
1965 if (*info == 0) {
1966 // The eigenvalues are only valid on output if INFO is zero.
1967 // Otherwise, we shouldn't even write to WR or WI.
1968 for (int k = 0; k < n; ++k) {
1969 WR[k] = w[k].real ();
1970 WI[k] = w[k].imag ();
1971 }
1972 }
1973 }
1974
1975
1976 void LAPACK<int, Kokkos::complex<double> >::GESVD(const char& JOBU, const char& JOBVT, const int& m, const int& n, Kokkos::complex<double> * A, const int& lda, double* S, Kokkos::complex<double> * U, const int& ldu, Kokkos::complex<double> * V, const int& ldv, Kokkos::complex<double> * WORK, const int& lwork, double* RWORK, int* info) const {
1977 ZGESVD_F77(CHAR_MACRO(JOBU), CHAR_MACRO(JOBVT), &m, &n, reinterpret_cast<std::complex<double>*>(A), &lda, S, reinterpret_cast<std::complex<double>*>(U), &ldu, reinterpret_cast<std::complex<double>*>(V), &ldv, reinterpret_cast<std::complex<double>*>(WORK), &lwork, RWORK, info);
1978 }
1979
1980 void LAPACK<int, Kokkos::complex<double> >::GEEVX(const char& BALANC, const char& JOBVL, const char& JOBVR, const char& SENSE, const int& n, Kokkos::complex<double>* A, const int& lda, Kokkos::complex<double>* W, Kokkos::complex<double>* VL, const int& ldvl, Kokkos::complex<double>* VR, const int& ldvr, int* ilo, int* ihi, double* SCALE, double* abnrm, double* RCONDE, double* RCONDV, Kokkos::complex<double>* WORK, const int& lwork, double* RWORK, int* info) const
1981 {
1982 ZGEEVX_F77(CHAR_MACRO(BALANC), CHAR_MACRO(JOBVL), CHAR_MACRO(JOBVR), CHAR_MACRO(SENSE), &n, reinterpret_cast<std::complex<double>*>(A), &lda, reinterpret_cast<std::complex<double>*>(W), reinterpret_cast<std::complex<double>*>(VL), &ldvl, reinterpret_cast<std::complex<double>*>(VR), &ldvr, ilo, ihi, SCALE, abnrm, RCONDE, RCONDV, reinterpret_cast<std::complex<double>*>(WORK), &lwork, RWORK, info);
1983 }
1984
1985 void LAPACK<int, Kokkos::complex<double> >::GGEVX(const char& BALANC, const char& JOBVL, const char& JOBVR, const char& SENSE, const int& n, Kokkos::complex<double>* A, const int& lda, Kokkos::complex<double>* B, const int& ldb, Kokkos::complex<double>* ALPHA, Kokkos::complex<double>* BETA, Kokkos::complex<double>* VL, const int& ldvl, Kokkos::complex<double>* VR, const int& ldvr, int* ilo, int* ihi, double* lscale, double* rscale, double* abnrm, double* bbnrm, double* RCONDE, double* RCONDV, Kokkos::complex<double>* WORK, const int& lwork, double* RWORK, int* IWORK, int* BWORK, int* info) const
1986 {
1987 ZGGEVX_F77(CHAR_MACRO(BALANC), CHAR_MACRO(JOBVL), CHAR_MACRO(JOBVR), CHAR_MACRO(SENSE), &n, reinterpret_cast<std::complex<double>*>(A), &lda, reinterpret_cast<std::complex<double>*>(B), &ldb, reinterpret_cast<std::complex<double>*>(ALPHA), reinterpret_cast<std::complex<double>*>(BETA), reinterpret_cast<std::complex<double>*>(VL), &ldvl, reinterpret_cast<std::complex<double>*>(VR), &ldvr, ilo, ihi, lscale, rscale, abnrm, bbnrm, RCONDE, RCONDV, reinterpret_cast<std::complex<double>*>(WORK), &lwork, RWORK, IWORK, BWORK, info);
1988 }
1989
1990 void LAPACK<int, Kokkos::complex<double> >::GGEVX(const char& BALANC, const char& JOBVL, const char& JOBVR, const char& SENSE, const int& n, Kokkos::complex<double>* A, const int& lda, Kokkos::complex<double>* B, const int& ldb, double* ALPHAR, double* ALPHAI, Kokkos::complex<double>* BETA, Kokkos::complex<double>* VL, const int& ldvl, Kokkos::complex<double>* VR, const int& ldvr, int* ilo, int* ihi, double* lscale, double* rscale, double* abnrm, double* bbnrm, double* RCONDE, double* RCONDV, Kokkos::complex<double>* WORK, const int& lwork, double* RWORK, int* IWORK, int* BWORK, int* info) const
1991 {
1992 std::vector<Kokkos::complex<double> > w (n);
1993 Kokkos::complex<double>* w_rawPtr = (n == 0) ? NULL : &w[0];
1994 GGEVX(BALANC, JOBVL, JOBVR, SENSE, n, A, lda, B, ldb, w_rawPtr, BETA, VL, ldvl, VR, ldvr, ilo, ihi, lscale, rscale, abnrm, bbnrm, RCONDE, RCONDV, WORK, lwork, RWORK, IWORK, BWORK, info);
1995 if (*info == 0) {
1996 // The eigenvalues are only valid on output if INFO is zero.
1997 // Otherwise, we shouldn't even write to WR or WI.
1998 for (int k = 0; k < n; ++k) {
1999 ALPHAR[k] = w[k].real ();
2000 ALPHAI[k] = w[k].imag ();
2001 }
2002 }
2003 }
2004
2005 void LAPACK<int, Kokkos::complex<double> >::GGEV(const char& JOBVL, const char& JOBVR, const int& n, Kokkos::complex<double> *A, const int& lda, Kokkos::complex<double> *B, const int& ldb, Kokkos::complex<double>* ALPHA, Kokkos::complex<double>* BETA, Kokkos::complex<double>* VL, const int& ldvl, Kokkos::complex<double>* VR, const int& ldvr, Kokkos::complex<double> *WORK, const int& lwork, double* RWORK, int* info) const
2006 {
2007 ZGGEV_F77(CHAR_MACRO(JOBVL), CHAR_MACRO(JOBVR), &n, reinterpret_cast<std::complex<double>*>(A), &lda, reinterpret_cast<std::complex<double>*>(B), &ldb, reinterpret_cast<std::complex<double>*>(ALPHA), reinterpret_cast<std::complex<double>*>(BETA), reinterpret_cast<std::complex<double>*>(VL), &ldvl, reinterpret_cast<std::complex<double>*>(VR), &ldvr, reinterpret_cast<std::complex<double>*>(WORK), &lwork, RWORK, info);
2008 }
2009
2010 void LAPACK<int, Kokkos::complex<double> >::GGES(const char& JOBVL, const char& JOBVR, const char& SORT, int (*ptr2func)(std::complex<double>*, std::complex<double>*), const int& n, Kokkos::complex<double>* A, const int& lda, Kokkos::complex<double>* B, const int& ldb, int* sdim, Kokkos::complex<double>* ALPHA, Kokkos::complex<double>* BETA, Kokkos::complex<double>* VL, const int& ldvl, Kokkos::complex<double>* VR, const int& ldvr, Kokkos::complex<double>* WORK, const int& lwork, double* rwork, int* bwork, int* info ) const
2011 {
2012 ZGGES_F77(CHAR_MACRO(JOBVL), CHAR_MACRO(JOBVR), CHAR_MACRO(SORT), ptr2func, &n, reinterpret_cast<std::complex<double>*>(A), &lda, reinterpret_cast<std::complex<double>*>(B), &ldb, sdim, reinterpret_cast<std::complex<double>*>(ALPHA), reinterpret_cast<std::complex<double>*>(BETA), reinterpret_cast<std::complex<double>*>(VL), &ldvl, reinterpret_cast<std::complex<double>*>(VR), &ldvr, reinterpret_cast<std::complex<double>*>(WORK), &lwork, rwork, bwork, info);
2013 }
2014 void LAPACK<int, Kokkos::complex<double> >::TGSEN(const int& ijob, const int& wantq, const int& wantz, const int* SELECT, const int& n, Kokkos::complex<double>* A, const int& lda, Kokkos::complex<double>* B, const int& ldb, Kokkos::complex<double>* ALPHA, Kokkos::complex<double>* BETA, Kokkos::complex<double>* Q, const int& ldq, Kokkos::complex<double>* Z, const int& ldz, int* M, double* PL, double* PR, double* DIF, Kokkos::complex<double>* WORK, const int& lwork, int* IWORK, const int& liwork, int* info ) const
2015 {
2016 ZTGSEN_F77(&ijob, &wantq, &wantz, SELECT, &n, reinterpret_cast<std::complex<double>*>(A), &lda, reinterpret_cast<std::complex<double>*>(B), &ldb, reinterpret_cast<std::complex<double>*>(ALPHA), reinterpret_cast<std::complex<double>*>(BETA), reinterpret_cast<std::complex<double>*>(Q), &ldq, reinterpret_cast<std::complex<double>*>(Z), &ldz, M, PL, PR, DIF, reinterpret_cast<std::complex<double>*>(WORK), &lwork, IWORK, &liwork, info);
2017 }
2018
2019 void LAPACK<int, Kokkos::complex<double> >::TREVC(const char& SIDE, const char& HOWMNY, int* select, const int& n, const Kokkos::complex<double>* T, const int& ldt, Kokkos::complex<double>* VL, const int& ldvl, Kokkos::complex<double>* VR, const int& ldvr, const int& mm, int* m, Kokkos::complex<double>* WORK, double* RWORK, int* info) const
2020 {
2021 ZTREVC_F77(CHAR_MACRO(SIDE), CHAR_MACRO(HOWMNY), select, &n, reinterpret_cast<const std::complex<double>*>(T), &ldt, reinterpret_cast<std::complex<double>*>(VL), &ldvl, reinterpret_cast<std::complex<double>*>(VR), &ldvr, &mm, m, reinterpret_cast<std::complex<double>*>(WORK), RWORK, info);
2022 }
2023
2024
2025 void LAPACK<int, Kokkos::complex<double> >::TREVC(const char& SIDE, const int& n, const Kokkos::complex<double>* T, const int& ldt, Kokkos::complex<double>* VL, const int& ldvl, Kokkos::complex<double>* VR, const int& ldvr, const int& mm, int* m, Kokkos::complex<double>* WORK, double* RWORK, int* info) const
2026 {
2027 std::vector<int> select(1);
2028 const char& whch = 'A';
2029 ZTREVC_F77(CHAR_MACRO(SIDE), CHAR_MACRO(whch), &select[0], &n, reinterpret_cast<const std::complex<double>*>(T), &ldt, reinterpret_cast<std::complex<double>*>(VL), &ldvl, reinterpret_cast<std::complex<double>*>(VR), &ldvr, &mm, m, reinterpret_cast<std::complex<double>*>(WORK), RWORK, info);
2030 }
2031
2032 void LAPACK<int, Kokkos::complex<double> >::TREXC(const char& COMPQ, const int& n, Kokkos::complex<double>* T, const int& ldt, Kokkos::complex<double>* Q, const int& ldq, int* ifst, int* ilst, Kokkos::complex<double>* WORK, int* info) const
2033 {
2034 ZTREXC_F77(CHAR_MACRO(COMPQ), &n, reinterpret_cast<std::complex<double>*>(T), &ldt, reinterpret_cast<std::complex<double>*>(Q), &ldq, ifst, ilst, info);
2035 }
2036
2037 void LAPACK<int, Kokkos::complex<double> >::LARTG( const Kokkos::complex<double> f, const Kokkos::complex<double> g, double* c, Kokkos::complex<double>* s, Kokkos::complex<double>* r ) const
2038 {
2039 ZLARTG_F77(reinterpret_cast<const std::complex<double>*>(&f), reinterpret_cast<const std::complex<double>*>(&g), c, reinterpret_cast<std::complex<double>*>(s), reinterpret_cast<std::complex<double>*>(r));
2040 }
2041
2042
2043 void LAPACK<int, Kokkos::complex<double> >::LARFG( const int& n, Kokkos::complex<double>* alpha, Kokkos::complex<double>* x, const int& incx, Kokkos::complex<double>* tau ) const
2044 {
2045 ZLARFG_F77(&n, reinterpret_cast<std::complex<double>*>(alpha), reinterpret_cast<std::complex<double>*>(x), &incx, reinterpret_cast<std::complex<double>*>(tau));
2046 }
2047
2048 void LAPACK<int, Kokkos::complex<double> >::GEBAL(const char& JOBZ, const int& n, Kokkos::complex<double>* A, const int& lda, int* ilo, int* ihi, double* scale, int* info) const
2049 {
2050 ZGEBAL_F77(CHAR_MACRO(JOBZ),&n, reinterpret_cast<std::complex<double>*>(A), &lda, ilo, ihi, scale, info);
2051 }
2052
2053
2054 void LAPACK<int, Kokkos::complex<double> >::GEBAK(const char& JOBZ, const char& SIDE, const int& n, const int& ilo, const int& ihi, const double* scale, const int& m, Kokkos::complex<double>* V, const int& ldv, int* info) const
2055 {
2056 ZGEBAK_F77(CHAR_MACRO(JOBZ), CHAR_MACRO(SIDE), &n, &ilo, &ihi, scale, &m, reinterpret_cast<std::complex<double>*>(V), &ldv, info);
2057 }
2058
2059
2060#ifdef HAVE_TEUCHOS_LAPACKLARND
2061 Kokkos::complex<double> LAPACK<int, Kokkos::complex<double> >::LARND( const int& idist, int* seed ) const
2062 {
2063 double _Complex z = ZLARND_F77(&idist, seed);
2064 return reinterpret_cast<Kokkos::complex<double>&>(z);
2065 }
2066#endif
2067
2068 void LAPACK<int, Kokkos::complex<double> >::LARNV( const int& idist, int* seed, const int& n, Kokkos::complex<double>* v ) const
2069 {
2070 ZLARNV_F77(&idist, seed, &n, reinterpret_cast<std::complex<double>*>(v));
2071 }
2072
2073
2074 int LAPACK<int, Kokkos::complex<double> >::ILAENV( const int& ispec, const std::string& NAME, const std::string& OPTS, const int& N1, const int& N2, const int& N3, const int& N4 ) const
2075 {
2076 unsigned int opts_length = OPTS.length();
2077 std::string temp_NAME = "z" + NAME;
2078 unsigned int name_length = temp_NAME.length();
2079 return ilaenv_wrapper(&ispec, &temp_NAME[0], name_length, &OPTS[0], opts_length, &N1, &N2, &N3, &N4);
2080 }
2081
2082 // END INT, KOKKOS::COMPLEX<DOUBLE> SPECIALIZATION IMPLEMENTATION //
2083
2084#endif // HAVE_TEUCHOS_COMPLEX
2085
2086
2087#ifdef HAVE_TEUCHOSCORE_QUADMATH
2088
2089 // BEGIN int, __float128 SPECIALIZATION IMPLEMENTATION //
2090
2092 GEQRF(const int& m, const int& n, __float128* A, const int& lda, __float128* TAU, __float128* WORK, const int& lwork, int* info) const
2093 {
2094 Teuchos::Details::Lapack128 lapack;
2095 lapack.GEQRF (m, n, A, lda, TAU, WORK, lwork, info);
2096 }
2097
2099 GEQR2(const int& m, const int& n, __float128* A, const int& lda, __float128* TAU, __float128* WORK, int* const info) const
2100 {
2101 Teuchos::Details::Lapack128 lapack;
2102 lapack.GEQR2 (m, n, A, lda, TAU, WORK, info);
2103 }
2104
2106 GETRF(const int& m, const int& n, __float128* A, const int& lda, int* IPIV, int* info) const
2107 {
2108 Teuchos::Details::Lapack128 lapack;
2109 lapack.GETRF (m, n, A, lda, IPIV, info);
2110 }
2111
2113 GETRS(const char& TRANS, const int& n, const int& nrhs, const __float128* A, const int& lda, const int* IPIV, __float128* B, const int& ldb, int* info) const
2114 {
2115 Teuchos::Details::Lapack128 lapack;
2116 lapack.GETRS (TRANS, n, nrhs, A, lda, IPIV, B, ldb, info);
2117 }
2118
2120 GETRI (const int& n, __float128* A, const int& lda, const int* IPIV, __float128* WORK, const int& lwork, int* info) const
2121 {
2122 Teuchos::Details::Lapack128 lapack;
2123 lapack.GETRI (n, A, lda, const_cast<int*> (IPIV), WORK, lwork, info);
2124 }
2125
2127 LASWP (const int& N, __float128* A, const int& LDA, const int& K1, const int& K2, const int* IPIV, const int& INCX) const
2128 {
2129 Teuchos::Details::Lapack128 lapack;
2130 lapack.LASWP (N, A, LDA, K1, K2, IPIV, INCX);
2131 }
2132
2134 ORM2R(const char& SIDE, const char& TRANS, const int& m, const int& n, const int& k, const __float128* A, const int& lda, const __float128* TAU, __float128* C, const int& ldc, __float128* WORK, int* const info) const
2135 {
2136 Teuchos::Details::Lapack128 lapack;
2137 lapack.ORM2R (SIDE, TRANS, m, n, k, A, lda, TAU, C, ldc, WORK, info);
2138 }
2139
2141 ORGQR(const int& m, const int& n, const int& k, __float128* A, const int& lda, const __float128* TAU, __float128* WORK, const int& lwork, int* info) const
2142 {
2143 Teuchos::Details::Lapack128 lapack;
2144 lapack.ORGQR (m, n, k, A, lda, TAU, WORK, lwork, info);
2145 }
2146
2148 UNGQR(const int& m, const int& n, const int& k, __float128* A, const int& lda, const __float128* TAU, __float128* WORK, const int& lwork, int* info) const
2149 {
2150 Teuchos::Details::Lapack128 lapack;
2151 lapack.UNGQR (m, n, k, A, lda, TAU, WORK, lwork, info);
2152 }
2153
2155 LARFG( const int& n, __float128* alpha, __float128* x, const int& incx, __float128* tau ) const
2156 {
2157 Teuchos::Details::Lapack128 lapack;
2158 lapack.LARFG (n, alpha, x, incx, tau);
2159 }
2160
2161 __float128 LAPACK<int, __float128>::
2162 LAPY2 (const __float128 x, const __float128 y) const
2163 {
2164 Teuchos::Details::Lapack128 lapack;
2165 return lapack.LAPY2 (x, y);
2166 }
2167
2169 GBTRF (const int& m, const int& n, const int& kl, const int& ku,
2170 __float128* A, const int& lda, int* IPIV, int* info) const
2171 {
2172 Teuchos::Details::Lapack128 lapack;
2173 return lapack.GBTRF (m, n, kl, ku, A, lda, IPIV, info);
2174 }
2175
2177 GBTRS (const char& TRANS, const int& n, const int& kl, const int& ku,
2178 const int& nrhs, const __float128* A, const int& lda, const int* IPIV,
2179 __float128* B, const int& ldb, int* info) const
2180 {
2181 Teuchos::Details::Lapack128 lapack;
2182 return lapack.GBTRS (TRANS, n, kl, ku, nrhs, A, lda, IPIV, B, ldb, info);
2183 }
2184
2186 LASCL (const char& TYPE, const int& kl, const int& ku, const __float128 cfrom,
2187 const __float128 cto, const int& m, const int& n, __float128* A,
2188 const int& lda, int* info) const
2189 {
2190 Teuchos::Details::Lapack128 lapack;
2191 return lapack.LASCL (TYPE, kl, ku, cfrom, cto, m, n, A, lda, info);
2192 }
2193
2194 // END int, __float128 SPECIALIZATION IMPLEMENTATION //
2195
2196#endif // HAVE_TEUCHOSCORE_QUADMATH
2197
2198#ifdef HAVE_TEUCHOS_LONG_DOUBLE
2199
2200 // BEGIN int, long double SPECIALIZATION IMPLEMENTATION //
2201
2203 GESV(const int& n, const int& nrhs, long double* A, const int& lda, int* IPIV, long double* B, const int& ldb, int* info) const
2204 {
2205 TEUCHOS_TEST_FOR_EXCEPTION(true, std::runtime_error, "ERROR in Teuchos::LAPACK: GESV not implemented for long double scalar type!");
2206 }
2208 GTTRS(const char& TRANS, const int& n, const int& nrhs, const long double* dl, const long double* d, const long double* du, const long double* du2, const int* IPIV, long double* B, const int& ldb, int* info) const
2209 {
2210 TEUCHOS_TEST_FOR_EXCEPTION(true, std::runtime_error, "ERROR in Teuchos::LAPACK: GTTRS not implemented for long double scalar type!");
2211 }
2213 GTTRF(const int& n, long double* dl, long double* d, long double* du, long double* du2, int* IPIV, int* info) const
2214 {
2215 TEUCHOS_TEST_FOR_EXCEPTION(true, std::runtime_error, "ERROR in Teuchos::LAPACK: GTTRF not implemented for long double scalar type!");
2216 }
2218 SYGV(const int& itype, const char& JOBZ, const char& UPLO, const int& n, long double* A, const int& lda, long double* B, const int& ldb, long double* W, long double* WORK, const int& lwork, int* info) const
2219 {
2220 TEUCHOS_TEST_FOR_EXCEPTION(true, std::runtime_error, "ERROR in Teuchos::LAPACK: GESV not implemented for long double scalar type!");
2221 }
2223 GEEV(const char& JOBVL, const char& JOBVR, const int& n, long double* A, const int& lda, long double* WR, long double* WI, long double* VL, const int& ldvl, long double* VR, const int& ldvr, long double* WORK, const int& lwork, int* info) const
2224 {
2225 TEUCHOS_TEST_FOR_EXCEPTION(true, std::runtime_error, "ERROR in Teuchos::LAPACK: GEEV not implemented for long double scalar type!");
2226 }
2228 GEEV(const char& JOBVL, const char& JOBVR, const int& n, long double* A, const int& lda, long double* WR, long double* WI, long double* VL, const int& ldvl, long double* VR, const int& ldvr, long double* WORK, const int& lwork, long double* /* RWORK */, int* info) const
2229 {
2230 TEUCHOS_TEST_FOR_EXCEPTION(true, std::runtime_error, "ERROR in Teuchos::LAPACK: GEEV not implemented for long double scalar type!");
2231 }
2233 GGEVX(const char& BALANC, const char& JOBVL, const char& JOBVR, const char& SENSE, const int& n, long double* A, const int& lda, long double* B, const int& ldb, long double* ALPHAR, long double* ALPHAI, long double* BETA, long double* VL, const int& ldvl, long double* VR, const int& ldvr, int* ilo, int* ihi, long double* lscale, long double* rscale, long double* abnrm, long double* bbnrm, long double* RCONDE, long double* RCONDV, long double* WORK, const int& lwork, int* IWORK, int* BWORK, int* info) const
2234 {
2235 TEUCHOS_TEST_FOR_EXCEPTION(true, std::runtime_error, "ERROR in Teuchos::LAPACK: GGEVX not implemented for long double scalar type!");
2236 }
2238 GGEVX(const char& BALANC, const char& JOBVL, const char& JOBVR, const char& SENSE, const int& n, long double* A, const int& lda, long double* B, const int& ldb, long double* ALPHAR, long double* ALPHAI, long double* BETA, long double* VL, const int& ldvl, long double* VR, const int& ldvr, int* ilo, int* ihi, long double* lscale, long double* rscale, long double* abnrm, long double* bbnrm, long double* RCONDE, long double* RCONDV, long double* WORK, const int& lwork, long double* /* RWORK */, int* IWORK, int* BWORK, int* info) const
2239 {
2240 TEUCHOS_TEST_FOR_EXCEPTION(true, std::runtime_error, "ERROR in Teuchos::LAPACK: GGEVX not implemented for long double scalar type!");
2241 }
2243 PORFS(const char& UPLO, const int& n, const int& nrhs, const long double* A, const int& lda, const long double* AF, const int& ldaf, const long double* B, const int& ldb, long double* X, const int& ldx, long double* FERR, long double* BERR, long double* WORK, int* IWORK, int* info) const
2244 {
2245 TEUCHOS_TEST_FOR_EXCEPTION(true, std::runtime_error, "ERROR in Teuchos::LAPACK: PORFS not implemented for long double scalar type!");
2246 }
2248 PTEQR(const char& COMPZ, const int& n, long double* D, long double* E, long double* Z, const int& ldz, long double* WORK, int* info) const
2249 {
2250 TEUCHOS_TEST_FOR_EXCEPTION(true, std::runtime_error, "ERROR in Teuchos::LAPACK: PTEQR not implemented for long double scalar type!");
2251 }
2253 POTRF(const char& UPLO, const int& n, long double* A, const int& lda, int* info) const
2254 {
2255 TEUCHOS_TEST_FOR_EXCEPTION(true, std::runtime_error, "ERROR in Teuchos::LAPACK: POTRF not implemented for long double scalar type!");
2256 }
2258 POTRS(const char& UPLO, const int& n, const int& nrhs, const long double* A, const int& lda, long double* B, const int& ldb, int* info) const
2259 {
2260 TEUCHOS_TEST_FOR_EXCEPTION(true, std::runtime_error, "ERROR in Teuchos::LAPACK: POTRS not implemented for long double scalar type!");
2261 }
2263 POEQU(const int& n, const long double* A, const int& lda, long double* S, long double* scond, long double* amax, int* info) const
2264 {
2265 TEUCHOS_TEST_FOR_EXCEPTION(true, std::runtime_error, "ERROR in Teuchos::LAPACK: POEQU not implemented for long double scalar type!");
2266 }
2268 GEQRF(const int& m, const int& n, long double* A, const int& lda, long double* TAU, long double* WORK, const int& lwork, int* info) const
2269 {
2270 Teuchos::Details::LapackLongDouble lapack;
2271 lapack.GEQRF (m, n, A, lda, TAU, WORK, lwork, info);
2272 }
2273
2275 GEQR2(const int& m, const int& n, long double* A, const int& lda, long double* TAU, long double* WORK, int* const info) const
2276 {
2277 Teuchos::Details::LapackLongDouble lapack;
2278 lapack.GEQR2 (m, n, A, lda, TAU, WORK, info);
2279 }
2280
2282 GETRF(const int& m, const int& n, long double* A, const int& lda, int* IPIV, int* info) const
2283 {
2284 Teuchos::Details::LapackLongDouble lapack;
2285 lapack.GETRF (m, n, A, lda, IPIV, info);
2286 }
2287
2289 GETRS(const char& TRANS, const int& n, const int& nrhs, const long double* A, const int& lda, const int* IPIV, long double* B, const int& ldb, int* info) const
2290 {
2291 Teuchos::Details::LapackLongDouble lapack;
2292 lapack.GETRS (TRANS, n, nrhs, A, lda, IPIV, B, ldb, info);
2293 }
2294
2296 GETRI (const int& n, long double* A, const int& lda, const int* IPIV, long double* WORK, const int& lwork, int* info) const
2297 {
2298 Teuchos::Details::LapackLongDouble lapack;
2299 lapack.GETRI (n, A, lda, const_cast<int*> (IPIV), WORK, lwork, info);
2300 }
2301
2303 LASWP (const int& N, long double* A, const int& LDA, const int& K1, const int& K2, const int* IPIV, const int& INCX) const
2304 {
2305 Teuchos::Details::LapackLongDouble lapack;
2306 lapack.LASWP (N, A, LDA, K1, K2, IPIV, INCX);
2307 }
2308
2310 ORM2R(const char& SIDE, const char& TRANS, const int& m, const int& n, const int& k, const long double* A, const int& lda, const long double* TAU, long double* C, const int& ldc, long double* WORK, int* const info) const
2311 {
2312 Teuchos::Details::LapackLongDouble lapack;
2313 lapack.ORM2R (SIDE, TRANS, m, n, k, A, lda, TAU, C, ldc, WORK, info);
2314 }
2315
2317 ORGQR(const int& m, const int& n, const int& k, long double* A, const int& lda, const long double* TAU, long double* WORK, const int& lwork, int* info) const
2318 {
2319 Teuchos::Details::LapackLongDouble lapack;
2320 lapack.ORGQR (m, n, k, A, lda, TAU, WORK, lwork, info);
2321 }
2322
2324 UNGQR(const int& m, const int& n, const int& k, long double* A, const int& lda, const long double* TAU, long double* WORK, const int& lwork, int* info) const
2325 {
2326 Teuchos::Details::LapackLongDouble lapack;
2327 lapack.UNGQR (m, n, k, A, lda, TAU, WORK, lwork, info);
2328 }
2329
2331 LARFG( const int& n, long double* alpha, long double* x, const int& incx, long double* tau ) const
2332 {
2333 Teuchos::Details::LapackLongDouble lapack;
2334 lapack.LARFG (n, alpha, x, incx, tau);
2335 }
2336
2337 long double LAPACK<int, long double>::
2338 LAPY2 (const long double x, const long double y) const
2339 {
2340 Teuchos::Details::LapackLongDouble lapack;
2341 return lapack.LAPY2 (x, y);
2342 }
2343
2345 GBTRF (const int& m, const int& n, const int& kl, const int& ku,
2346 long double* A, const int& lda, int* IPIV, int* info) const
2347 {
2348 Teuchos::Details::LapackLongDouble lapack;
2349 return lapack.GBTRF (m, n, kl, ku, A, lda, IPIV, info);
2350 }
2351
2353 GBTRS (const char& TRANS, const int& n, const int& kl, const int& ku,
2354 const int& nrhs, const long double* A, const int& lda, const int* IPIV,
2355 long double* B, const int& ldb, int* info) const
2356 {
2357 Teuchos::Details::LapackLongDouble lapack;
2358 return lapack.GBTRS (TRANS, n, kl, ku, nrhs, A, lda, IPIV, B, ldb, info);
2359 }
2360
2362 LASCL (const char& TYPE, const int& kl, const int& ku, const long double cfrom,
2363 const long double cto, const int& m, const int& n, long double* A,
2364 const int& lda, int* info) const
2365 {
2366 Teuchos::Details::LapackLongDouble lapack;
2367 return lapack.LASCL (TYPE, kl, ku, cfrom, cto, m, n, A, lda, info);
2368 }
2369
2370 // END int, long double SPECIALIZATION IMPLEMENTATION //
2371
2372#endif // HAVE_TEUCHOS_LONG_DOUBLE
2373
2374
2375} // namespace Teuchos
Teuchos header file which uses auto-configuration information to include necessary C++ headers.
Declaration and definition of Teuchos::Details::Lapack128, a partial implementation of Teuchos::LAPAC...
Declaration and definition of Teuchos::Details::LapackLongDouble, a partial implementation of Teuchos...
Templated interface class to LAPACK routines.
The Templated LAPACK wrappers.
Defines basic traits for the scalar field type.
Standard test and throw macros.
int rank(const Comm< Ordinal > &comm)
Get the process rank.
The Templated LAPACK Wrapper Class.
void GEQR2(const OrdinalType &m, const OrdinalType &n, ScalarType *A, const OrdinalType &lda, ScalarType *TAU, ScalarType *WORK, OrdinalType *const info) const
BLAS 2 version of GEQRF, with known workspace size.
void LARFG(const OrdinalType &n, ScalarType *alpha, ScalarType *x, const OrdinalType &incx, ScalarType *tau) const
Generates an elementary reflector of order n that zeros out the last n-1 components of the input vect...
void GEEV(const char &JOBVL, const char &JOBVR, const OrdinalType &n, ScalarType *A, const OrdinalType &lda, MagnitudeType *WR, MagnitudeType *WI, ScalarType *VL, const OrdinalType &ldvl, ScalarType *VR, const OrdinalType &ldvr, ScalarType *WORK, const OrdinalType &lwork, MagnitudeType *RWORK, OrdinalType *info) const
Computes for an n by n real nonsymmetric matrix A, the eigenvalues and, optionally,...
void TGSEN(const OrdinalType &ijob, const OrdinalType &wantq, const OrdinalType &wantz, const OrdinalType *SELECT, const OrdinalType &n, ScalarType *A, const OrdinalType &lda, ScalarType *B, const OrdinalType &ldb, MagnitudeType *ALPHAR, MagnitudeType *ALPHAI, MagnitudeType *BETA, ScalarType *Q, const OrdinalType &ldq, ScalarType *Z, const OrdinalType &ldz, OrdinalType *M, MagnitudeType *PL, MagnitudeType *PR, MagnitudeType *DIF, ScalarType *WORK, const OrdinalType &lwork, OrdinalType *IWORK, const OrdinalType &liwork, OrdinalType *info) const
void TREXC(const char &COMPQ, const OrdinalType &n, ScalarType *T, const OrdinalType &ldt, ScalarType *Q, const OrdinalType &ldq, OrdinalType *ifst, OrdinalType *ilst, ScalarType *WORK, OrdinalType *info) const
void SYGV(const OrdinalType &itype, const char &JOBZ, const char &UPLO, const OrdinalType &n, ScalarType *A, const OrdinalType &lda, ScalarType *B, const OrdinalType &ldb, ScalarType *W, ScalarType *WORK, const OrdinalType &lwork, OrdinalType *info) const
Computes all the eigenvalues and, optionally, eigenvectors of a symmetric n by n matrix pencil {A,...
void GEBAL(const char &JOBZ, const OrdinalType &n, ScalarType *A, const OrdinalType &lda, OrdinalType *ilo, OrdinalType *ihi, MagnitudeType *scale, OrdinalType *info) const
Balances a general matrix A, through similarity transformations to make the rows and columns as close...
void GBRFS(const char &TRANS, const OrdinalType &n, const OrdinalType &kl, const OrdinalType &ku, const OrdinalType &nrhs, const ScalarType *A, const OrdinalType &lda, const ScalarType *AF, const OrdinalType &ldaf, const OrdinalType *IPIV, const ScalarType *B, const OrdinalType &ldb, ScalarType *X, const OrdinalType &ldx, ScalarType *FERR, ScalarType *BERR, ScalarType *WORK, OrdinalType *IWORK, OrdinalType *info) const
Improves the computed solution to a banded system of linear equations and provides error bounds and b...
ScalarTraits< ScalarType >::magnitudeType LANGB(const char &NORM, const OrdinalType &n, const OrdinalType &kl, const OrdinalType &ku, const ScalarType *A, const OrdinalType &lda, MagnitudeType *WORK) const
Returns the value of the one norm, or the Frobenius norm, or the infinity norm, or the element of lar...
void ORMQR(const char &SIDE, const char &TRANS, const OrdinalType &m, const OrdinalType &n, const OrdinalType &k, const ScalarType *A, const OrdinalType &lda, const ScalarType *TAU, ScalarType *C, const OrdinalType &ldc, ScalarType *WORK, const OrdinalType &lwork, OrdinalType *info) const
void TRTRS(const char &UPLO, const char &TRANS, const char &DIAG, const OrdinalType &n, const OrdinalType &nrhs, const ScalarType *A, const OrdinalType &lda, ScalarType *B, const OrdinalType &ldb, OrdinalType *info) const
Solves a triangular linear system of the form A*X=B or A**T*X=B, where A is a triangular matrix.
void HEGV(const OrdinalType &itype, const char &JOBZ, const char &UPLO, const OrdinalType &n, ScalarType *A, const OrdinalType &lda, ScalarType *B, const OrdinalType &ldb, MagnitudeType *W, ScalarType *WORK, const OrdinalType &lwork, MagnitudeType *RWORK, OrdinalType *info) const
Computes all the eigenvalues and, optionally, eigenvectors of a generalized Hermitian-definite n by n...
void STEQR(const char &COMPZ, const OrdinalType &n, MagnitudeType *D, MagnitudeType *E, ScalarType *Z, const OrdinalType &ldz, MagnitudeType *WORK, OrdinalType *info) const
Computes the eigenvalues and, optionally, eigenvectors of a symmetric tridiagonal n by n matrix A usi...
void GGEV(const char &JOBVL, const char &JOBVR, const OrdinalType &n, ScalarType *A, const OrdinalType &lda, ScalarType *B, const OrdinalType &ldb, MagnitudeType *ALPHAR, MagnitudeType *ALPHAI, ScalarType *BETA, ScalarType *VL, const OrdinalType &ldvl, ScalarType *VR, const OrdinalType &ldvr, ScalarType *WORK, const OrdinalType &lwork, OrdinalType *info) const
void ORMHR(const char &SIDE, const char &TRANS, const OrdinalType &m, const OrdinalType &n, const OrdinalType &ilo, const OrdinalType &ihi, const ScalarType *A, const OrdinalType &lda, const ScalarType *TAU, ScalarType *C, const OrdinalType &ldc, ScalarType *WORK, const OrdinalType &lwork, OrdinalType *info) const
Overwrites the general real m by n matrix C with the product of C and Q, which is a product of ihi-il...
void UNGQR(const OrdinalType &m, const OrdinalType &n, const OrdinalType &k, ScalarType *A, const OrdinalType &lda, const ScalarType *TAU, ScalarType *WORK, const OrdinalType &lwork, OrdinalType *info) const
Compute explicit QR factor from QR factorization (GEQRF) (complex case).
void LATRS(const char &UPLO, const char &TRANS, const char &DIAG, const char &NORMIN, const OrdinalType &N, const ScalarType *A, const OrdinalType &LDA, ScalarType *X, MagnitudeType *SCALE, MagnitudeType *CNORM, OrdinalType *INFO) const
Robustly solve a possibly singular triangular linear system.
ScalarType LAMCH(const char &CMACH) const
Determines machine parameters for floating point characteristics.
void ORGHR(const OrdinalType &n, const OrdinalType &ilo, const OrdinalType &ihi, ScalarType *A, const OrdinalType &lda, const ScalarType *TAU, ScalarType *WORK, const OrdinalType &lwork, OrdinalType *info) const
Generates a real orthogonal matrix Q which is the product of ihi-ilo elementary reflectors of order n...
void PTTRS(const OrdinalType &n, const OrdinalType &nrhs, const MagnitudeType *d, const ScalarType *e, ScalarType *B, const OrdinalType &ldb, OrdinalType *info) const
Solves a tridiagonal system A*X=B using the \L*D*L' factorization of A computed by PTTRF.
void GTTRF(const OrdinalType &n, ScalarType *dl, ScalarType *d, ScalarType *du, ScalarType *du2, OrdinalType *IPIV, OrdinalType *info) const
Computes an LU factorization of a n by n tridiagonal matrix A using partial pivoting with row interch...
void GESVX(const char &FACT, const char &TRANS, const OrdinalType &n, const OrdinalType &nrhs, ScalarType *A, const OrdinalType &lda, ScalarType *AF, const OrdinalType &ldaf, OrdinalType *IPIV, char *EQUED, ScalarType *R, ScalarType *C, ScalarType *B, const OrdinalType &ldb, ScalarType *X, const OrdinalType &ldx, ScalarType *rcond, ScalarType *FERR, ScalarType *BERR, ScalarType *WORK, OrdinalType *IWORK, OrdinalType *info) const
Uses the LU factorization to compute the solution to a real system of linear equations A*X=B,...
void LASWP(const OrdinalType &N, ScalarType *A, const OrdinalType &LDA, const OrdinalType &K1, const OrdinalType &K2, const OrdinalType *IPIV, const OrdinalType &INCX) const
Apply a series of row interchanges to the matrix A.
void PTEQR(const char &COMPZ, const OrdinalType &n, MagnitudeType *D, MagnitudeType *E, ScalarType *Z, const OrdinalType &ldz, MagnitudeType *WORK, OrdinalType *info) const
Computes the eigenvalues and, optionally, eigenvectors of a symmetric positive-definite tridiagonal n...
void GETRI(const OrdinalType &n, ScalarType *A, const OrdinalType &lda, const OrdinalType *IPIV, ScalarType *WORK, const OrdinalType &lwork, OrdinalType *info) const
Computes the inverse of a matrix A using the LU factorization computed by GETRF.
void GGLSE(const OrdinalType &m, const OrdinalType &n, const OrdinalType &p, ScalarType *A, const OrdinalType &lda, ScalarType *B, const OrdinalType &ldb, ScalarType *C, ScalarType *D, ScalarType *X, ScalarType *WORK, const OrdinalType &lwork, OrdinalType *info) const
Solves the linear equality-constrained least squares (LSE) problem where A is an m by n matrix,...
void GBTRF(const OrdinalType &m, const OrdinalType &n, const OrdinalType &kl, const OrdinalType &ku, ScalarType *A, const OrdinalType &lda, OrdinalType *IPIV, OrdinalType *info) const
Computes an LU factorization of a general banded m by n matrix A using partial pivoting with row inte...
void PORFS(const char &UPLO, const OrdinalType &n, const OrdinalType &nrhs, const ScalarType *A, const OrdinalType &lda, const ScalarType *AF, const OrdinalType &ldaf, const ScalarType *B, const OrdinalType &ldb, ScalarType *X, const OrdinalType &ldx, ScalarType *FERR, ScalarType *BERR, ScalarType *WORK, OrdinalType *IWORK, OrdinalType *info) const
Improves the computed solution to a system of linear equations when the coefficient matrix is symmetr...
void GELSS(const OrdinalType &m, const OrdinalType &n, const OrdinalType &nrhs, ScalarType *A, const OrdinalType &lda, ScalarType *B, const OrdinalType &ldb, MagnitudeType *S, const MagnitudeType rcond, OrdinalType *rank, ScalarType *WORK, const OrdinalType &lwork, MagnitudeType *RWORK, OrdinalType *info) const
Use the SVD to solve a possibly rank-deficient linear least-squares problem.
void GEHRD(const OrdinalType &n, const OrdinalType &ilo, const OrdinalType &ihi, ScalarType *A, const OrdinalType &lda, ScalarType *TAU, ScalarType *WORK, const OrdinalType &lwork, OrdinalType *info) const
Reduces a real general matrix A to upper Hessenberg form by orthogonal similarity transformations.
void POSVX(const char &FACT, const char &UPLO, const OrdinalType &n, const OrdinalType &nrhs, ScalarType *A, const OrdinalType &lda, ScalarType *AF, const OrdinalType &ldaf, char *EQUED, ScalarType *S, ScalarType *B, const OrdinalType &ldb, ScalarType *X, const OrdinalType &ldx, ScalarType *rcond, ScalarType *FERR, ScalarType *BERR, ScalarType *WORK, OrdinalType *IWORK, OrdinalType *info) const
Uses the Cholesky factorization to compute the solution to a real system of linear equations A*X=B,...
void ORGQR(const OrdinalType &m, const OrdinalType &n, const OrdinalType &k, ScalarType *A, const OrdinalType &lda, const ScalarType *TAU, ScalarType *WORK, const OrdinalType &lwork, OrdinalType *info) const
Compute explicit Q factor from QR factorization (GEQRF) (real case).
void GEES(const char &JOBVS, const char &SORT, OrdinalType &(*ptr2func)(ScalarType *, ScalarType *), const OrdinalType &n, ScalarType *A, const OrdinalType &lda, OrdinalType *sdim, ScalarType *WR, ScalarType *WI, ScalarType *VS, const OrdinalType &ldvs, ScalarType *WORK, const OrdinalType &lwork, OrdinalType *BWORK, OrdinalType *info) const
void UNM2R(const char &SIDE, const char &TRANS, const OrdinalType &M, const OrdinalType &N, const OrdinalType &K, const ScalarType *A, const OrdinalType &LDA, const ScalarType *TAU, ScalarType *C, const OrdinalType &LDC, ScalarType *WORK, OrdinalType *const INFO) const
BLAS 2 version of UNMQR; known workspace size.
void GBEQU(const OrdinalType &m, const OrdinalType &n, const OrdinalType &kl, const OrdinalType &ku, const ScalarType *A, const OrdinalType &lda, MagnitudeType *R, MagnitudeType *C, MagnitudeType *rowcond, MagnitudeType *colcond, MagnitudeType *amax, OrdinalType *info) const
Computes row and column scalings intended to equilibrate an m by n banded matrix A and reduce its con...
void GESVD(const char &JOBU, const char &JOBVT, const OrdinalType &m, const OrdinalType &n, ScalarType *A, const OrdinalType &lda, MagnitudeType *S, ScalarType *U, const OrdinalType &ldu, ScalarType *V, const OrdinalType &ldv, ScalarType *WORK, const OrdinalType &lwork, MagnitudeType *RWORK, OrdinalType *info) const
Computes the singular values (and optionally, vectors) of a real matrix A.
void POCON(const char &UPLO, const OrdinalType &n, const ScalarType *A, const OrdinalType &lda, const ScalarType &anorm, ScalarType *rcond, ScalarType *WORK, OrdinalType *IWORK, OrdinalType *info) const
Estimates the reciprocal of the condition number (1-norm) of a real symmetric positive definite matri...
void GEEVX(const char &BALANC, const char &JOBVL, const char &JOBVR, const char &SENSE, const OrdinalType &n, ScalarType *A, const OrdinalType &lda, ScalarType *WR, ScalarType *WI, ScalarType *VL, const OrdinalType &ldvl, ScalarType *VR, const OrdinalType &ldvr, OrdinalType *ilo, OrdinalType *ihi, MagnitudeType *SCALE, MagnitudeType *abnrm, MagnitudeType *RCONDE, MagnitudeType *RCONDV, ScalarType *WORK, const OrdinalType &lwork, OrdinalType *IWORK, OrdinalType *info) const
void HSEQR(const char &JOB, const char &COMPZ, const OrdinalType &n, const OrdinalType &ilo, const OrdinalType &ihi, ScalarType *H, const OrdinalType &ldh, ScalarType *WR, ScalarType *WI, ScalarType *Z, const OrdinalType &ldz, ScalarType *WORK, const OrdinalType &lwork, OrdinalType *info) const
Computes the eigenvalues of a real upper Hessenberg matrix H and, optionally, the matrices T and Z fr...
void LARTG(const ScalarType &f, const ScalarType &g, MagnitudeType *c, ScalarType *s, ScalarType *r) const
Gnerates a plane rotation that zeros out the second component of the input vector.
void GELS(const char &TRANS, const OrdinalType &m, const OrdinalType &n, const OrdinalType &nrhs, ScalarType *A, const OrdinalType &lda, ScalarType *B, const OrdinalType &ldb, ScalarType *WORK, const OrdinalType &lwork, OrdinalType *info) const
Solves an over/underdetermined real m by n linear system A using QR or LQ factorization of A.
void GBCON(const char &NORM, const OrdinalType &n, const OrdinalType &kl, const OrdinalType &ku, const ScalarType *A, const OrdinalType &lda, const OrdinalType *IPIV, const ScalarType &anorm, ScalarType *rcond, ScalarType *WORK, OrdinalType *IWORK, OrdinalType *info) const
Estimates the reciprocal of the condition number of a general banded real matrix A,...
void HEEV(const char &JOBZ, const char &UPLO, const OrdinalType &n, ScalarType *A, const OrdinalType &lda, MagnitudeType *W, ScalarType *WORK, const OrdinalType &lwork, MagnitudeType *RWORK, OrdinalType *info) const
Computes all the eigenvalues and, optionally, eigenvectors of a Hermitian n by n matrix A.
void POTRS(const char &UPLO, const OrdinalType &n, const OrdinalType &nrhs, const ScalarType *A, const OrdinalType &lda, ScalarType *B, const OrdinalType &ldb, OrdinalType *info) const
Solves a system of linear equations A*X=B, where A is a symmetric positive definite matrix factored b...
void GGEVX(const char &BALANC, const char &JOBVL, const char &JOBVR, const char &SENSE, const OrdinalType &n, ScalarType *A, const OrdinalType &lda, ScalarType *B, const OrdinalType &ldb, MagnitudeType *ALPHAR, MagnitudeType *ALPHAI, ScalarType *BETA, ScalarType *VL, const OrdinalType &ldvl, ScalarType *VR, const OrdinalType &ldvr, OrdinalType *ilo, OrdinalType *ihi, MagnitudeType *lscale, MagnitudeType *rscale, MagnitudeType *abnrm, MagnitudeType *bbnrm, MagnitudeType *RCONDE, MagnitudeType *RCONDV, ScalarType *WORK, const OrdinalType &lwork, OrdinalType *IWORK, OrdinalType *BWORK, OrdinalType *info) const
ScalarType LARND(const OrdinalType &idist, OrdinalType *seed) const
Returns a random number from a uniform or normal distribution.
ScalarType LAPY2(const ScalarType &x, const ScalarType &y) const
Computes x^2 + y^2 safely, to avoid overflow.
void ORM2R(const char &SIDE, const char &TRANS, const OrdinalType &m, const OrdinalType &n, const OrdinalType &k, const ScalarType *A, const OrdinalType &lda, const ScalarType *TAU, ScalarType *C, const OrdinalType &ldc, ScalarType *WORK, OrdinalType *const info) const
BLAS 2 version of ORMQR; known workspace size.
void POEQU(const OrdinalType &n, const ScalarType *A, const OrdinalType &lda, MagnitudeType *S, MagnitudeType *scond, MagnitudeType *amax, OrdinalType *info) const
Computes row and column scalings intended to equilibrate a symmetric positive definite matrix A and r...
void GEEQU(const OrdinalType &m, const OrdinalType &n, const ScalarType *A, const OrdinalType &lda, ScalarType *R, ScalarType *C, ScalarType *rowcond, ScalarType *colcond, ScalarType *amax, OrdinalType *info) const
Computes row and column scalings intended to equilibrate an m by n matrix A and reduce its condition ...
void UNMQR(const char &SIDE, const char &TRANS, const OrdinalType &m, const OrdinalType &n, const OrdinalType &k, const ScalarType *A, const OrdinalType &lda, const ScalarType *TAU, ScalarType *C, const OrdinalType &ldc, ScalarType *WORK, const OrdinalType &lwork, OrdinalType *info) const
Apply Householder reflectors (complex case).
void POTRI(const char &UPLO, const OrdinalType &n, ScalarType *A, const OrdinalType &lda, OrdinalType *info) const
Computes the inverse of a real symmetric positive definite matrix A using the Cholesky factorization ...
void PTTRF(const OrdinalType &n, MagnitudeType *d, ScalarType *e, OrdinalType *info) const
Computes the L*D*L' factorization of a Hermitian/symmetric positive definite tridiagonal matrix A.
void TRSEN(const char &JOB, const char &COMPQ, const OrdinalType *SELECT, const OrdinalType &n, ScalarType *T, const OrdinalType &ldt, ScalarType *Q, const OrdinalType &ldq, MagnitudeType *WR, MagnitudeType *WI, OrdinalType *M, ScalarType *S, MagnitudeType *SEP, ScalarType *WORK, const OrdinalType &lwork, OrdinalType *IWORK, const OrdinalType &liwork, OrdinalType *info) const
void GESV(const OrdinalType &n, const OrdinalType &nrhs, ScalarType *A, const OrdinalType &lda, OrdinalType *IPIV, ScalarType *B, const OrdinalType &ldb, OrdinalType *info) const
Computes the solution to a real system of linear equations A*X=B, where A is factored through GETRF a...
void GBTRS(const char &TRANS, const OrdinalType &n, const OrdinalType &kl, const OrdinalType &ku, const OrdinalType &nrhs, const ScalarType *A, const OrdinalType &lda, const OrdinalType *IPIV, ScalarType *B, const OrdinalType &ldb, OrdinalType *info) const
Solves a system of linear equations A*X=B or A'*X=B with a general banded n by n matrix A using the L...
void LARNV(const OrdinalType &idist, OrdinalType *seed, const OrdinalType &n, ScalarType *v) const
Returns a vector of random numbers from a chosen distribution.
void TRTRI(const char &UPLO, const char &DIAG, const OrdinalType &n, ScalarType *A, const OrdinalType &lda, OrdinalType *info) const
Computes the inverse of an upper or lower triangular matrix A.
void GGES(const char &JOBVL, const char &JOBVR, const char &SORT, OrdinalType &(*ptr2func)(ScalarType *, ScalarType *, ScalarType *), const OrdinalType &n, ScalarType *A, const OrdinalType &lda, ScalarType *B, const OrdinalType &ldb, OrdinalType *sdim, MagnitudeType *ALPHAR, MagnitudeType *ALPHAI, MagnitudeType *BETA, ScalarType *VL, const OrdinalType &ldvl, ScalarType *VR, const OrdinalType &ldvr, ScalarType *WORK, const OrdinalType &lwork, OrdinalType *BWORK, OrdinalType *info) const
void POSV(const char &UPLO, const OrdinalType &n, const OrdinalType &nrhs, ScalarType *A, const OrdinalType &lda, ScalarType *B, const OrdinalType &ldb, OrdinalType *info) const
Computes the solution to a real system of linear equations A*X=B, where A is a symmetric positive def...
OrdinalType ILAENV(const OrdinalType &ispec, const std::string &NAME, const std::string &OPTS, const OrdinalType &N1=-1, const OrdinalType &N2=-1, const OrdinalType &N3=-1, const OrdinalType &N4=-1) const
Chooses problem-dependent parameters for the local environment.
void GETRF(const OrdinalType &m, const OrdinalType &n, ScalarType *A, const OrdinalType &lda, OrdinalType *IPIV, OrdinalType *info) const
Computes an LU factorization of a general m by n matrix A using partial pivoting with row interchange...
void LASCL(const char &TYPE, const OrdinalType &kl, const OrdinalType &ku, const MagnitudeType cfrom, const MagnitudeType cto, const OrdinalType &m, const OrdinalType &n, ScalarType *A, const OrdinalType &lda, OrdinalType *info) const
Multiplies the m by n matrix A by the real scalar cto/cfrom.
void GECON(const char &NORM, const OrdinalType &n, const ScalarType *A, const OrdinalType &lda, const ScalarType &anorm, ScalarType *rcond, ScalarType *WORK, OrdinalType *IWORK, OrdinalType *info) const
Estimates the reciprocal of the condition number of a general real matrix A, in either the 1-norm or ...
void GERFS(const char &TRANS, const OrdinalType &n, const OrdinalType &nrhs, const ScalarType *A, const OrdinalType &lda, const ScalarType *AF, const OrdinalType &ldaf, const OrdinalType *IPIV, const ScalarType *B, const OrdinalType &ldb, ScalarType *X, const OrdinalType &ldx, ScalarType *FERR, ScalarType *BERR, ScalarType *WORK, OrdinalType *IWORK, OrdinalType *info) const
Improves the computed solution to a system of linear equations and provides error bounds and backward...
void GTTRS(const char &TRANS, const OrdinalType &n, const OrdinalType &nrhs, const ScalarType *dl, const ScalarType *d, const ScalarType *du, const ScalarType *du2, const OrdinalType *IPIV, ScalarType *B, const OrdinalType &ldb, OrdinalType *info) const
Solves a system of linear equations A*X=B or A'*X=B or A^H*X=B with a tridiagonal matrix A using the ...
void SYTRD(const char &UPLO, const OrdinalType &n, ScalarType *A, const OrdinalType &lda, ScalarType *D, ScalarType *E, ScalarType *TAU, ScalarType *WORK, const OrdinalType &lwork, OrdinalType *info) const
Reduces a real symmetric matrix A to tridiagonal form by orthogonal similarity transformations.
void GEBAK(const char &JOBZ, const char &SIDE, const OrdinalType &n, const OrdinalType &ilo, const OrdinalType &ihi, const MagnitudeType *scale, const OrdinalType &m, ScalarType *V, const OrdinalType &ldv, OrdinalType *info) const
Forms the left or right eigenvectors of a general matrix that has been balanced by GEBAL by backward ...
void GEQP3(const OrdinalType &m, const OrdinalType &n, ScalarType *A, const OrdinalType &lda, OrdinalType *jpvt, ScalarType *TAU, ScalarType *WORK, const OrdinalType &lwork, MagnitudeType *RWORK, OrdinalType *info) const
Computes a QR factorization with column pivoting of a matrix A: A*P = Q*R using Level 3 BLAS.
void TGEVC(const char &SIDE, const char &HOWMNY, const OrdinalType *SELECT, const OrdinalType &n, const ScalarType *S, const OrdinalType &lds, const ScalarType *P, const OrdinalType &ldp, ScalarType *VL, const OrdinalType &ldvl, ScalarType *VR, const OrdinalType &ldvr, const OrdinalType &mm, OrdinalType *M, ScalarType *WORK, OrdinalType *info) const
void SYEV(const char &JOBZ, const char &UPLO, const OrdinalType &n, ScalarType *A, const OrdinalType &lda, ScalarType *W, ScalarType *WORK, const OrdinalType &lwork, OrdinalType *info) const
Computes all the eigenvalues and, optionally, eigenvectors of a symmetric n by n matrix A.
void GEQRF(const OrdinalType &m, const OrdinalType &n, ScalarType *A, const OrdinalType &lda, ScalarType *TAU, ScalarType *WORK, const OrdinalType &lwork, OrdinalType *info) const
Computes a QR factorization of a general m by n matrix A.
void POTRF(const char &UPLO, const OrdinalType &n, ScalarType *A, const OrdinalType &lda, OrdinalType *info) const
Computes Cholesky factorization of a real symmetric positive definite matrix A.
void GETRS(const char &TRANS, const OrdinalType &n, const OrdinalType &nrhs, const ScalarType *A, const OrdinalType &lda, const OrdinalType *IPIV, ScalarType *B, const OrdinalType &ldb, OrdinalType *info) const
Solves a system of linear equations A*X=B or A'*X=B with a general n by n matrix A using the LU facto...
void TREVC(const char &SIDE, const char &HOWMNY, OrdinalType *select, const OrdinalType &n, const ScalarType *T, const OrdinalType &ldt, ScalarType *VL, const OrdinalType &ldvl, ScalarType *VR, const OrdinalType &ldvr, const OrdinalType &mm, OrdinalType *m, ScalarType *WORK, OrdinalType *info) const
void SPEV(const char &JOBZ, const char &UPLO, const OrdinalType &n, ScalarType *AP, ScalarType *W, ScalarType *Z, const OrdinalType &ldz, ScalarType *WORK, OrdinalType *info) const
Computes the eigenvalues and, optionally, eigenvectors of a symmetric n by n matrix A in packed stora...
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
Macro for throwing an exception with breakpointing to ease debugging.
The Teuchos namespace contains all of the classes, structs and enums used by Teuchos,...
This structure defines some basic traits for a scalar field type.