Teuchos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Teuchos_LAPACK.hpp
Go to the documentation of this file.
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 #ifndef _TEUCHOS_LAPACK_HPP_
11 #define _TEUCHOS_LAPACK_HPP_
12 
20 #include "Teuchos_ConfigDefs.hpp"
21 #include "Teuchos_ScalarTraits.hpp"
22 
53 namespace Teuchos
54 {
55 
56  template<class T>
58  {
59  // This function should not compile if there is an attempt to instantiate!
60  static inline T notDefined() { return T::LAPACK_routine_not_defined_for_this_type(); }
61  };
62 
63  template<typename OrdinalType, typename ScalarType>
64  class LAPACK
65  {
66  public:
67 
69 
71 
72 
74  inline LAPACK(void) {}
75 
77  inline LAPACK(const LAPACK<OrdinalType, ScalarType>& lapack) {}
78 
80  inline virtual ~LAPACK(void) {}
82 
84 
85 
87  void PTTRF(const OrdinalType& n, MagnitudeType* d, ScalarType* e, OrdinalType* info) const;
88 
90  void PTTRS(const OrdinalType& n, const OrdinalType& nrhs, const MagnitudeType* d, const ScalarType* e, ScalarType* B, const OrdinalType& ldb, OrdinalType* info) const;
91 
93  void POTRF(const char& UPLO, const OrdinalType& n, ScalarType* A, const OrdinalType& lda, OrdinalType* info) const;
94 
96  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;
97 
99  void POTRI(const char& UPLO, const OrdinalType& n, ScalarType* A, const OrdinalType& lda, OrdinalType* info) const;
100 
102  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;
103 
105  void POSV(const char& UPLO, const OrdinalType& n, const OrdinalType& nrhs, ScalarType* A, const OrdinalType& lda, ScalarType* B, const OrdinalType& ldb, OrdinalType* info) const;
106 
108  void POEQU(const OrdinalType& n, const ScalarType* A, const OrdinalType& lda, MagnitudeType* S, MagnitudeType* scond, MagnitudeType* amax, OrdinalType* info) const;
109 
111  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;
112 
114  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;
116 
118 
119 
121  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;
122 
156  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;
157 
159  void GELSS(const OrdinalType& m, const OrdinalType& n, const OrdinalType& nrhs, ScalarType* A, const OrdinalType& lda, ScalarType* B, const OrdinalType& ldb, ScalarType* S, const ScalarType& rcond, OrdinalType* rank, ScalarType* WORK, const OrdinalType& lwork, OrdinalType* info) const;
160 
162  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;
163 
165  void GEQRF (const OrdinalType& m, const OrdinalType& n, ScalarType* A, const OrdinalType& lda, ScalarType* TAU, ScalarType* WORK, const OrdinalType& lwork, OrdinalType* info) const;
166 
168  void GEQR2 (const OrdinalType& m, const OrdinalType& n, ScalarType* A, const OrdinalType& lda, ScalarType* TAU, ScalarType* WORK, OrdinalType* const info) const;
169 
171  void GETRF(const OrdinalType& m, const OrdinalType& n, ScalarType* A, const OrdinalType& lda, OrdinalType* IPIV, OrdinalType* info) const;
172 
174  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;
175 
177  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;
178 
180  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;
181 
183  void LASWP (const OrdinalType& N, ScalarType* A, const OrdinalType& LDA, const OrdinalType& K1, const OrdinalType& K2, const OrdinalType* IPIV, const OrdinalType& INCX) const;
184 
186  void GBTRF(const OrdinalType& m, const OrdinalType& n, const OrdinalType& kl, const OrdinalType& ku, ScalarType* A, const OrdinalType& lda, OrdinalType* IPIV, OrdinalType* info) const;
187 
189  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;
190 
192  void GTTRF(const OrdinalType& n, ScalarType* dl, ScalarType* d, ScalarType* du, ScalarType* du2, OrdinalType* IPIV, OrdinalType* info) const;
193 
195  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;
196 
198  void GETRI(const OrdinalType& n, ScalarType* A, const OrdinalType& lda, const OrdinalType* IPIV, ScalarType* WORK, const OrdinalType& lwork, OrdinalType* info) const;
199 
204  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;
205 
207  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;
208 
210  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;
211 
213  typename 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;
214 
216  void GESV(const OrdinalType& n, const OrdinalType& nrhs, ScalarType* A, const OrdinalType& lda, OrdinalType* IPIV, ScalarType* B, const OrdinalType& ldb, OrdinalType* info) const;
217 
219  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;
220 
222  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;
223 
225  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;
226 
228  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;
229 
231 
232  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;
233 
237  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;
238 
240  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;
241 
243  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;
244 
246  void TRTRI(const char& UPLO, const char& DIAG, const OrdinalType& n, ScalarType* A, const OrdinalType& lda, OrdinalType* info) const;
248 
250 
251 
254  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;
255 
259  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;
260 
264  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;
265 
269  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;
270 
274  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;
275 
277  void STEQR(const char& COMPZ, const OrdinalType& n, MagnitudeType* D, MagnitudeType* E, ScalarType* Z, const OrdinalType& ldz, MagnitudeType* WORK, OrdinalType* info) const;
278 
280  void PTEQR(const char& COMPZ, const OrdinalType& n, MagnitudeType* D, MagnitudeType* E, ScalarType* Z, const OrdinalType& ldz, MagnitudeType* WORK, OrdinalType* info) const;
282 
284 
285  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;
287 
291  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;
292 
296  void GEES(const char& JOBVS, const char& SORT, OrdinalType& (*ptr2func)(ScalarType*), const OrdinalType& n, ScalarType* A, const OrdinalType& lda, OrdinalType* sdim, ScalarType* W, ScalarType* VS, const OrdinalType& ldvs, ScalarType* WORK, const OrdinalType& lwork, MagnitudeType* RWORK, OrdinalType* BWORK, OrdinalType* info) const;
297 
301  void GEES(const char& JOBVS, const OrdinalType& n, ScalarType* A, const OrdinalType& lda, OrdinalType* sdim, MagnitudeType* WR, MagnitudeType* WI, ScalarType* VS, const OrdinalType& ldvs, ScalarType* WORK, const OrdinalType& lwork, MagnitudeType* RWORK, OrdinalType* BWORK, OrdinalType* info) const;
302 
308  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;
309 
314  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;
315 
320  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;
321 
325  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;
326 
327 
331  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;
332 
333 
336  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;
337 
338 
341  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;
342 
344 
345 
347 
348  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;
351 
352 
354 
355 
365  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;
366 
372  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;
373 
382  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;
383 
388  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;
389 
399  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;
400 
409  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;
410 
414  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;
415 
419  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;
421 
423 
424 
427  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;
428 
432  void TREVC(const char& SIDE, 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, MagnitudeType* RWORK, OrdinalType* info) const;
433 
437  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;
438 
442  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;
443 
444 
446 
448 
449 
451  void LARTG( const ScalarType& f, const ScalarType& g, MagnitudeType* c, ScalarType* s, ScalarType* r ) const;
452 
454  void LARFG( const OrdinalType& n, ScalarType* alpha, ScalarType* x, const OrdinalType& incx, ScalarType* tau ) const;
455 
457 
459 
460 
462 
463  void GEBAL(const char& JOBZ, const OrdinalType& n, ScalarType* A, const OrdinalType& lda, OrdinalType* ilo, OrdinalType* ihi, MagnitudeType* scale, OrdinalType* info) const;
464 
466  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;
467 
469 
471 
472  ScalarType LARND( const OrdinalType& idist, OrdinalType* seed ) const;
474 
476  void LARNV( const OrdinalType& idist, OrdinalType* seed, const OrdinalType& n, ScalarType* v ) const;
478 
480 
481 
484  ScalarType LAMCH(const char& CMACH) const;
485 
490  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;
492 
494 
495 
498  ScalarType LAPY2(const ScalarType& x, const ScalarType& y) const;
500  };
501 
502  // END GENERAL TEMPLATE DECLARATION //
503 
504  // BEGIN GENERAL TEMPLATE IMPLEMENTATION //
505 
506 
507  template<typename OrdinalType, typename ScalarType>
508  void LAPACK<OrdinalType, ScalarType>::PTTRF(const OrdinalType& n, MagnitudeType* d, ScalarType* e, OrdinalType* info) const
509  {
511  }
512 
513  template<typename OrdinalType, typename ScalarType>
514  void LAPACK<OrdinalType, ScalarType>::PTTRS(const OrdinalType& n, const OrdinalType& nrhs, const MagnitudeType* d, const ScalarType* e, ScalarType* B, const OrdinalType& ldb, OrdinalType* info) const
515  {
517  }
518 
519  template<typename OrdinalType, typename ScalarType>
520  void LAPACK<OrdinalType, ScalarType>::POTRF(const char& UPLO, const OrdinalType& n, ScalarType* A, const OrdinalType& lda, OrdinalType* info) const
521  {
523  }
524 
525  template<typename OrdinalType, typename ScalarType>
526  void LAPACK<OrdinalType, ScalarType>::POTRS(const char& UPLO, const OrdinalType& n, const OrdinalType& nrhs, const ScalarType* A, const OrdinalType& lda, ScalarType* B, const OrdinalType& ldb, OrdinalType* info) const
527  {
529  }
530 
531  template<typename OrdinalType, typename ScalarType>
532  void LAPACK<OrdinalType, ScalarType>::POTRI(const char& UPLO, const OrdinalType& n, ScalarType* A, const OrdinalType& lda, OrdinalType* info) const
533  {
535  }
536 
537  template<typename OrdinalType, typename ScalarType>
538  void LAPACK<OrdinalType, ScalarType>::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
539  {
541  }
542 
543  template<typename OrdinalType, typename ScalarType>
544  void LAPACK<OrdinalType, ScalarType>::POSV(const char& UPLO, const OrdinalType& n, const OrdinalType& nrhs, ScalarType* A, const OrdinalType& lda, ScalarType* B, const OrdinalType& ldb, OrdinalType* info) const
545  {
547  }
548 
549  template<typename OrdinalType, typename ScalarType>
550  void LAPACK<OrdinalType, ScalarType>::POEQU(const OrdinalType& n, const ScalarType* A, const OrdinalType& lda, MagnitudeType* S, MagnitudeType* scond, MagnitudeType* amax, OrdinalType* info) const
551  {
552  // Test the input parameters
553  *info = 0;
554  if (n < 0) {
555  *info = -1;
556  } else if (lda < TEUCHOS_MAX(1, n)) {
557  *info = -3;
558  }
559  if (*info != 0) {
560  return;
561  }
562 
563  ScalarType sZero = ScalarTraits<ScalarType>::zero();
564  ScalarType sOne = ScalarTraits<ScalarType>::one();
565  MagnitudeType mZero = ScalarTraits<ScalarType>::magnitude(sZero);
566  MagnitudeType mOne = ScalarTraits<ScalarType>::magnitude(sOne);
567 
568  // Quick return
569  if (n == 0) {
570  *scond = mOne;
571  *amax = mZero;
572  return;
573  }
574 
575  // Find the minimum and maximum diagonal elements
577  MagnitudeType smin = S[0];
578  *amax = S[0];
579  for (OrdinalType i=0; i<n; ++i) {
580  S[i] = ScalarTraits<ScalarType>::magnitude( A[i*lda + i] );
581  smin = TEUCHOS_MIN( smin, S[i] );
582  *amax = TEUCHOS_MAX( *amax, S[i] );
583  }
584 
585  if (smin < mZero) {
586  // Find the first non-positve diagonal element and return an error code
587  for (OrdinalType i=0; i<n; ++i) {
588  if (S[i] < mZero)
589  *info = i;
590  }
591  } else {
592  // Set the scale factors to the reciprocals of the diagonal elements
593  for (OrdinalType i=0; i<n; ++i) {
594  S[i] = mOne / ScalarTraits<ScalarType>::squareroot( S[i] );
595  }
596  // Compute scond = min(S(i)) / max(S(i))
598  }
599  }
600 
601  template<typename OrdinalType, typename ScalarType>
602  void LAPACK<OrdinalType, ScalarType>::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
603  {
605  }
606 
607  template<typename OrdinalType, typename ScalarType>
608  void LAPACK<OrdinalType, ScalarType>::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
609  {
611  }
612 
613  template<typename OrdinalType, typename ScalarType>
614  void LAPACK<OrdinalType,ScalarType>::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
615  {
617  }
618 
619  template<typename OrdinalType, typename ScalarType>
620  void LAPACK<OrdinalType, ScalarType>::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
621  {
623  }
624 
625  template<typename OrdinalType, typename ScalarType>
626  void LAPACK<OrdinalType,ScalarType>::GELSS(const OrdinalType& m, const OrdinalType& n, const OrdinalType& nrhs, ScalarType* A, const OrdinalType& lda, ScalarType* B, const OrdinalType& ldb, ScalarType* S, const ScalarType& rcond, OrdinalType* rank, ScalarType* WORK, const OrdinalType& lwork, OrdinalType* info) const
627  {
629  }
630 
631  template<typename OrdinalType, typename ScalarType>
632  void LAPACK<OrdinalType,ScalarType>::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
633  {
635  }
636 
637  template<typename OrdinalType, typename ScalarType>
638  void LAPACK<OrdinalType,ScalarType>::GEQRF( const OrdinalType& m, const OrdinalType& n, ScalarType* A, const OrdinalType& lda, ScalarType* TAU, ScalarType* WORK, const OrdinalType& lwork, OrdinalType* info) const
639  {
641  }
642 
643  template<typename OrdinalType, typename ScalarType>
644  void LAPACK<OrdinalType,ScalarType>::GEQR2 (const OrdinalType& m, const OrdinalType& n, ScalarType* A, const OrdinalType& lda, ScalarType* TAU, ScalarType* WORK, OrdinalType* const info) const
645  {
647  }
648 
649  template<typename OrdinalType, typename ScalarType>
650  void LAPACK<OrdinalType,ScalarType>::GETRF(const OrdinalType& m, const OrdinalType& n, ScalarType* A, const OrdinalType& lda, OrdinalType* IPIV, OrdinalType* info) const
651  {
653  }
654 
655  template<typename OrdinalType, typename ScalarType>
656  void LAPACK<OrdinalType,ScalarType>::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
657  {
659  }
660 
661  template<typename OrdinalType, typename ScalarType>
662  void LAPACK<OrdinalType,ScalarType>::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
663  {
664  MagnitudeType safeMin = ScalarTraits<ScalarType>::sfmin();
665  ScalarType sZero = ScalarTraits<ScalarType>::zero();
666  ScalarType sOne = ScalarTraits<ScalarType>::one();
667  MagnitudeType mZero = ScalarTraits<ScalarType>::magnitude(sZero);
668  MagnitudeType mOne = ScalarTraits<ScalarType>::magnitude(sOne);
669 
670  MagnitudeType smlnum = ScalarTraits<ScalarType>::magnitude(safeMin);
671  MagnitudeType bignum = ScalarTraits<ScalarType>::magnitude(sOne/smlnum);
672 
673  OrdinalType i, j;
674  ScalarType* ptr;
675  MagnitudeType mul;
676  bool done = false;
677 
678  MagnitudeType cfromc = cfrom;
679  MagnitudeType ctoc = cto;
680  MagnitudeType cfrom1;
681  MagnitudeType cto1;
682 
683  while (!done) {
684 
685  cfrom1 = cfromc*smlnum;
686  if (cfrom1 == cfromc) {
687  // cfromc is an inf. Multiply by a correctly signed zero for finite ctoc, or a NaN if ctoc is infinite.
688  mul = ctoc / cfromc;
689  done = true;
690  cto1 = ctoc;
691  } else {
692  cto1 = ctoc / bignum;
693  if (cto1 == ctoc) {
694  // ctoc is either 0 or an inf. In both cases, ctoc itself serves as the correct multiplication factor.
695  mul = ctoc;
696  done = true;
697  cfromc = mOne;
698  } else if (ScalarTraits<ScalarType>::magnitude(cfrom1) > ScalarTraits<ScalarType>::magnitude(ctoc) && ctoc != mZero) {
699  mul = smlnum;
700  done = false;
701  cfromc = cfrom1;
703  mul = bignum;
704  done = false;
705  ctoc = cto1;
706  } else {
707  mul = ctoc / cfromc;
708  done = true;
709  }
710  }
711 
712  for (j=0; j<n; j++) {
713  ptr = A + j*lda;
714  for (i=0; i<m; i++) { *ptr = mul * (*ptr); ptr++; }
715  }
716  }
717 
718  }
719 
720  template<typename OrdinalType, typename ScalarType>
721  void LAPACK<OrdinalType,ScalarType>::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
722  {
724  }
725 
726  template<typename OrdinalType, typename ScalarType>
727  void LAPACK<OrdinalType, ScalarType>::LASWP (const OrdinalType& N, ScalarType* A, const OrdinalType& LDA, const OrdinalType& K1, const OrdinalType& K2, const OrdinalType* IPIV, const OrdinalType& INCX) const
728  {
730  }
731 
732  template<typename OrdinalType, typename ScalarType>
733  void LAPACK<OrdinalType,ScalarType>::GBTRF(const OrdinalType& m, const OrdinalType& n, const OrdinalType& kl, const OrdinalType& ku, ScalarType* A, const OrdinalType& lda, OrdinalType* IPIV, OrdinalType* info) const
734  {
736  }
737 
738  template<typename OrdinalType, typename ScalarType>
739  void LAPACK<OrdinalType,ScalarType>::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
740  {
742  }
743 
744  template<typename OrdinalType, typename ScalarType>
745  void LAPACK<OrdinalType,ScalarType>::GTTRF(const OrdinalType& n, ScalarType* dl, ScalarType* d, ScalarType* du, ScalarType* du2, OrdinalType* IPIV, OrdinalType* info) const
746  {
748  }
749 
750  template<typename OrdinalType, typename ScalarType>
751  void LAPACK<OrdinalType,ScalarType>::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
752  {
754  }
755 
756  template<typename OrdinalType, typename ScalarType>
757  void LAPACK<OrdinalType,ScalarType>::GETRI(const OrdinalType& n, ScalarType* A, const OrdinalType& lda, const OrdinalType* IPIV, ScalarType* WORK, const OrdinalType& lwork, OrdinalType* info) const
758  {
760  }
761 
762  template<typename OrdinalType, typename ScalarType>
763  void LAPACK<OrdinalType,ScalarType>::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
764  {
766  }
767 
768  template<typename OrdinalType, typename ScalarType>
769  void LAPACK<OrdinalType,ScalarType>::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
770  {
772  }
773 
774  template<typename OrdinalType, typename ScalarType>
775  void LAPACK<OrdinalType,ScalarType>::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
776  {
778  }
779 
780  template<typename OrdinalType, typename ScalarType>
781  typename ScalarTraits<ScalarType>::magnitudeType LAPACK<OrdinalType,ScalarType>::LANGB(const char& NORM, const OrdinalType& n, const OrdinalType& kl, const OrdinalType& ku, const ScalarType* A, const OrdinalType& lda, MagnitudeType* WORK) const
782  {
784  }
785 
786  template<typename OrdinalType, typename ScalarType>
787  void LAPACK<OrdinalType,ScalarType>::GESV(const OrdinalType& n, const OrdinalType& nrhs, ScalarType* A, const OrdinalType& lda, OrdinalType* IPIV, ScalarType* B, const OrdinalType& ldb, OrdinalType* info) const
788  {
790  }
791 
792  template<typename OrdinalType, typename ScalarType>
793  void LAPACK<OrdinalType,ScalarType>::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
794  {
795 
796  // Test the input parameters
797  *info = 0;
798  if (m < 0) {
799  *info = -1;
800  } else if (n < 0) {
801  *info = -2;
802  } else if (lda < TEUCHOS_MAX(1, m)) {
803  *info = -4;
804  }
805  if (*info != 0) {
806  return;
807  }
808 
809  ScalarType sZero = ScalarTraits<ScalarType>::zero();
810  ScalarType sOne = ScalarTraits<ScalarType>::one();
811  MagnitudeType mZero = ScalarTraits<ScalarType>::magnitude(sZero);
812  MagnitudeType mOne = ScalarTraits<ScalarType>::magnitude(sOne);
813 
814  // Quick return
815  if (m == 0 || n == 0) {
816  *rowcond = mOne;
817  *colcond = mOne;
818  *amax = mZero;
819  return;
820  }
821 
822  MagnitudeType safeMin = ScalarTraits<ScalarType>::sfmin();
823  MagnitudeType smlnum = ScalarTraits<ScalarType>::magnitude(safeMin);
824  MagnitudeType bignum = ScalarTraits<ScalarType>::magnitude(sOne/smlnum);
825 
826  // Compute the row scale factors
827  for (OrdinalType i=0; i<m; i++) {
828  R[i] = mZero;
829  }
830 
831  // Find the maximum element in each row
832  for (OrdinalType j=0; j<n; j++) {
833  for (OrdinalType i=0; i<m; i++) {
834  R[i] = TEUCHOS_MAX( R[i], ScalarTraits<ScalarType>::magnitude( A[j*lda + i] ) );
835  }
836  }
837 
838  // Find the maximum and minimum scale factors
839  MagnitudeType rcmin = bignum;
840  MagnitudeType rcmax = mZero;
841  for (OrdinalType i=0; i<m; i++) {
842  rcmax = TEUCHOS_MAX( rcmax, R[i] );
843  rcmin = TEUCHOS_MIN( rcmin, R[i] );
844  }
845  *amax = rcmax;
846 
847  if (rcmin == mZero) {
848  // Find the first zero scale factor and return an error code
849  for (OrdinalType i=0; i<m; i++) {
850  if (R[i] == mZero)
851  *info = i;
852  }
853  } else {
854  // Invert the scale factors
855  for (OrdinalType i=0; i<m; i++) {
856  R[i] = mOne / TEUCHOS_MIN( TEUCHOS_MAX( R[i], smlnum ), bignum );
857  }
858  // Compute rowcond = min(R(i)) / max(R(i))
859  *rowcond = TEUCHOS_MAX( rcmin, smlnum ) / TEUCHOS_MIN( rcmax, bignum );
860  }
861 
862  // Compute the column scale factors
863  for (OrdinalType j=0; j<n; j++) {
864  C[j] = mZero;
865  }
866 
867  // Find the maximum element in each column, assuming the row scaling computed above
868  for (OrdinalType j=0; j<n; j++) {
869  for (OrdinalType i=0; i<m; i++) {
870  C[j] = TEUCHOS_MAX( C[j], R[i]*ScalarTraits<ScalarType>::magnitude( A[j*lda + i] ) );
871  }
872  }
873 
874  // Find the maximum and minimum scale factors
875  rcmin = bignum;
876  rcmax = mZero;
877  for (OrdinalType j=0; j<n; j++) {
878  rcmax = TEUCHOS_MAX( rcmax, C[j] );
879  rcmin = TEUCHOS_MIN( rcmin, C[j] );
880  }
881 
882  if (rcmin == mZero) {
883  // Find the first zero scale factor and return an error code
884  for (OrdinalType j=0; j<n; j++) {
885  if (C[j] == mZero)
886  *info = m+j;
887  }
888  } else {
889  // Invert the scale factors
890  for (OrdinalType j=0; j<n; j++) {
891  C[j] = mOne / TEUCHOS_MIN( TEUCHOS_MAX( C[j], smlnum ), bignum );
892  }
893  // Compute colcond = min(C(j)) / max(C(j))
894  *colcond = TEUCHOS_MAX( rcmin, smlnum ) / TEUCHOS_MIN( rcmax, bignum );
895  }
896  }
897 
898  template<typename OrdinalType, typename ScalarType>
899  void LAPACK<OrdinalType,ScalarType>::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
900  {
902  }
903 
904  template<typename OrdinalType, typename ScalarType>
905  void LAPACK<OrdinalType,ScalarType>::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
906  {
907 
908  // Test the input parameters
909  * info = 0;
910  if (m < 0) {
911  *info = -1;
912  } else if (n < 0) {
913  *info = -2;
914  } else if (kl < 0) {
915  *info = -3;
916  } else if (ku < 0) {
917  *info = -4;
918  } else if (lda < kl+ku+1) {
919  *info = -6;
920  }
921  if (*info != 0) {
922  return;
923  }
924 
925  ScalarType sZero = ScalarTraits<ScalarType>::zero();
926  ScalarType sOne = ScalarTraits<ScalarType>::one();
927  MagnitudeType mZero = ScalarTraits<ScalarType>::magnitude(sZero);
928  MagnitudeType mOne = ScalarTraits<ScalarType>::magnitude(sOne);
929 
930  // Quick return
931  if (m == 0 || n == 0) {
932  *rowcond = mOne;
933  *colcond = mOne;
934  *amax = mZero;
935  return;
936  }
937 
938  MagnitudeType safeMin = ScalarTraits<ScalarType>::sfmin();
939  MagnitudeType smlnum = ScalarTraits<ScalarType>::magnitude(safeMin);
940  MagnitudeType bignum = ScalarTraits<ScalarType>::magnitude(sOne/smlnum);
941 
942  // Compute the row scale factors
943  for (OrdinalType i=0; i<m; i++) {
944  R[i] = mZero;
945  }
946 
947  // Find the maximum element in each row
948  for (OrdinalType j=0; j<n; j++) {
949  for (OrdinalType i=TEUCHOS_MAX(j-ku,0); i<TEUCHOS_MIN(j+kl,m-1); i++) {
950  R[i] = TEUCHOS_MAX( R[i], ScalarTraits<ScalarType>::magnitude( A[j*lda + ku+i-j] ) );
951  }
952  }
953 
954  // Find the maximum and minimum scale factors
955  MagnitudeType rcmin = bignum;
956  MagnitudeType rcmax = mZero;
957  for (OrdinalType i=0; i<m; i++) {
958  rcmax = TEUCHOS_MAX( rcmax, R[i] );
959  rcmin = TEUCHOS_MIN( rcmin, R[i] );
960  }
961  *amax = rcmax;
962 
963  if (rcmin == mZero) {
964  // Find the first zero scale factor and return an error code
965  for (OrdinalType i=0; i<m; i++) {
966  if (R[i] == mZero)
967  *info = i;
968  }
969  } else {
970  // Invert the scale factors
971  for (OrdinalType i=0; i<m; i++) {
972  R[i] = mOne / TEUCHOS_MIN( TEUCHOS_MAX( R[i], smlnum ), bignum );
973  }
974  // Compute rowcond = min(R(i)) / max(R(i))
975  *rowcond = TEUCHOS_MAX( rcmin, smlnum ) / TEUCHOS_MIN( rcmax, bignum );
976  }
977 
978  // Compute the column scale factors
979  for (OrdinalType j=0; j<n; j++) {
980  C[j] = mZero;
981  }
982 
983  // Find the maximum element in each column, assuming the row scaling computed above
984  for (OrdinalType j=0; j<n; j++) {
985  for (OrdinalType i=TEUCHOS_MAX(j-ku,0); i<TEUCHOS_MIN(j+kl,m-1); i++) {
986  C[j] = TEUCHOS_MAX( C[j], R[i]*ScalarTraits<ScalarType>::magnitude( A[j*lda + ku+i-j] ) );
987  }
988  }
989 
990  // Find the maximum and minimum scale factors
991  rcmin = bignum;
992  rcmax = mZero;
993  for (OrdinalType j=0; j<n; j++) {
994  rcmax = TEUCHOS_MAX( rcmax, C[j] );
995  rcmin = TEUCHOS_MIN( rcmin, C[j] );
996  }
997 
998  if (rcmin == mZero) {
999  // Find the first zero scale factor and return an error code
1000  for (OrdinalType j=0; j<n; j++) {
1001  if (C[j] == mZero)
1002  *info = m+j;
1003  }
1004  } else {
1005  // Invert the scale factors
1006  for (OrdinalType j=0; j<n; j++) {
1007  C[j] = mOne / TEUCHOS_MIN( TEUCHOS_MAX( C[j], smlnum ), bignum );
1008  }
1009  // Compute colcond = min(C(j)) / max(C(j))
1010  *colcond = TEUCHOS_MAX( rcmin, smlnum ) / TEUCHOS_MIN( rcmax, bignum );
1011  }
1012  }
1013 
1014  template<typename OrdinalType, typename ScalarType>
1015  void LAPACK<OrdinalType,ScalarType>::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
1016  {
1018  }
1019 
1020  template<typename OrdinalType, typename ScalarType>
1021  void LAPACK<OrdinalType,ScalarType>::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
1022  {
1024  }
1025 
1026  template<typename OrdinalType, typename ScalarType>
1027  void LAPACK<OrdinalType,ScalarType>::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
1028  {
1030  }
1031 
1032  template<typename OrdinalType, typename ScalarType>
1033  void LAPACK<OrdinalType,ScalarType>::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
1034  {
1036  }
1037 
1038  template<typename OrdinalType, typename ScalarType>
1039  void LAPACK<OrdinalType,ScalarType>::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
1040  {
1042  }
1043 
1044  template<typename OrdinalType, typename ScalarType>
1045  void LAPACK<OrdinalType,ScalarType>::TRTRI(const char& UPLO, const char& DIAG, const OrdinalType& n, ScalarType* A, const OrdinalType& lda, OrdinalType* info) const
1046  {
1048  }
1049 
1050  template<typename OrdinalType, typename ScalarType>
1051  void LAPACK<OrdinalType,ScalarType>::SPEV(const char& JOBZ, const char& UPLO, const OrdinalType& n, ScalarType* AP, ScalarType* W, ScalarType* Z, const OrdinalType& ldz, ScalarType* WORK, OrdinalType* info) const
1052  {
1054  }
1055 
1056  template<typename OrdinalType, typename ScalarType>
1057  void LAPACK<OrdinalType,ScalarType>::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
1058  {
1060  }
1061 
1062  template<typename OrdinalType, typename ScalarType>
1063  void LAPACK<OrdinalType,ScalarType>::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
1064  {
1066  }
1067 
1068  template<typename OrdinalType, typename ScalarType>
1069  void LAPACK<OrdinalType,ScalarType>::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
1070  {
1072  }
1073 
1074  template<typename OrdinalType, typename ScalarType>
1075  void LAPACK<OrdinalType,ScalarType>::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
1076  {
1078  }
1079 
1080  template<typename OrdinalType, typename ScalarType>
1081  void LAPACK<OrdinalType,ScalarType>::STEQR(const char& COMPZ, const OrdinalType& n, MagnitudeType* D, MagnitudeType* E, ScalarType* Z, const OrdinalType& ldz, MagnitudeType* WORK, OrdinalType* info) const
1082  {
1084  }
1085 
1086  template<typename OrdinalType, typename ScalarType>
1087  void LAPACK<OrdinalType,ScalarType>::PTEQR(const char& COMPZ, const OrdinalType& n, MagnitudeType* D, MagnitudeType* E, ScalarType* Z, const OrdinalType& ldz, MagnitudeType* WORK, OrdinalType* info) const
1088  {
1090  }
1091 
1092  template<typename OrdinalType, typename ScalarType>
1093  void LAPACK<OrdinalType, ScalarType>::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
1094  {
1096  }
1097 
1098  template<typename OrdinalType, typename ScalarType>
1099  void LAPACK<OrdinalType, ScalarType>::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
1100  {
1102  }
1103 
1104  template<typename OrdinalType, typename ScalarType>
1105  void LAPACK<OrdinalType, ScalarType>::GEES(const char& JOBVS, const char& SORT, OrdinalType& (*ptr2func)(ScalarType*), const OrdinalType& n, ScalarType* A, const OrdinalType& lda, OrdinalType* sdim, ScalarType* W, ScalarType* VS, const OrdinalType& ldvs, ScalarType* WORK, const OrdinalType& lwork, MagnitudeType *RWORK, OrdinalType* BWORK, OrdinalType* info) const
1106  {
1108  }
1109 
1110  template<typename OrdinalType, typename ScalarType>
1111  void LAPACK<OrdinalType, ScalarType>::GEES(const char& JOBVS, const OrdinalType& n, ScalarType* A, const OrdinalType& lda, OrdinalType* sdim, MagnitudeType* WR, MagnitudeType* WI, ScalarType* VS, const OrdinalType& ldvs, ScalarType* WORK, const OrdinalType& lwork, MagnitudeType *RWORK, OrdinalType* BWORK, OrdinalType* info) const
1112  {
1114  }
1115 
1116  template<typename OrdinalType, typename ScalarType>
1117  void LAPACK<OrdinalType, ScalarType>::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
1118  {
1120  }
1121 
1122  template<typename OrdinalType, typename ScalarType>
1123  void LAPACK<OrdinalType, ScalarType>::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
1124  {
1126  }
1127 
1128  template<typename OrdinalType, typename ScalarType>
1129  void LAPACK<OrdinalType, ScalarType>::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
1130  {
1132  }
1133 
1134  template<typename OrdinalType, typename ScalarType>
1135  void LAPACK<OrdinalType, ScalarType>::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
1136  {
1138  }
1139 
1140  template<typename OrdinalType, typename ScalarType>
1141  void LAPACK<OrdinalType, ScalarType>::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
1142  {
1144  }
1145 
1146 
1147  template<typename OrdinalType, typename ScalarType>
1148  void LAPACK<OrdinalType,ScalarType>::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
1149  {
1151  }
1152 
1153 
1154  template<typename OrdinalType, typename ScalarType>
1155  void LAPACK<OrdinalType,ScalarType>::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
1156  {
1158  }
1159 
1160 
1161  template<typename OrdinalType, typename ScalarType>
1162  void LAPACK<OrdinalType, ScalarType>::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
1163  {
1165  }
1166 
1167  template<typename OrdinalType, typename ScalarType>
1168  void LAPACK<OrdinalType, ScalarType>::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
1169  {
1171  }
1172 
1173  template<typename OrdinalType, typename ScalarType>
1174  void LAPACK<OrdinalType, ScalarType>::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
1175  {
1177  }
1178 
1179  template<typename OrdinalType, typename ScalarType>
1180  void LAPACK<OrdinalType, ScalarType>::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
1181  {
1183  }
1184 
1185  template<typename OrdinalType, typename ScalarType>
1186  void LAPACK<OrdinalType, ScalarType>::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
1187  {
1189  }
1190 
1191  template<typename OrdinalType, typename ScalarType>
1192  void LAPACK<OrdinalType, ScalarType>::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
1193  {
1195  }
1196 
1197  template<typename OrdinalType, typename ScalarType>
1198  void LAPACK<OrdinalType, ScalarType>::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
1199  {
1201  }
1202 
1203  template<typename OrdinalType, typename ScalarType>
1204  void LAPACK<OrdinalType, ScalarType>::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
1205  {
1207  }
1208 
1209  template<typename OrdinalType, typename ScalarType>
1210  void LAPACK<OrdinalType, ScalarType>::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
1211  {
1213  }
1214 
1215  template<typename OrdinalType, typename ScalarType>
1216  void LAPACK<OrdinalType, ScalarType>::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
1217  {
1219  }
1220 
1221  template<typename OrdinalType, typename ScalarType>
1222  void LAPACK<OrdinalType, ScalarType>::TREVC(const char& SIDE, 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, MagnitudeType* RWORK, OrdinalType* info) const
1223  {
1225  }
1226 
1227  template<typename OrdinalType, typename ScalarType>
1228  void LAPACK<OrdinalType, ScalarType>::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
1229  {
1231  }
1232 
1233 
1234  template<typename OrdinalType, typename ScalarType>
1235  void LAPACK<OrdinalType, ScalarType>::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
1236  {
1238  }
1239 
1240 
1241  template<typename OrdinalType, typename ScalarType>
1242  ScalarType LAPACK<OrdinalType, ScalarType>::LAMCH(const char& CMACH) const
1243  {
1245  }
1246 
1247  template<typename OrdinalType, typename ScalarType>
1248  OrdinalType LAPACK<OrdinalType, ScalarType>::ILAENV( const OrdinalType& ispec, const std::string& NAME, const std::string& OPTS, const OrdinalType& N1, const OrdinalType& N2, const OrdinalType& N3, const OrdinalType& N4 ) const
1249  {
1251  }
1252 
1253  template<typename OrdinalType, typename ScalarType>
1254  ScalarType LAPACK<OrdinalType, ScalarType>::LAPY2(const ScalarType& x, const ScalarType& y) const
1255  {
1257  }
1258 
1259  template<typename OrdinalType, typename ScalarType>
1260  void LAPACK<OrdinalType, ScalarType>::LARTG( const ScalarType& f, const ScalarType& g, MagnitudeType* c, ScalarType* s, ScalarType* r ) const
1261  {
1263  }
1264 
1265  template<typename OrdinalType, typename ScalarType>
1266  void LAPACK<OrdinalType, ScalarType>::LARFG( const OrdinalType& n, ScalarType* alpha, ScalarType* x, const OrdinalType& incx, ScalarType* tau ) const
1267  {
1269  }
1270 
1271  template<typename OrdinalType, typename ScalarType>
1272  void LAPACK<OrdinalType, ScalarType>::GEBAL( const char& JOBZ, const OrdinalType& n, ScalarType* A, const OrdinalType& lda, OrdinalType* ilo, OrdinalType* ihi, MagnitudeType* scale, OrdinalType* info ) const
1273  {
1275  }
1276 
1277 
1278  template<typename OrdinalType, typename ScalarType>
1279  void LAPACK<OrdinalType, ScalarType>::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
1280  {
1282  }
1283 
1284  template<typename OrdinalType, typename ScalarType>
1285  ScalarType LAPACK<OrdinalType, ScalarType>::LARND( const OrdinalType& idist, OrdinalType* seed ) const
1286  {
1288  }
1289 
1290  template<typename OrdinalType, typename ScalarType>
1291  void LAPACK<OrdinalType, ScalarType>::LARNV( const OrdinalType& idist, OrdinalType* seed, const OrdinalType& n, ScalarType* v ) const
1292  {
1294  }
1295 
1296  // END GENERAL TEMPLATE IMPLEMENTATION //
1297 
1298 #ifndef DOXYGEN_SHOULD_SKIP_THIS
1299 
1300  // BEGIN INT, FLOAT SPECIALIZATION DECLARATION //
1301 
1302  template<>
1303  class TEUCHOSNUMERICS_LIB_DLL_EXPORT LAPACK<int, float>
1304  {
1305  public:
1306  inline LAPACK(void) {}
1307  inline LAPACK(const LAPACK<int, float>& /*lapack*/) {}
1308  inline virtual ~LAPACK(void) {}
1309 
1310  // Symmetric positive definite linear system routines
1311  void PTTRF(const int& n, float* d, float* e, int* info) const;
1312  void PTTRS(const int& n, const int& nrhs, const float* d, const float* e, float* B, const int& ldb, int* info) const;
1313  void POTRF(const char& UPLO, const int& n, float* A, const int& lda, int* info) const;
1314  void POTRS(const char& UPLO, const int& n, const int& nrhs, const float* A, const int& lda, float* B, const int& ldb, int* info) const;
1315  void POTRI(const char& UPLO, const int& n, float* A, const int& lda, int* info) const;
1316  void 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;
1317  void POSV(const char& UPLO, const int& n, const int& nrhs, float* A, const int& lda, float* B, const int& ldb, int* info) const;
1318  void POEQU(const int& n, const float* A, const int& lda, float* S, float* scond, float* amax, int* info) const;
1319  void 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;
1320 
1321  void 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;
1322 
1323  // General Linear System Routines
1324  void 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;
1325  void 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;
1326  void 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;
1327  void 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;
1328  void GEQRF(const int& m, const int& n, float* A, const int& lda, float* TAU, float* WORK, const int& lwork, int* info) const;
1329  void GEQR2(const int& m, const int& n, float* A, const int& lda, float* TAU, float* WORK, int* const info) const;
1330 
1331  void GETRF(const int& m, const int& n, float* A, const int& lda, int* IPIV, int* info) const;
1332  void 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;
1333  void 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;
1334 
1335  void 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;
1336  void LASWP (const int& N, float* A, const int& LDA, const int& K1, const int& K2, const int* IPIV, const int& INCX) const;
1337 
1338  void GBTRF(const int& m, const int& n, const int& kl, const int& ku, float* A, const int& lda, int* IPIV, int* info) const;
1339  void 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;
1340  void GTTRF(const int& n, float* dl, float* d, float* du, float* du2, int* IPIV, int* info) const;
1341  void 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;
1342 
1343 
1344  void GETRI(const int& n, float* A, const int& lda, const int* IPIV, float* WORK, const int& lwork, int* info) const;
1345  void 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;
1346  void 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;
1347  void 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;
1348  float LANGB(const char& NORM, const int& n, const int& kl, const int& ku, const float* A, const int& lda, float* WORK) const;
1349  void GESV(const int& n, const int& nrhs, float* A, const int& lda, int* IPIV, float* B, const int& ldb, int* info) const;
1350  void 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;
1351  void 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;
1352  void 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;
1353  void 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;
1354 
1355  void 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;
1356 
1357  void 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;
1358  void 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;
1359  void 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;
1360  void TRTRI(const char& UPLO, const char& DIAG, const int& n, float* A, const int& lda, int* info) const;
1361 
1362  // Symmetric eigenvalue routines.
1363  void STEQR(const char& COMPZ, const int& n, float* D, float* E, float* Z, const int& ldz, float* WORK, int* info) const;
1364  void PTEQR(const char& COMPZ, const int& n, float* D, float* E, float* Z, const int& ldz, float* WORK, int* info) const;
1365  void SPEV(const char& JOBZ, const char& UPLO, const int& n, float* AP, float* W, float* Z, const int& ldz, float* WORK, int* info) const;
1366  void 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;
1367  void 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;
1368  void 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;
1369  void 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;
1370 
1371  // Non-Hermitian eigenvalue routines.
1372  void 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;
1373  void 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;
1374  void 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;
1375 
1376  void 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;
1377  void 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;
1378 
1379  void 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;
1380  void 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;
1381  void 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;
1382  void 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;
1383  void 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;
1384  void 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;
1385  void 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;
1386 
1387  // SVD routine
1388  void 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;
1389 
1390  // Orthogonal matrix routines.
1391  void 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;
1392  void 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;
1393  void 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;
1394  void 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;
1395  void 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;
1396  void 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;
1397  void 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;
1398  void 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;
1399 
1400  // Triangular matrix routines.
1401  void 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;
1402  void 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;
1403 
1404  void 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;
1405 
1406  void 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;
1407 
1408  // Rotation/reflection generators
1409  void LARTG( const float& f, const float& g, float* c, float* s, float* r ) const;
1410  void LARFG( const int& n, float* alpha, float* x, const int& incx, float* tau ) const;
1411 
1412  // Matrix balancing routines.
1413 
1414  void GEBAL(const char& JOBZ, const int& n, float* A, const int& lda, int* ilo, int* ihi, float* scale, int* info) const;
1415 
1416  void 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;
1417 
1418  // Random number generators
1419  float LARND( const int& idist, int* seed ) const;
1420  void LARNV( const int& idist, int* seed, const int& n, float* v ) const;
1421 
1422  // Machine characteristics.
1423  float LAMCH(const char& CMACH) const;
1424  int ILAENV( const int& ispec, const std::string& NAME, const std::string& OPTS, const int& N1 = -1, const int& N2 = -1, const int& N3 = -1, const int& N4 = -1 ) const;
1425 
1426  // Miscellaneous routines.
1427  float LAPY2(const float& x, const float& y) const;
1428 
1429  };
1430 
1431  // END INT, FLOAT SPECIALIZATION DECLARATION //
1432 
1433  // BEGIN INT, DOUBLE SPECIALIZATION DECLARATION //
1434 
1435  template<>
1436  class TEUCHOSNUMERICS_LIB_DLL_EXPORT LAPACK<int, double>
1437  {
1438  public:
1439  inline LAPACK(void) {}
1440  inline LAPACK(const LAPACK<int, double>& /*lapack*/) {}
1441  inline virtual ~LAPACK(void) {}
1442 
1443  // Symmetric positive definite linear system routines
1444  void PTTRF(const int& n, double* d, double* e, int* info) const;
1445  void PTTRS(const int& n, const int& nrhs, const double* d, const double* e, double* B, const int& ldb, int* info) const;
1446  void POTRF(const char& UPLO, const int& n, double* A, const int& lda, int* info) const;
1447  void POTRS(const char& UPLO, const int& n, const int& nrhs, const double* A, const int& lda, double* B, const int& ldb, int* info) const;
1448  void POTRI(const char& UPLO, const int& n, double* A, const int& lda, int* info) const;
1449  void 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;
1450  void POSV(const char& UPLO, const int& n, const int& nrhs, double* A, const int& lda, double* B, const int& ldb, int* info) const;
1451  void POEQU(const int& n, const double* A, const int& lda, double* S, double* scond, double* amax, int* info) const;
1452  void 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;
1453 
1454  void 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;
1455 
1456  // General linear system routines
1457  void 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;
1458  void 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;
1459  void 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;
1460  void 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;
1461  void GEQRF(const int& m, const int& n, double* A, const int& lda, double* TAU, double* WORK, const int& lwork, int* info) const;
1462  void GEQR2(const int& m, const int& n, double* A, const int& lda, double* TAU, double* WORK, int* const info) const;
1463  void GETRF(const int& m, const int& n, double* A, const int& lda, int* IPIV, int* info) const;
1464  void 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;
1465  void 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;
1466 
1467  void 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;
1468  void LASWP (const int& N, double* A, const int& LDA, const int& K1, const int& K2, const int* IPIV, const int& INCX) const;
1469 
1470  void GBTRF(const int& m, const int& n, const int& kl, const int& ku, double* A, const int& lda, int* IPIV, int* info) const;
1471  void 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;
1472  void GTTRF(const int& n, double* dl, double* d, double* du, double* du2, int* IPIV, int* info) const;
1473  void 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;
1474  void GETRI(const int& n, double* A, const int& lda, const int* IPIV, double* WORK, const int& lwork, int* info) const;
1475  void 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;
1476  void 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;
1477  void 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;
1478  double LANGB(const char& NORM, const int& n, const int& kl, const int& ku, const double* A, const int& lda, double* WORK) const;
1479  void GESV(const int& n, const int& nrhs, double* A, const int& lda, int* IPIV, double* B, const int& ldb, int* info) const;
1480  void 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;
1481  void 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;
1482  void 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;
1483  void 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;
1484 
1485  void 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;
1486 
1487  void 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;
1488  void 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;
1489  void 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;
1490  void TRTRI(const char& UPLO, const char& DIAG, const int& n, double* A, const int& lda, int* info) const;
1491 
1492  // Symmetric eigenproblem routines.
1493  void STEQR(const char& COMPZ, const int& n, double* D, double* E, double* Z, const int& ldz, double* WORK, int* info) const;
1494  void PTEQR(const char& COMPZ, const int& n, double* D, double* E, double* Z, const int& ldz, double* WORK, int* info) const;
1495  void SPEV(const char& JOBZ, const char& UPLO, const int& n, double* AP, double* W, double* Z, const int& ldz, double* WORK, int* info) const;
1496  void 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;
1497  void 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;
1498  void 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;
1499  void 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;
1500 
1501  // Non-Hermitian eigenproblem routines.
1502  void 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;
1503  void 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;
1504  void 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;
1505 
1506  void 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;
1507  void 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;
1508 
1509  void 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;
1510  void 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;
1511  void 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;
1512  void 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;
1513  void 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;
1514  void 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;
1515  void 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;
1516 
1517 
1518  // SVD routine
1519  void 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;
1520 
1521  // Orthogonal matrix routines.
1522  void 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;
1523  void 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;
1524  void 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;
1525  void 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;
1526  void 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;
1527  void 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;
1528  void 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;
1529  void 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;
1530 
1531  // Triangular matrix routines.
1532  void 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;
1533  void 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;
1534 
1535  void 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;
1536 
1537  void 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;
1538 
1539  // Rotation/reflection generators
1540  void LARTG( const double& f, const double& g, double* c, double* s, double* r ) const;
1541  void LARFG( const int& n, double* alpha, double* x, const int& incx, double* tau ) const;
1542 
1543  // Matrix balancing routines.
1544 
1545  void GEBAL(const char& JOBZ, const int& n, double* A, const int& lda, int* ilo, int* ihi, double* scale, int* info) const;
1546 
1547  void 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;
1548 
1549  // Random number generators
1550  double LARND( const int& idist, int* seed ) const;
1551  void LARNV( const int& idist, int* seed, const int& n, double* v ) const;
1552 
1553  // Machine characteristic routines.
1554  double LAMCH(const char& CMACH) const;
1555  int ILAENV( const int& ispec, const std::string& NAME, const std::string& OPTS, const int& N1 = -1, const int& N2 = -1, const int& N3 = -1, const int& N4 = -1 ) const;
1556 
1557  // Miscellaneous routines.
1558  double LAPY2(const double& x, const double& y) const;
1559 
1560  };
1561 
1562  // END INT, DOUBLE SPECIALIZATION DECLARATION //
1563 
1564 #ifdef HAVE_TEUCHOS_COMPLEX
1565 
1566  // BEGIN INT, COMPLEX<FLOAT> SPECIALIZATION DECLARATION //
1567 
1568  template<>
1569  class TEUCHOSNUMERICS_LIB_DLL_EXPORT LAPACK<int, std::complex<float> >
1570  {
1571  public:
1572  inline LAPACK(void) {}
1573  inline LAPACK(const LAPACK<int, std::complex<float> >& lapack) {}
1574  inline virtual ~LAPACK(void) {}
1575 
1576  // Symmetric positive definite linear system routines
1577  void PTTRF(const int& n, float* d, std::complex<float>* e, int* info) const;
1578  void 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;
1579  void POTRF(const char& UPLO, const int& n, std::complex<float>* A, const int& lda, int* info) const;
1580  void 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;
1581  void POTRI(const char& UPLO, const int& n, std::complex<float>* A, const int& lda, int* info) const;
1582  void 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;
1583  void 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;
1584  void POEQU(const int& n, const std::complex<float>* A, const int& lda, float* S, float* scond, float* amax, int* info) const;
1585  void 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;
1586 
1587  void 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;
1588 
1589  // General Linear System Routines
1590  void 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;
1591  void 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;
1592  void 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;
1593  void 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;
1594  void 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;
1595  void 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;
1596  void 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;
1597  void GETRF(const int& m, const int& n, std::complex<float>* A, const int& lda, int* IPIV, int* info) const;
1598  void 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;
1599  void 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;
1600 
1601  void 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;
1602  void LASWP (const int& N, std::complex<float>* A, const int& LDA, const int& K1, const int& K2, const int* IPIV, const int& INCX) const;
1603 
1604  void 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;
1605  void 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;
1606  void 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;
1607  void 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;
1608  void GETRI(const int& n, std::complex<float>* A, const int& lda, const int* IPIV, std::complex<float>* WORK, const int& lwork, int* info) const;
1609  void 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;
1610  void 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;
1611  void 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;
1612  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;
1613  void 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;
1614  void 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;
1615  void 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;
1616  void 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;
1617  void 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;
1618 
1619  void 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;
1620 
1621  void 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;
1622  void 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;
1623  void TRTRI(const char& UPLO, const char& DIAG, const int& n, std::complex<float>* A, const int& lda, int* info) const;
1624 
1625  // Symmetric eigenvalue routines.
1626  void STEQR(const char& COMPZ, const int& n, float* D, float* E, std::complex<float>* Z, const int& ldz, float* WORK, int* info) const;
1627  void PTEQR(const char& COMPZ, const int& n, float* D, float* E, std::complex<float>* Z, const int& ldz, float* WORK, int* info) const;
1628  void 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;
1629  void 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;
1630 
1631  // Non-Hermitian eigenvalue routines.
1632  void 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;
1633  void 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;
1634  void 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;
1635 
1636  void 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;
1637  void 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;
1638 
1639  void 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;
1640 
1641  void 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;
1642  void 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;
1643  void 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;
1644  void 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;
1645  void 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;
1646 
1647  // SVD routine
1648  void 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;
1649 
1650  // Triangular matrix routines.
1651  void 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;
1652  void 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;
1653 
1654  void 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;
1655 
1656  // Rotation/reflection generators
1657  void LARTG( const std::complex<float> f, const std::complex<float> g, float* c, std::complex<float>* s, std::complex<float>* r ) const;
1658  void LARFG( const int& n, std::complex<float>* alpha, std::complex<float>* x, const int& incx, std::complex<float>* tau ) const;
1659 
1660  // Matrix balancing routines.
1661 
1662  void GEBAL(const char& JOBZ, const int& n, std::complex<float>* A, const int& lda, int* ilo, int* ihi, float* scale, int* info) const;
1663 
1664  void 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;
1665 
1666  // Random number generators
1667  std::complex<float> LARND( const int& idist, int* seed ) const;
1668  void LARNV( const int& idist, int* seed, const int& n, std::complex<float>* v ) const;
1669 
1670  // Machine characteristics
1671  int ILAENV( const int& ispec, const std::string& NAME, const std::string& OPTS, const int& N1 = -1, const int& N2 = -1, const int& N3 = -1, const int& N4 = -1 ) const;
1672 
1673  };
1674 
1675  // END INT, COMPLEX<FLOAT> SPECIALIZATION DECLARATION //
1676 
1677  // BEGIN INT, COMPLEX<DOUBLE> SPECIALIZATION DECLARATION //
1678 
1679  template<>
1680  class TEUCHOSNUMERICS_LIB_DLL_EXPORT LAPACK<int, std::complex<double> >
1681  {
1682  public:
1683  inline LAPACK(void) {}
1684  inline LAPACK(const LAPACK<int, std::complex<double> >& lapack) {}
1685  inline virtual ~LAPACK(void) {}
1686 
1687  // Symmetric positive definite linear system routines
1688  void PTTRF(const int& n, double* d, std::complex<double>* e, int* info) const;
1689  void 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;
1690  void POTRF(const char& UPLO, const int& n, std::complex<double>* A, const int& lda, int* info) const;
1691  void 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;
1692  void POTRI(const char& UPLO, const int& n, std::complex<double>* A, const int& lda, int* info) const;
1693  void 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;
1694  void 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;
1695  void POEQU(const int& n, const std::complex<double>* A, const int& lda, double* S, double* scond, double* amax, int* info) const;
1696  void 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;
1697 
1698  void 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;
1699 
1700  // General Linear System Routines
1701  void 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;
1702  void 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;
1703  void 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;
1704  void 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;
1705  void 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;
1706  void 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;
1707  void 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;
1708 
1709  void GETRF(const int& m, const int& n, std::complex<double>* A, const int& lda, int* IPIV, int* info) const;
1710  void 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;
1711  void 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;
1712 
1713  void 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;
1714  void LASWP (const int& N, std::complex<double>* A, const int& LDA, const int& K1, const int& K2, const int* IPIV, const int& INCX) const;
1715 
1716  void 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;
1717  void 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;
1718  void 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;
1719  void 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;
1720  void GETRI(const int& n, std::complex<double>* A, const int& lda, const int* IPIV, std::complex<double>* WORK, const int& lwork, int* info) const;
1721  void 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;
1722  void 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;
1723  void 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;
1724  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;
1725  void 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;
1726  void 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;
1727  void 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;
1728  void 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;
1729  void 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;
1730 
1731  void 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;
1732 
1733  void 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;
1734  void 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;
1735  void TRTRI(const char& UPLO, const char& DIAG, const int& n, std::complex<double>* A, const int& lda, int* info) const;
1736 
1737  // Symmetric eigenvalue routines.
1738  void STEQR(const char& COMPZ, const int& n, double* D, double* E, std::complex<double>* Z, const int& ldz, double* WORK, int* info) const;
1739  void PTEQR(const char& COMPZ, const int& n, double* D, double* E, std::complex<double>* Z, const int& ldz, double* WORK, int* info) const;
1740  void 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;
1741  void 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;
1742 
1743  // Non-hermitian eigenvalue routines.
1744  void 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;
1745  void 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;
1746  void 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;
1747 
1748  void 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;
1749  void 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;
1750 
1751  void 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;
1752  void 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;
1753  void 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;
1754  void 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;
1755  void 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;
1756  void 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;
1757 
1758  // SVD routine
1759  void 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;
1760 
1761  // Triangular matrix routines.
1762  void 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;
1763  void 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;
1764 
1765  void 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;
1766 
1767  // Rotation/reflection generators
1768  void LARTG( const std::complex<double> f, const std::complex<double> g, double* c, std::complex<double>* s, std::complex<double>* r ) const;
1769  void LARFG( const int& n, std::complex<double>* alpha, std::complex<double>* x, const int& incx, std::complex<double>* tau ) const;
1770 
1771  // Matrix balancing routines.
1772 
1773  void GEBAL(const char& JOBZ, const int& n, std::complex<double>* A, const int& lda, int* ilo, int* ihi, double* scale, int* info) const;
1774 
1775  void 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;
1776 
1777  // Random number generators
1778  std::complex<double> LARND( const int& idist, int* seed ) const;
1779  void LARNV( const int& idist, int* seed, const int& n, std::complex<double>* v ) const;
1780 
1781  // Machine characteristics
1782  int ILAENV( const int& ispec, const std::string& NAME, const std::string& OPTS, const int& N1 = -1, const int& N2 = -1, const int& N3 = -1, const int& N4 = -1 ) const;
1783 
1784  };
1785 
1786  // END INT, COMPLEX<DOUBLE> SPECIALIZATION DECLARATION //
1787 
1788  // BEGIN INT, KOKKOS::COMPLEX<DOUBLE> SPECIALIZATION DECLARATION //
1789 
1790  template<>
1791  class TEUCHOSNUMERICS_LIB_DLL_EXPORT LAPACK<int, Kokkos::complex<double> >
1792  {
1793  public:
1794  inline LAPACK(void) {}
1795  inline LAPACK(const LAPACK<int, Kokkos::complex<double> >& lapack) {}
1796  inline virtual ~LAPACK(void) {}
1797 
1798  // Symmetric positive definite linear system routines
1799  void PTTRF(const int& n, double* d, Kokkos::complex<double>* e, int* info) const;
1800  void 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;
1801  void POTRF(const char& UPLO, const int& n, Kokkos::complex<double>* A, const int& lda, int* info) const;
1802  void 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;
1803  void POTRI(const char& UPLO, const int& n, Kokkos::complex<double>* A, const int& lda, int* info) const;
1804  void 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;
1805  void 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;
1806  void POEQU(const int& n, const Kokkos::complex<double>* A, const int& lda, double* S, double* scond, double* amax, int* info) const;
1807  void 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;
1808 
1809  void 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;
1810 
1811  // General Linear System Routines
1812  void 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;
1813  void 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;
1814  void 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;
1815  void 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;
1816  void 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;
1817  void 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;
1818  void 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;
1819 
1820  void GETRF(const int& m, const int& n, Kokkos::complex<double>* A, const int& lda, int* IPIV, int* info) const;
1821  void 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;
1822  void 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;
1823 
1824  void 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;
1825  void LASWP (const int& N, Kokkos::complex<double>* A, const int& LDA, const int& K1, const int& K2, const int* IPIV, const int& INCX) const;
1826 
1827  void 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;
1828  void 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;
1829  void 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;
1830  void 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;
1831  void GETRI(const int& n, Kokkos::complex<double>* A, const int& lda, const int* IPIV, Kokkos::complex<double>* WORK, const int& lwork, int* info) const;
1832  void 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;
1833  void 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;
1834  void 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;
1835  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;
1836  void 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;
1837  void 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;
1838  void 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;
1839  void 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;
1840  void 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;
1841 
1842  void 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;
1843 
1844  void 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;
1845  void 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;
1846  void TRTRI(const char& UPLO, const char& DIAG, const int& n, Kokkos::complex<double>* A, const int& lda, int* info) const;
1847 
1848  // Symmetric eigenvalue routines.
1849  void STEQR(const char& COMPZ, const int& n, double* D, double* E, Kokkos::complex<double>* Z, const int& ldz, double* WORK, int* info) const;
1850  void PTEQR(const char& COMPZ, const int& n, double* D, double* E, Kokkos::complex<double>* Z, const int& ldz, double* WORK, int* info) const;
1851  void 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;
1852  void 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;
1853 
1854  // Non-hermitian eigenvalue routines.
1855  void 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;
1856  void 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;
1857  void 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;
1858 
1859  void 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;
1860  void 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;
1861 
1862  void 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;
1863  void 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;
1864  void 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;
1865  void 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;
1866  void 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;
1867  void 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;
1868 
1869  // SVD routine
1870  void 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;
1871 
1872  // Triangular matrix routines.
1873  void 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;
1874  void 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;
1875 
1876  void 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;
1877 
1878  // Rotation/reflection generators
1879  void LARTG( const Kokkos::complex<double> f, const Kokkos::complex<double> g, double* c, Kokkos::complex<double>* s, Kokkos::complex<double>* r ) const;
1880  void LARFG( const int& n, Kokkos::complex<double>* alpha, Kokkos::complex<double>* x, const int& incx, Kokkos::complex<double>* tau ) const;
1881 
1882  // Matrix balancing routines.
1883 
1884  void GEBAL(const char& JOBZ, const int& n, Kokkos::complex<double>* A, const int& lda, int* ilo, int* ihi, double* scale, int* info) const;
1885 
1886  void 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;
1887 
1888  // Random number generators
1889  Kokkos::complex<double> LARND( const int& idist, int* seed ) const;
1890  void LARNV( const int& idist, int* seed, const int& n, Kokkos::complex<double>* v ) const;
1891 
1892  // Machine characteristics
1893  int ILAENV( const int& ispec, const std::string& NAME, const std::string& OPTS, const int& N1 = -1, const int& N2 = -1, const int& N3 = -1, const int& N4 = -1 ) const;
1894 
1895  };
1896 
1897  // END INT, KOKKOS::COMPLEX<DOUBLE> SPECIALIZATION DECLARATION //
1898 
1899 #endif // HAVE_TEUCHOS_COMPLEX
1900 
1901 #ifdef HAVE_TEUCHOSCORE_QUADMATH
1902 
1903  // BEGIN int, __float128 SPECIALIZATION DECLARATION //
1904 
1905  // mfh 18 Sep 2015: I had to write this specialization by hand,
1906  // since LAPACK does not provide it, so it is not complete.
1907  template<>
1908  class TEUCHOSNUMERICS_LIB_DLL_EXPORT LAPACK<int, __float128>
1909  {
1910  public:
1911  inline LAPACK(void) {}
1912  inline LAPACK(const LAPACK<int, __float128>& lapack) {}
1913  inline virtual ~LAPACK(void) {}
1914 
1915  void GEQRF(const int& m, const int& n, __float128* A, const int& lda, __float128* TAU, __float128* WORK, const int& lwork, int* info) const;
1916  void GEQR2(const int& m, const int& n, __float128* A, const int& lda, __float128* TAU, __float128* WORK, int* const info) const;
1917  void GETRF(const int& m, const int& n, __float128* A, const int& lda, int* IPIV, int* info) const;
1918  void 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;
1919  void GETRI(const int& n, __float128* A, const int& lda, const int* IPIV, __float128* WORK, const int& lwork, int* info) const;
1920  void LASWP (const int& N, __float128* A, const int& LDA, const int& K1, const int& K2, const int* IPIV, const int& INCX) const;
1921 
1922  void 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;
1923  void 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;
1924  void 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;
1925 
1926  void LARFG( const int& n, __float128* alpha, __float128* x, const int& incx, __float128* tau ) const;
1927 
1928  __float128 LAPY2 (const __float128 x, const __float128 y) const;
1929  void LASCL (const char& TYPE, const int& kl, const int& ku, const __float128 cfrom, const __float128 cto, const int& m, const int& n, __float128* A, const int& lda, int* info) const;
1930 
1931  void GBTRF (const int& m, const int& n, const int& kl, const int& ku, __float128* A, const int& lda, int* IPIV, int* info) const;
1932  void GBTRS (const char& TRANS, const int& n, const int& kl, const int& ku, const int& nrhs, const __float128* A, const int& lda, const int* IPIV, __float128* B, const int& ldb, int* info) const;
1933  };
1934 
1935  // END int, __float128 SPECIALIZATION DECLARATION //
1936 
1937 #endif // HAVE_TEUCHOSCORE_QUADMATH
1938 
1939 #ifdef HAVE_TEUCHOS_LONG_DOUBLE
1940 
1941  // BEGIN int, long double SPECIALIZATION DECLARATION //
1942 
1943  // IKT 29 May 2021: I had to write this specialization by hand,
1944  // since LAPACK does not provide it, so it is not complete.
1945  template<>
1946  class TEUCHOSNUMERICS_LIB_DLL_EXPORT LAPACK<int, long double>
1947  {
1948  public:
1949  inline LAPACK(void) {}
1950  inline LAPACK(const LAPACK<int, long double>& lapack) {}
1951  inline virtual ~LAPACK(void) {}
1952 
1953  void GESV(const int& n, const int& nrhs, long double* A, const int& lda, int* IPIV, long double* B, const int& ldb, int* info) const;
1954  void 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;
1955  void GTTRF(const int& n, long double* dl, long double* d, long double* du, long double* du2, int* IPIV, int* info) const;
1956  void 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;
1957  void 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;
1958  void 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;
1959  void 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;
1960  void 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;
1961  void 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;
1962  void 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;
1963  void POTRF(const char& UPLO, const int& n, long double* A, const int& lda, int* info) const;
1964  void 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;
1965  void POEQU(const int& n, const long double* A, const int& lda, long double* S, long double* scond, long double* amax, int* info) const;
1966  void 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;
1967  void GEQR2(const int& m, const int& n, long double* A, const int& lda, long double* TAU, long double* WORK, int* const info) const;
1968  void GETRF(const int& m, const int& n, long double* A, const int& lda, int* IPIV, int* info) const;
1969  void 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;
1970  void GETRI(const int& n, long double* A, const int& lda, const int* IPIV, long double* WORK, const int& lwork, int* info) const;
1971  void LASWP (const int& N, long double* A, const int& LDA, const int& K1, const int& K2, const int* IPIV, const int& INCX) const;
1972 
1973  void 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;
1974  void 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;
1975  void 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;
1976 
1977  void LARFG( const int& n, long double* alpha, long double* x, const int& incx, long double* tau ) const;
1978 
1979  long double LAPY2 (const long double x, const long double y) const;
1980  void LASCL (const char& TYPE, const int& kl, const int& ku, const long double cfrom, const long double cto, const int& m, const int& n, long double* A, const int& lda, int* info) const;
1981 
1982  void GBTRF (const int& m, const int& n, const int& kl, const int& ku, long double* A, const int& lda, int* IPIV, int* info) const;
1983  void GBTRS (const char& TRANS, const int& n, const int& kl, const int& ku, const int& nrhs, const long double* A, const int& lda, const int* IPIV, long double* B, const int& ldb, int* info) const;
1984  };
1985 
1986  // END int, long double SPECIALIZATION DECLARATION //
1987 
1988 #endif // HAVE_TEUCHOS_LONG_DOUBLE
1989 
1990 #endif // DOXYGEN_SHOULD_SKIP_THIS
1991 
1992 } // namespace Teuchos
1993 
1994 #endif // _TEUCHOS_LAPACK_HPP_
Teuchos::ScalarTraits< ScalarType >::magnitudeType MagnitudeType
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 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 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 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 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 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
T magnitudeType
Mandatory typedef for result of magnitude.
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.
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 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, in either the 1-norm or the infinity-norm, 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 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 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 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 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&#39;*X=B or A^H*X=B with a tridiagonal matrix A using the ...
static T squareroot(T x)
Returns a number of magnitudeType that is the square root of this scalar type x.
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...
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 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 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 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...
Teuchos header file which uses auto-configuration information to include necessary C++ headers...
void PTTRF(const OrdinalType &n, MagnitudeType *d, ScalarType *e, OrdinalType *info) const
Computes the L*D*L&#39; factorization of a Hermitian/symmetric positive definite tridiagonal matrix A...
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 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.
LAPACK(void)
Default Constructor.
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 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 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...
static magnitudeType sfmin()
Returns safe minimum (sfmin), such that 1/sfmin does not overflow.
This structure defines some basic traits for a scalar field type.
#define TEUCHOSNUMERICS_LIB_DLL_EXPORT
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...
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 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 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...
LAPACK(const LAPACK< OrdinalType, ScalarType > &lapack)
Copy Constructor.
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 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 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 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 LARND(const OrdinalType &idist, OrdinalType *seed) const
Returns a random number from a uniform or normal distribution.
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 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 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
The Templated LAPACK Wrapper Class.
#define TEUCHOS_MAX(x, y)
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 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 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 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...
ScalarType LAPY2(const ScalarType &x, const ScalarType &y) const
Computes x^2 + y^2 safely, to avoid overflow.
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 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...
static magnitudeType magnitude(T a)
Returns the magnitudeType of the scalar type a.
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 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&#39;*X=B with a general banded n by n matrix A using the L...
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 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 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...
virtual ~LAPACK(void)
Destructor.
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, the left and/or right eigenvectors.
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&#39;*X=B with a general n by n matrix A using the LU facto...
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 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...
Defines basic traits for the scalar field type.
static T zero()
Returns representation of zero for this scalar type.
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 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 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 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 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 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 LARNV(const OrdinalType &idist, OrdinalType *seed, const OrdinalType &n, ScalarType *v) const
Returns a vector of random numbers from a chosen distribution.
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 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 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 *D*L&#39; factorization of A computed by PTTRF.
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 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...
ScalarType LAMCH(const char &CMACH) const
Determines machine parameters for floating point characteristics.
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 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 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.
#define TEUCHOS_MIN(x, y)
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 ...
static T one()
Returns representation of one for this scalar type.
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 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 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...
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 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 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...