|
Teuchos Package Browser (Single Doxygen Collection) Version of the Day
|
00001 // @HEADER 00002 // *********************************************************************** 00003 // 00004 // Teuchos: Common Tools Package 00005 // Copyright (2004) Sandia Corporation 00006 // 00007 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive 00008 // license for use of this work by or on behalf of the U.S. Government. 00009 // 00010 // This library is free software; you can redistribute it and/or modify 00011 // it under the terms of the GNU Lesser General Public License as 00012 // published by the Free Software Foundation; either version 2.1 of the 00013 // License, or (at your option) any later version. 00014 // 00015 // This library is distributed in the hope that it will be useful, but 00016 // WITHOUT ANY WARRANTY; without even the implied warranty of 00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00018 // Lesser General Public License for more details. 00019 // 00020 // You should have received a copy of the GNU Lesser General Public 00021 // License along with this library; if not, write to the Free Software 00022 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 00023 // USA 00024 // Questions? Contact Michael A. Heroux (maherou@sandia.gov) 00025 // 00026 // *********************************************************************** 00027 // @HEADER 00028 00029 #ifndef _TEUCHOS_LAPACK_HPP_ 00030 #define _TEUCHOS_LAPACK_HPP_ 00031 00039 #include "Teuchos_ConfigDefs.hpp" 00040 #include "Teuchos_ScalarTraits.hpp" 00041 #include "Teuchos_LAPACK_wrappers.hpp" 00042 00043 /* for INTEL_CXML, the second arg may need to be changed to 'one'. If so 00044 the appropriate declaration of one will need to be added back into 00045 functions that include the macro: 00046 */ 00047 #if defined (INTEL_CXML) 00048 unsigned int one=1; 00049 #endif 00050 00051 #ifdef CHAR_MACRO 00052 #undef CHAR_MACRO 00053 #endif 00054 #if defined (INTEL_CXML) 00055 #define CHAR_MACRO(char_var) &char_var, one 00056 #else 00057 #define CHAR_MACRO(char_var) &char_var 00058 #endif 00059 00091 extern "C" { 00092 00093 00094 typedef int (*gees_nullfptr_t)(double*,double*); 00095 00096 00097 } // extern "C" 00098 00099 00100 namespace Teuchos 00101 { 00102 00103 template<class T> 00104 struct UndefinedLAPACKRoutine 00105 { 00106 // This function should not compile if there is an attempt to instantiate! 00107 static inline T notDefined() { return T::LAPACK_routine_not_defined_for_this_type(); } 00108 }; 00109 00110 template<typename OrdinalType, typename ScalarType> 00111 class LAPACK 00112 { 00113 public: 00114 00115 typedef typename Teuchos::ScalarTraits<ScalarType>::magnitudeType MagnitudeType; 00116 00118 00119 00121 inline LAPACK(void) {} 00122 00124 inline LAPACK(const LAPACK<OrdinalType, ScalarType>& lapack) {} 00125 00127 inline virtual ~LAPACK(void) {} 00129 00131 00132 00134 void PTTRF(const OrdinalType n, ScalarType* d, ScalarType* e, OrdinalType* info) const; 00135 00137 void PTTRS(const OrdinalType n, const OrdinalType nrhs, const ScalarType* d, const ScalarType* e, ScalarType* B, const OrdinalType ldb, OrdinalType* info) const; 00138 00140 void POTRF(const char UPLO, const OrdinalType n, ScalarType* A, const OrdinalType lda, OrdinalType* info) const; 00141 00143 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; 00144 00146 void POTRI(const char UPLO, const OrdinalType n, ScalarType* A, const OrdinalType lda, OrdinalType* info) const; 00147 00149 00150 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; 00151 00153 void POSV(const char UPLO, const OrdinalType n, const OrdinalType nrhs, ScalarType* A, const OrdinalType lda, ScalarType* B, const OrdinalType ldb, OrdinalType* info) const; 00154 00156 void POEQU(const OrdinalType n, const ScalarType* A, const OrdinalType lda, ScalarType* S, ScalarType* scond, ScalarType* amax, OrdinalType* info) const; 00157 00159 void PORFS(const char UPLO, const OrdinalType n, const OrdinalType nrhs, 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; 00160 00162 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; 00164 00166 00167 00169 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; 00170 00172 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; 00173 00175 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; 00176 00178 void GEQRF( const OrdinalType m, const OrdinalType n, ScalarType* A, const OrdinalType lda, ScalarType* TAU, ScalarType* WORK, const OrdinalType lwork, OrdinalType* info) const; 00179 00181 void GETRF(const OrdinalType m, const OrdinalType n, ScalarType* A, const OrdinalType lda, OrdinalType* IPIV, OrdinalType* info) const; 00182 00184 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; 00185 00187 void GTTRF(const OrdinalType n, ScalarType* dl, ScalarType* d, ScalarType* du, ScalarType* du2, OrdinalType* IPIV, OrdinalType* info) const; 00188 00190 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; 00191 00193 void GETRI(const OrdinalType n, ScalarType* A, const OrdinalType lda, const OrdinalType* IPIV, ScalarType* WORK, const OrdinalType lwork, OrdinalType* info) const; 00194 00196 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; 00197 00199 void GESV(const OrdinalType n, const OrdinalType nrhs, ScalarType* A, const OrdinalType lda, OrdinalType* IPIV, ScalarType* B, const OrdinalType ldb, OrdinalType* info) const; 00200 00202 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; 00203 00205 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; 00206 00208 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; 00209 00213 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; 00214 00216 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; 00217 00219 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; 00220 00222 void TRTRI(const char UPLO, const char DIAG, const OrdinalType n, const ScalarType* A, const OrdinalType lda, OrdinalType* info) const; 00224 00226 00227 00230 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; 00231 00235 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; 00236 00240 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; 00241 00245 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; 00246 00250 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; 00251 00253 void STEQR(const char COMPZ, const OrdinalType n, ScalarType* D, ScalarType* E, ScalarType* Z, const OrdinalType ldz, ScalarType* WORK, OrdinalType* info) const; 00255 00257 00258 00259 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; 00260 00264 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; 00265 00269 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; 00270 00274 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; 00275 00277 void GEEV(const char JOBVL, const char JOBVR, const OrdinalType n, ScalarType* A, const OrdinalType lda, ScalarType* WR, ScalarType* WI, ScalarType* VL, const OrdinalType ldvl, ScalarType* VR, const OrdinalType ldvr, ScalarType* WORK, const OrdinalType lwork, OrdinalType* info) const; 00278 00280 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; 00281 00285 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; 00286 00288 00289 00291 00292 00293 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; 00295 00296 00298 00299 00302 void ORMQR(const char SIDE, const char TRANS, const OrdinalType m, const OrdinalType n, const OrdinalType k, ScalarType* A, const OrdinalType lda, const ScalarType* TAU, ScalarType* C, const OrdinalType ldc, ScalarType* WORK, const OrdinalType lwork, OrdinalType* info) const; 00303 00307 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; 00308 00312 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; 00313 00317 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; 00318 00322 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; 00324 00326 00327 00330 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; 00331 00335 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; 00336 00340 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; 00341 00343 00345 00346 00348 void LARTG( const ScalarType f, const ScalarType g, MagnitudeType* c, ScalarType* s, ScalarType* r ) const; 00349 00351 void LARFG( const OrdinalType n, ScalarType* alpha, ScalarType* x, const OrdinalType incx, ScalarType* tau ) const; 00352 00354 00356 00357 00358 ScalarType LARND( const OrdinalType idist, OrdinalType* seed ) const; 00359 00361 void LARNV( const OrdinalType idist, OrdinalType* seed, const OrdinalType n, ScalarType* v ) const; 00363 00365 00366 00369 ScalarType LAMCH(const char CMACH) const; 00370 00375 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; 00377 00379 00380 00383 ScalarType LAPY2(const ScalarType x, const ScalarType y) const; 00385 }; 00386 00387 // END GENERAL TEMPLATE DECLARATION // 00388 00389 // BEGIN GENERAL TEMPLATE IMPLEMENTATION // 00390 00391 00392 template<typename OrdinalType, typename ScalarType> 00393 void LAPACK<OrdinalType, ScalarType>::PTTRF(const OrdinalType n, ScalarType* d, ScalarType* e, OrdinalType* info) const 00394 { 00395 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 00396 } 00397 00398 template<typename OrdinalType, typename ScalarType> 00399 void LAPACK<OrdinalType, ScalarType>::PTTRS(const OrdinalType n, const OrdinalType nrhs, const ScalarType* d, const ScalarType* e, ScalarType* B, const OrdinalType ldb, OrdinalType* info) const 00400 { 00401 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 00402 } 00403 00404 template<typename OrdinalType, typename ScalarType> 00405 void LAPACK<OrdinalType, ScalarType>::POTRF(const char UPLO, const OrdinalType n, ScalarType* A, const OrdinalType lda, OrdinalType* info) const 00406 { 00407 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 00408 } 00409 00410 template<typename OrdinalType, typename ScalarType> 00411 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 00412 { 00413 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 00414 } 00415 00416 template<typename OrdinalType, typename ScalarType> 00417 void LAPACK<OrdinalType, ScalarType>::POTRI(const char UPLO, const OrdinalType n, ScalarType* A, const OrdinalType lda, OrdinalType* info) const 00418 { 00419 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 00420 } 00421 00422 template<typename OrdinalType, typename ScalarType> 00423 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 00424 { 00425 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 00426 } 00427 00428 template<typename OrdinalType, typename ScalarType> 00429 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 00430 { 00431 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 00432 } 00433 00434 template<typename OrdinalType, typename ScalarType> 00435 void LAPACK<OrdinalType, ScalarType>::POEQU(const OrdinalType n, const ScalarType* A, const OrdinalType lda, ScalarType* S, ScalarType* scond, ScalarType* amax, OrdinalType* info) const 00436 { 00437 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 00438 } 00439 00440 template<typename OrdinalType, typename ScalarType> 00441 void LAPACK<OrdinalType, ScalarType>::PORFS(const char UPLO, const OrdinalType n, const OrdinalType nrhs, 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 00442 { 00443 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 00444 } 00445 00446 template<typename OrdinalType, typename ScalarType> 00447 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 00448 { 00449 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 00450 } 00451 00452 template<typename OrdinalType, typename ScalarType> 00453 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 00454 { 00455 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 00456 } 00457 00458 template<typename OrdinalType, typename ScalarType> 00459 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 00460 { 00461 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 00462 } 00463 00464 template<typename OrdinalType, typename ScalarType> 00465 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 00466 { 00467 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 00468 } 00469 00470 template<typename OrdinalType, typename ScalarType> 00471 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 00472 { 00473 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 00474 } 00475 00476 template<typename OrdinalType, typename ScalarType> 00477 void LAPACK<OrdinalType,ScalarType>::GETRF(const OrdinalType m, const OrdinalType n, ScalarType* A, const OrdinalType lda, OrdinalType* IPIV, OrdinalType* info) const 00478 { 00479 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 00480 } 00481 00482 template<typename OrdinalType, typename ScalarType> 00483 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 00484 { 00485 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 00486 } 00487 00488 template<typename OrdinalType, typename ScalarType> 00489 void LAPACK<OrdinalType,ScalarType>::GTTRF(const OrdinalType n, ScalarType* dl, ScalarType* d, ScalarType* du, ScalarType* du2, OrdinalType* IPIV, OrdinalType* info) const 00490 { 00491 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 00492 } 00493 00494 template<typename OrdinalType, typename ScalarType> 00495 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 00496 { 00497 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 00498 } 00499 00500 template<typename OrdinalType, typename ScalarType> 00501 void LAPACK<OrdinalType,ScalarType>::GETRI(const OrdinalType n, ScalarType* A, const OrdinalType lda, const OrdinalType* IPIV, ScalarType* WORK, const OrdinalType lwork, OrdinalType* info) const 00502 { 00503 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 00504 } 00505 00506 template<typename OrdinalType, typename ScalarType> 00507 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 00508 { 00509 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 00510 } 00511 00512 template<typename OrdinalType, typename ScalarType> 00513 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 00514 { 00515 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 00516 } 00517 00518 template<typename OrdinalType, typename ScalarType> 00519 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 00520 { 00521 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 00522 } 00523 00524 template<typename OrdinalType, typename ScalarType> 00525 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 00526 { 00527 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 00528 } 00529 00530 template<typename OrdinalType, typename ScalarType> 00531 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 00532 { 00533 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 00534 } 00535 00536 template<typename OrdinalType, typename ScalarType> 00537 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 00538 { 00539 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 00540 } 00541 00542 template<typename OrdinalType, typename ScalarType> 00543 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 00544 { 00545 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 00546 } 00547 00548 template<typename OrdinalType, typename ScalarType> 00549 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 00550 { 00551 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 00552 } 00553 00554 template<typename OrdinalType, typename ScalarType> 00555 void LAPACK<OrdinalType,ScalarType>::TRTRI(const char UPLO, const char DIAG, const OrdinalType n, const ScalarType* A, const OrdinalType lda, OrdinalType* info) const 00556 { 00557 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 00558 } 00559 00560 template<typename OrdinalType, typename ScalarType> 00561 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 00562 { 00563 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 00564 } 00565 00566 template<typename OrdinalType, typename ScalarType> 00567 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 00568 { 00569 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 00570 } 00571 00572 template<typename OrdinalType, typename ScalarType> 00573 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 00574 { 00575 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 00576 } 00577 00578 template<typename OrdinalType, typename ScalarType> 00579 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 00580 { 00581 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 00582 } 00583 00584 template<typename OrdinalType, typename ScalarType> 00585 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 00586 { 00587 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 00588 } 00589 00590 template<typename OrdinalType, typename ScalarType> 00591 void LAPACK<OrdinalType,ScalarType>::STEQR(const char COMPZ, const OrdinalType n, ScalarType* D, ScalarType* E, ScalarType* Z, const OrdinalType ldz, ScalarType* WORK, OrdinalType* info) const 00592 { 00593 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 00594 } 00595 00596 template<typename OrdinalType, typename ScalarType> 00597 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 00598 { 00599 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 00600 } 00601 00602 template<typename OrdinalType, typename ScalarType> 00603 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 00604 { 00605 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 00606 } 00607 00608 template<typename OrdinalType, typename ScalarType> 00609 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 00610 { 00611 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 00612 } 00613 00614 template<typename OrdinalType, typename ScalarType> 00615 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 00616 { 00617 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 00618 } 00619 00620 template<typename OrdinalType, typename ScalarType> 00621 void LAPACK<OrdinalType, ScalarType>::GEEV(const char JOBVL, const char JOBVR, const OrdinalType n, ScalarType* A, const OrdinalType lda, ScalarType* WR, ScalarType* WI, ScalarType* VL, const OrdinalType ldvl, ScalarType* VR, const OrdinalType ldvr, ScalarType* WORK, const OrdinalType lwork, OrdinalType* info) const 00622 { 00623 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 00624 } 00625 00626 template<typename OrdinalType, typename ScalarType> 00627 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 00628 { 00629 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 00630 } 00631 00632 template<typename OrdinalType, typename ScalarType> 00633 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 00634 { 00635 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 00636 } 00637 00638 template<typename OrdinalType, typename ScalarType> 00639 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 00640 { 00641 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 00642 } 00643 00644 template<typename OrdinalType, typename ScalarType> 00645 void LAPACK<OrdinalType, ScalarType>::ORMQR(const char SIDE, const char TRANS, const OrdinalType m, const OrdinalType n, const OrdinalType k, ScalarType* A, const OrdinalType lda, const ScalarType* TAU, ScalarType* C, const OrdinalType ldc, ScalarType* WORK, const OrdinalType lwork, OrdinalType* info) const 00646 { 00647 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 00648 } 00649 00650 template<typename OrdinalType, typename ScalarType> 00651 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 00652 { 00653 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 00654 } 00655 00656 template<typename OrdinalType, typename ScalarType> 00657 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 00658 { 00659 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 00660 } 00661 00662 template<typename OrdinalType, typename ScalarType> 00663 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 00664 { 00665 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 00666 } 00667 00668 template<typename OrdinalType, typename ScalarType> 00669 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 00670 { 00671 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 00672 } 00673 00674 template<typename OrdinalType, typename ScalarType> 00675 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 00676 { 00677 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 00678 } 00679 00680 template<typename OrdinalType, typename ScalarType> 00681 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 00682 { 00683 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 00684 } 00685 00686 template<typename OrdinalType, typename ScalarType> 00687 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 00688 { 00689 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 00690 } 00691 00692 template<typename OrdinalType, typename ScalarType> 00693 ScalarType LAPACK<OrdinalType, ScalarType>::LAMCH(const char CMACH) const 00694 { 00695 return UndefinedLAPACKRoutine<ScalarType>::notDefined(); 00696 } 00697 00698 template<typename OrdinalType, typename ScalarType> 00699 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 00700 { 00701 return UndefinedLAPACKRoutine<ScalarType>::notDefined(); 00702 } 00703 00704 template<typename OrdinalType, typename ScalarType> 00705 ScalarType LAPACK<OrdinalType, ScalarType>::LAPY2(const ScalarType x, const ScalarType y) const 00706 { 00707 return UndefinedLAPACKRoutine<ScalarType>::notDefined(); 00708 } 00709 00710 template<typename OrdinalType, typename ScalarType> 00711 void LAPACK<OrdinalType, ScalarType>::LARTG( const ScalarType f, const ScalarType g, MagnitudeType* c, ScalarType* s, ScalarType* r ) const 00712 { 00713 return UndefinedLAPACKRoutine<ScalarType>::notDefined(); 00714 } 00715 00716 template<typename OrdinalType, typename ScalarType> 00717 void LAPACK<OrdinalType, ScalarType>::LARFG( const OrdinalType n, ScalarType* alpha, ScalarType* x, const OrdinalType incx, ScalarType* tau ) const 00718 { 00719 return UndefinedLAPACKRoutine<ScalarType>::notDefined(); 00720 } 00721 00722 template<typename OrdinalType, typename ScalarType> 00723 ScalarType LAPACK<OrdinalType, ScalarType>::LARND( const OrdinalType idist, OrdinalType* seed ) const 00724 { 00725 return UndefinedLAPACKRoutine<ScalarType>::notDefined(); 00726 } 00727 00728 template<typename OrdinalType, typename ScalarType> 00729 void LAPACK<OrdinalType, ScalarType>::LARNV( const OrdinalType idist, OrdinalType* seed, const OrdinalType n, ScalarType* v ) const 00730 { 00731 return UndefinedLAPACKRoutine<ScalarType>::notDefined(); 00732 } 00733 00734 // END GENERAL TEMPLATE IMPLEMENTATION // 00735 00736 #ifndef DOXYGEN_SHOULD_SKIP_THIS 00737 00738 // BEGIN FLOAT PARTIAL SPECIALIZATION DECLARATION // 00739 00740 template<typename OrdinalType> 00741 class LAPACK<OrdinalType, float> 00742 { 00743 public: 00744 inline LAPACK(void) {} 00745 inline LAPACK(const LAPACK<OrdinalType, float>& lapack) {} 00746 inline virtual ~LAPACK(void) {} 00747 00748 // Symmetric positive definite linear system routines 00749 void POTRF(const char UPLO, const OrdinalType n, float* A, const OrdinalType lda, OrdinalType* info) const; 00750 void POTRS(const char UPLO, const OrdinalType n, const OrdinalType nrhs, const float* A, const OrdinalType lda, float* B, const OrdinalType ldb, OrdinalType* info) const; 00751 void PTTRF(const OrdinalType n, float* d, float* e, OrdinalType* info) const; 00752 void PTTRS(const OrdinalType n, const OrdinalType nrhs, const float* d, const float* e, float* B, const OrdinalType ldb, OrdinalType* info) const; 00753 void POTRI(const char UPLO, const OrdinalType n, float* A, const OrdinalType lda, OrdinalType* info) const; 00754 void POCON(const char UPLO, const OrdinalType n, const float* A, const OrdinalType lda, const float anorm, float* rcond, float* WORK, OrdinalType* IWORK, OrdinalType* info) const; 00755 void POSV(const char UPLO, const OrdinalType n, const OrdinalType nrhs, float* A, const OrdinalType lda, float* B, const OrdinalType ldb, OrdinalType* info) const; 00756 void POEQU(const OrdinalType n, const float* A, const OrdinalType lda, float* S, float* scond, float* amax, OrdinalType* info) const; 00757 void PORFS(const char UPLO, const OrdinalType n, const OrdinalType nrhs, float* A, const OrdinalType lda, const float* AF, const OrdinalType ldaf, const float* B, const OrdinalType ldb, float* X, const OrdinalType ldx, float* FERR, float* BERR, float* WORK, OrdinalType* IWORK, OrdinalType* info) const; 00758 void POSVX(const char FACT, const char UPLO, const OrdinalType n, const OrdinalType nrhs, float* A, const OrdinalType lda, float* AF, const OrdinalType ldaf, char EQUED, float* S, float* B, const OrdinalType ldb, float* X, const OrdinalType ldx, float* rcond, float* FERR, float* BERR, float* WORK, OrdinalType* IWORK, OrdinalType* info) const; 00759 00760 // General Linear System Routines 00761 void GELS(const char TRANS, const OrdinalType m, const OrdinalType n, const OrdinalType nrhs, float* A, const OrdinalType lda, float* B, const OrdinalType ldb, float* WORK, const OrdinalType lwork, OrdinalType* info) const; 00762 void GELSS(const OrdinalType m, const OrdinalType n, const OrdinalType nrhs, float* A, const OrdinalType lda, float* B, const OrdinalType ldb, float* S, const float rcond, OrdinalType* rank, float* WORK, const OrdinalType lwork, OrdinalType* info) const; 00763 void GGLSE(const OrdinalType m, const OrdinalType n, const OrdinalType p, float* A, const OrdinalType lda, float* B, const OrdinalType ldb, float* C, float* D, float* X, float* WORK, const OrdinalType lwork, OrdinalType* info) const; 00764 void GEQRF( const OrdinalType m, const OrdinalType n, float* A, const OrdinalType lda, float* TAU, float* WORK, const OrdinalType lwork, OrdinalType* info) const; 00765 void GETRF(const OrdinalType m, const OrdinalType n, float* A, const OrdinalType lda, OrdinalType* IPIV, OrdinalType* info) const; 00766 void GETRS(const char TRANS, const OrdinalType n, const OrdinalType nrhs, const float* A, const OrdinalType lda, const OrdinalType* IPIV, float* B, const OrdinalType ldb, OrdinalType* info) const; 00767 void GTTRF(const OrdinalType n, float* dl, float* d, float* du, float* du2, OrdinalType* IPIV, OrdinalType* info) const; 00768 void GTTRS(const char TRANS, const OrdinalType n, const OrdinalType nrhs, const float* dl, const float* d, const float* du, const float* du2, const OrdinalType* IPIV, float* B, const OrdinalType ldb, OrdinalType* info) const; 00769 00770 00771 void GETRI(const OrdinalType n, float* A, const OrdinalType lda, const OrdinalType* IPIV, float* WORK, const OrdinalType lwork, OrdinalType* info) const; 00772 void GECON(const char NORM, const OrdinalType n, const float* A, const OrdinalType lda, const float anorm, float* rcond, float* WORK, OrdinalType* IWORK, OrdinalType* info) const; 00773 void GESV(const OrdinalType n, const OrdinalType nrhs, float* A, const OrdinalType lda, OrdinalType* IPIV, float* B, const OrdinalType ldb, OrdinalType* info) const; 00774 void GEEQU(const OrdinalType m, const OrdinalType n, const float* A, const OrdinalType lda, float* R, float* C, float* rowcond, float* colcond, float* amax, OrdinalType* info) const; 00775 void GERFS(const char TRANS, const OrdinalType n, const OrdinalType nrhs, const float* A, const OrdinalType lda, const float* AF, const OrdinalType ldaf, const OrdinalType* IPIV, const float* B, const OrdinalType ldb, float* X, const OrdinalType ldx, float* FERR, float* BERR, float* WORK, OrdinalType* IWORK, OrdinalType* info) const; 00776 void GESVX(const char FACT, const char TRANS, const OrdinalType n, const OrdinalType nrhs, float* A, const OrdinalType lda, float* AF, const OrdinalType ldaf, OrdinalType* IPIV, char EQUED, float* R, float* C, float* B, const OrdinalType ldb, float* X, const OrdinalType ldx, float* rcond, float* FERR, float* BERR, float* WORK, OrdinalType* IWORK, OrdinalType* info) const; 00777 void SYTRD(const char UPLO, const OrdinalType n, float* A, const OrdinalType lda, float* D, float* E, float* TAU, float* WORK, const OrdinalType lwork, OrdinalType* info) const; 00778 void GEHRD(const OrdinalType n, const OrdinalType ilo, const OrdinalType ihi, float* A, const OrdinalType lda, float* TAU, float* WORK, const OrdinalType lwork, OrdinalType* info) const; 00779 void TRTRS(const char UPLO, const char TRANS, const char DIAG, const OrdinalType n, const OrdinalType nrhs, const float* A, const OrdinalType lda, float* B, const OrdinalType ldb, OrdinalType* info) const; 00780 void TRTRI(const char UPLO, const char DIAG, const OrdinalType n, const float* A, const OrdinalType lda, OrdinalType* info) const; 00781 00782 // Symmetric eigenvalue routines. 00783 void SPEV(const char JOBZ, const char UPLO, const OrdinalType n, float* AP, float* W, float* Z, const OrdinalType ldz, float* WORK, OrdinalType* info) const; 00784 void SYEV(const char JOBZ, const char UPLO, const OrdinalType n, float* A, const OrdinalType lda, float* W, float* WORK, const OrdinalType lwork, OrdinalType* info) const; 00785 void SYGV(const OrdinalType itype, const char JOBZ, const char UPLO, const OrdinalType n, float* A, const OrdinalType lda, float* B, const OrdinalType ldb, float* W, float* WORK, const OrdinalType lwork, OrdinalType* info) const; 00786 void HEEV(const char JOBZ, const char UPLO, const OrdinalType n, float* A, const OrdinalType lda, float* W, float* WORK, const OrdinalType lwork, float* RWORK, OrdinalType* info) const; 00787 void HEGV(const OrdinalType itype, const char JOBZ, const char UPLO, const OrdinalType n, float* A, const OrdinalType lda, float* B, const OrdinalType ldb, float* W, float* WORK, const OrdinalType lwork, float *RWORK, OrdinalType* info) const; 00788 void STEQR(const char COMPZ, const OrdinalType n, float* D, float* E, float* Z, const OrdinalType ldz, float* WORK, OrdinalType* info) const; 00789 00790 // Non-Hermitian eigenvalue routines. 00791 void HSEQR(const char JOB, const char COMPZ, const OrdinalType n, const OrdinalType ilo, const OrdinalType ihi, float* H, const OrdinalType ldh, float* WR, float* WI, float* Z, const OrdinalType ldz, float* WORK, const OrdinalType lwork, OrdinalType* info) const; 00792 void GEES(const char JOBVS, const char SORT, OrdinalType (*ptr2func)(float*, float*), const OrdinalType n, float* A, const OrdinalType lda, OrdinalType* sdim, float* WR, float* WI, float* VS, const OrdinalType ldvs, float* WORK, const OrdinalType lwork, OrdinalType* BWORK, OrdinalType* info) const; 00793 void GEES(const char JOBVS, const OrdinalType n, float* A, const OrdinalType lda, OrdinalType* sdim, float* WR, float* WI, float* VS, const OrdinalType ldvs, float* WORK, const OrdinalType lwork, float* RWORK, OrdinalType* BWORK, OrdinalType* info) const; 00794 void GEEV(const char JOBVL, const char JOBVR, const OrdinalType n, float* A, const OrdinalType lda, float* WR, float* WI, float* VL, const OrdinalType ldvl, float* VR, const OrdinalType ldvr, float* WORK, const OrdinalType lwork, OrdinalType* info) const; 00795 void GGEVX(const char BALANC, const char JOBVL, const char JOBVR, const char SENSE, const OrdinalType n, float* A, const OrdinalType lda, float* B, const OrdinalType ldb, float* ALPHAR, float* ALPHAI, float* BETA, float* VL, const OrdinalType ldvl, float* VR, const OrdinalType ldvr, OrdinalType* ilo, OrdinalType* ihi, float* LSCALE, float* RSCALE, float* abnrm, float* bbnrm, float* RCONDE, float* RCONDV, float* WORK, const OrdinalType lwork, OrdinalType* IWORK, OrdinalType* BWORK, OrdinalType* info) const; 00796 void GGEV(const char JOBVL, const char JOBVR, const OrdinalType n, float *A, const OrdinalType lda, float *B, const OrdinalType ldb, float *ALPHAR, float *ALPHAI, float *BETA, float *VL, const OrdinalType ldvl, float *VR, const OrdinalType ldvr, float *WORK, const OrdinalType lwork, OrdinalType *info) const; 00797 00798 // SVD routine 00799 void GESVD(const char JOBU, const char JOBVT, const OrdinalType m, const OrdinalType n, float* A, const OrdinalType lda, float* S, float* U, const OrdinalType ldu, float* V, const OrdinalType ldv, float* WORK, const OrdinalType lwork, float* RWORK, OrdinalType* info) const; 00800 00801 // Orthogonal matrix routines. 00802 void ORMQR(const char SIDE, const char TRANS, const OrdinalType m, const OrdinalType n, const OrdinalType k, float* A, const OrdinalType lda, const float* TAU, float* C, const OrdinalType ldc, float* WORK, const OrdinalType lwork, OrdinalType* info) const; 00803 void ORGQR(const OrdinalType m, const OrdinalType n, const OrdinalType k, float* A, const OrdinalType lda, const float* TAU, float* WORK, const OrdinalType lwork, OrdinalType* info) const; 00804 void UNGQR(const OrdinalType m, const OrdinalType n, const OrdinalType k, float* A, const OrdinalType lda, const float* TAU, float* WORK, const OrdinalType lwork, OrdinalType* info) const; 00805 void ORGHR(const OrdinalType n, const OrdinalType ilo, const OrdinalType ihi, float* A, const OrdinalType lda, const float* TAU, float* WORK, const OrdinalType lwork, OrdinalType* info) const; 00806 void ORMHR(const char SIDE, const char TRANS, const OrdinalType m, const OrdinalType n, const OrdinalType ilo, const OrdinalType ihi, const float* A, const OrdinalType lda, const float* TAU, float* C, const OrdinalType ldc, float* WORK, const OrdinalType lwork, OrdinalType* info) const; 00807 00808 // Triangular matrix routines. 00809 void TREVC(const char SIDE, const char HOWMNY, OrdinalType* select, const OrdinalType n, const float* T, const OrdinalType ldt, float* VL, const OrdinalType ldvl, float* VR, const OrdinalType ldvr, const OrdinalType mm, OrdinalType* m, float* WORK, OrdinalType* info) const; 00810 void TREVC(const char SIDE, const OrdinalType n, const float* T, const OrdinalType ldt, float* VL, const OrdinalType ldvl, float* VR, const OrdinalType ldvr, const OrdinalType mm, OrdinalType* m, float* WORK, float *RWORK, OrdinalType* info) const; 00811 void TREXC(const char COMPQ, const OrdinalType n, float* T, const OrdinalType ldt, float* Q, const OrdinalType ldq, OrdinalType ifst, OrdinalType ilst, float* WORK, OrdinalType* info) const; 00812 00813 // Rotation/reflection generators 00814 void LARTG( const float f, const float g, float* c, float* s, float* r ) const; 00815 void LARFG( const OrdinalType n, float* alpha, float* x, const OrdinalType incx, float* tau ) const; 00816 00817 // Random number generators 00818 float LARND( const OrdinalType idist, OrdinalType* seed ) const; 00819 void LARNV( const OrdinalType idist, OrdinalType* seed, const OrdinalType n, float* v ) const; 00820 00821 // Machine characteristics. 00822 float LAMCH(const char CMACH) const; 00823 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; 00824 00825 // Miscellaneous routines. 00826 float LAPY2(const float x, const float y) const; 00827 00828 }; 00829 00830 // END FLOAT PARTIAL SPECIALIZATION DECLARATION // 00831 00832 // BEGIN FLOAT PARTIAL SPECIALIZATION IMPLEMENTATION // 00833 00834 template<typename OrdinalType> 00835 void LAPACK<OrdinalType, float>::PTTRF(const OrdinalType n, float* d, float* e, OrdinalType* info) const 00836 { 00837 SPTTRF_F77(&n,d,e,info); 00838 } 00839 00840 template<typename OrdinalType> 00841 void LAPACK<OrdinalType, float>::PTTRS(const OrdinalType n, const OrdinalType nrhs, const float* d, const float* e, float* B, const OrdinalType ldb, OrdinalType* info) const 00842 { 00843 SPTTRS_F77(&n,&nrhs,d,e,B,&ldb,info); 00844 } 00845 00846 template<typename OrdinalType> 00847 void LAPACK<OrdinalType, float>::POTRF(const char UPLO, const OrdinalType n, float* A, const OrdinalType lda, OrdinalType* info) const 00848 { 00849 SPOTRF_F77(CHAR_MACRO(UPLO), &n, A, &lda, info); 00850 } 00851 00852 template<typename OrdinalType> 00853 void LAPACK<OrdinalType, float>::POTRS(const char UPLO, const OrdinalType n, const OrdinalType nrhs, const float* A, const OrdinalType lda, float* B, const OrdinalType ldb, OrdinalType* info) const 00854 { 00855 SPOTRS_F77(CHAR_MACRO(UPLO), &n, &nrhs, A, &lda, B, &ldb, info); 00856 } 00857 00858 template<typename OrdinalType> 00859 void LAPACK<OrdinalType, float>::POTRI(const char UPLO, const OrdinalType n, float* A, const OrdinalType lda, OrdinalType* info) const 00860 { 00861 SPOTRI_F77(CHAR_MACRO(UPLO), &n, A, &lda, info); 00862 } 00863 00864 template<typename OrdinalType> 00865 void LAPACK<OrdinalType, float>::POCON(const char UPLO, const OrdinalType n, const float* A, const OrdinalType lda, const float anorm, float* rcond, float* WORK, OrdinalType* IWORK, OrdinalType* info) const 00866 { 00867 SPOCON_F77(CHAR_MACRO(UPLO), &n, A, &lda, &anorm, rcond, WORK, IWORK, info); 00868 } 00869 00870 template<typename OrdinalType> 00871 void LAPACK<OrdinalType, float>::POSV(const char UPLO, const OrdinalType n, const OrdinalType nrhs, float* A, const OrdinalType lda, float* B, const OrdinalType ldb, OrdinalType* info) const 00872 { 00873 SPOSV_F77(CHAR_MACRO(UPLO), &n, &nrhs, A, &lda, B, &ldb, info); 00874 } 00875 00876 template<typename OrdinalType> 00877 void LAPACK<OrdinalType, float>::POEQU(const OrdinalType n, const float* A, const OrdinalType lda, float* S, float* scond, float* amax, OrdinalType* info) const 00878 { 00879 SPOEQU_F77(&n, A, &lda, S, scond, amax, info); 00880 } 00881 00882 template<typename OrdinalType> 00883 void LAPACK<OrdinalType, float>::PORFS(const char UPLO, const OrdinalType n, const OrdinalType nrhs, float* A, const OrdinalType lda, const float* AF, const OrdinalType ldaf, const float* B, const OrdinalType ldb, float* X, const OrdinalType ldx, float* FERR, float* BERR, float* WORK, OrdinalType* IWORK, OrdinalType* info) const 00884 { 00885 SPORFS_F77(CHAR_MACRO(UPLO), &n, &nrhs, A, &lda, AF, &ldaf, B, &ldb, X, &ldx, FERR, BERR, WORK, IWORK, info); 00886 } 00887 00888 template<typename OrdinalType> 00889 void LAPACK<OrdinalType, float>::POSVX(const char FACT, const char UPLO, const OrdinalType n, const OrdinalType nrhs, float* A, const OrdinalType lda, float* AF, const OrdinalType ldaf, char EQUED, float* S, float* B, const OrdinalType ldb, float* X, const OrdinalType ldx, float* rcond, float* FERR, float* BERR, float* WORK, OrdinalType* IWORK, OrdinalType* info) const 00890 { 00891 SPOSVX_F77(CHAR_MACRO(FACT), CHAR_MACRO(UPLO), &n, &nrhs, A, &lda, AF, &ldaf, CHAR_MACRO(EQUED), S, B, &ldb, X, &ldx, rcond, FERR, BERR, WORK, IWORK, info); 00892 } 00893 00894 template<typename OrdinalType> 00895 void LAPACK<OrdinalType,float>::GELS(const char TRANS, const OrdinalType m, const OrdinalType n, const OrdinalType nrhs, float* A, const OrdinalType lda, float* B, const OrdinalType ldb, float* WORK, const OrdinalType lwork, OrdinalType* info) const 00896 { 00897 SGELS_F77(CHAR_MACRO(TRANS), &m, &n, &nrhs, A, &lda, B, &ldb, WORK, &lwork, info); 00898 } 00899 00900 template<typename OrdinalType> 00901 void LAPACK<OrdinalType,float>::GELSS(const OrdinalType m, const OrdinalType n, const OrdinalType nrhs, float* A, const OrdinalType lda, float* B, const OrdinalType ldb, float* S, const float rcond, OrdinalType* rank, float* WORK, const OrdinalType lwork, OrdinalType* info) const 00902 { 00903 SGELSS_F77(&m, &n, &nrhs, A, &lda, B, &ldb, S, &rcond, rank, WORK, &lwork, info); 00904 } 00905 00906 template<typename OrdinalType> 00907 void LAPACK<OrdinalType,float>::GGLSE(const OrdinalType m, const OrdinalType n, const OrdinalType p, float* A, const OrdinalType lda, float* B, const OrdinalType ldb, float* C, float* D, float* X, float* WORK, const OrdinalType lwork, OrdinalType* info) const 00908 { 00909 SGGLSE_F77(&m, &n, &p, A, &lda, B, &ldb, C, D, X, WORK, &lwork, info); 00910 } 00911 00912 template<typename OrdinalType> 00913 void LAPACK<OrdinalType,float>::GEQRF( const OrdinalType m, const OrdinalType n, float* A, const OrdinalType lda, float* TAU, float* WORK, const OrdinalType lwork, OrdinalType* info) const 00914 { 00915 SGEQRF_F77(&m, &n, A, &lda, TAU, WORK, &lwork, info); 00916 } 00917 00918 template<typename OrdinalType> 00919 void LAPACK<OrdinalType,float>::GETRF(const OrdinalType m, const OrdinalType n, float* A, const OrdinalType lda, OrdinalType* IPIV, OrdinalType* info) const 00920 { 00921 SGETRF_F77(&m, &n, A, &lda, IPIV, info); 00922 } 00923 00924 template<typename OrdinalType> 00925 void LAPACK<OrdinalType,float>::GETRS(const char TRANS, const OrdinalType n, const OrdinalType nrhs, const float* A, const OrdinalType lda, const OrdinalType* IPIV, float* B, const OrdinalType ldb, OrdinalType* info) const 00926 { 00927 SGETRS_F77(CHAR_MACRO(TRANS), &n, &nrhs, A, &lda, IPIV, B, &ldb, info); 00928 } 00929 00930 template<typename OrdinalType> 00931 void LAPACK<OrdinalType,float>::GTTRF(const OrdinalType n, float* dl, float* d, float* du, float* du2, OrdinalType* IPIV, OrdinalType* info) const 00932 { 00933 SGTTRF_F77(&n, dl, d, du, du2, IPIV, info); 00934 } 00935 00936 template<typename OrdinalType> 00937 void LAPACK<OrdinalType,float>::GTTRS(const char TRANS, const OrdinalType n, const OrdinalType nrhs, const float* dl, const float* d, const float* du, const float* du2, const OrdinalType* IPIV, float* B, const OrdinalType ldb, OrdinalType* info) const 00938 { 00939 SGTTRS_F77(CHAR_MACRO(TRANS), &n, &nrhs, dl, d, du, du2, IPIV, B, &ldb, info); 00940 } 00941 00942 template<typename OrdinalType> 00943 void LAPACK<OrdinalType,float>::GETRI(const OrdinalType n, float* A, const OrdinalType lda, const OrdinalType* IPIV, float* WORK, const OrdinalType lwork, OrdinalType* info) const 00944 { 00945 SGETRI_F77(&n, A, &lda, IPIV, WORK, &lwork, info); 00946 } 00947 00948 template<typename OrdinalType> 00949 void LAPACK<OrdinalType,float>::GECON(const char NORM, const OrdinalType n, const float* A, const OrdinalType lda, const float anorm, float* rcond, float* WORK, OrdinalType* IWORK, OrdinalType* info) const 00950 { 00951 SGECON_F77(CHAR_MACRO(NORM), &n, A, &lda, &anorm, rcond, WORK, IWORK, info); 00952 } 00953 00954 template<typename OrdinalType> 00955 void LAPACK<OrdinalType,float>::GESV(const OrdinalType n, const OrdinalType nrhs, float* A, const OrdinalType lda, OrdinalType* IPIV, float* B, const OrdinalType ldb, OrdinalType* info) const 00956 { 00957 SGESV_F77(&n, &nrhs, A, &lda, IPIV, B, &ldb, info); 00958 } 00959 00960 template<typename OrdinalType> 00961 void LAPACK<OrdinalType,float>::GEEQU(const OrdinalType m, const OrdinalType n, const float* A, const OrdinalType lda, float* R, float* C, float* rowcond, float* colcond, float* amax, OrdinalType* info) const 00962 { 00963 SGEEQU_F77(&m, &n, A, &lda, R, C, rowcond, colcond, amax, info); 00964 } 00965 00966 template<typename OrdinalType> 00967 void LAPACK<OrdinalType,float>::GERFS(const char TRANS, const OrdinalType n, const OrdinalType nrhs, const float* A, const OrdinalType lda, const float* AF, const OrdinalType ldaf, const OrdinalType* IPIV, const float* B, const OrdinalType ldb, float* X, const OrdinalType ldx, float* FERR, float* BERR, float* WORK, OrdinalType* IWORK, OrdinalType* info) const 00968 { 00969 SGERFS_F77(CHAR_MACRO(TRANS), &n, &nrhs, A, &lda, AF, &ldaf, IPIV, B, &ldb, X, &ldx, FERR, BERR, WORK, IWORK, info); 00970 } 00971 00972 template<typename OrdinalType> 00973 void LAPACK<OrdinalType,float>::GESVX(const char FACT, const char TRANS, const OrdinalType n, const OrdinalType nrhs, float* A, const OrdinalType lda, float* AF, const OrdinalType ldaf, OrdinalType* IPIV, char EQUED, float* R, float* C, float* B, const OrdinalType ldb, float* X, const OrdinalType ldx, float* rcond, float* FERR, float* BERR, float* WORK, OrdinalType* IWORK, OrdinalType* info) const 00974 { 00975 SGESVX_F77(CHAR_MACRO(FACT), CHAR_MACRO(TRANS), &n, &nrhs, A, &lda, AF, &ldaf, IPIV, CHAR_MACRO(EQUED), R, C, B, &ldb, X, &ldx, rcond, FERR, BERR, WORK, IWORK, info); 00976 } 00977 00978 template<typename OrdinalType> 00979 void LAPACK<OrdinalType,float>::SYTRD(const char UPLO, const OrdinalType n, float* A, const OrdinalType lda, float* D, float* E, float* TAU, float* WORK, const OrdinalType lwork, OrdinalType* info) const 00980 { 00981 SSYTRD_F77(CHAR_MACRO(UPLO), &n, A, &lda, D, E, TAU, WORK, &lwork, info); 00982 } 00983 00984 template<typename OrdinalType> 00985 void LAPACK<OrdinalType,float>::GEHRD(const OrdinalType n, const OrdinalType ilo, const OrdinalType ihi, float* A, const OrdinalType lda, float* TAU, float* WORK, const OrdinalType lwork, OrdinalType* info) const 00986 { 00987 SGEHRD_F77(&n, &ilo, &ihi, A, &lda, TAU, WORK, &lwork, info); 00988 } 00989 00990 template<typename OrdinalType> 00991 void LAPACK<OrdinalType,float>::TRTRS(const char UPLO, const char TRANS, const char DIAG, const OrdinalType n, const OrdinalType nrhs, const float* A, const OrdinalType lda, float* B, const OrdinalType ldb, OrdinalType* info) const 00992 { 00993 STRTRS_F77(CHAR_MACRO(UPLO), CHAR_MACRO(TRANS), CHAR_MACRO(DIAG), &n, &nrhs, A, &lda, B, &ldb, info); 00994 } 00995 00996 template<typename OrdinalType> 00997 void LAPACK<OrdinalType,float>::TRTRI(const char UPLO, const char DIAG, const OrdinalType n, const float* A, const OrdinalType lda, OrdinalType* info) const 00998 { 00999 STRTRI_F77(CHAR_MACRO(UPLO), CHAR_MACRO(DIAG), &n, A, &lda, info); 01000 } 01001 01002 template<typename OrdinalType> 01003 void LAPACK<OrdinalType,float>::SPEV(const char JOBZ, const char UPLO, const OrdinalType n, float* AP, float* W, float* Z, const OrdinalType ldz, float* WORK, OrdinalType* info) const 01004 { 01005 SSPEV_F77(CHAR_MACRO(JOBZ), CHAR_MACRO(UPLO), &n, AP, W, Z, &ldz, WORK, info); 01006 } 01007 01008 template<typename OrdinalType> 01009 void LAPACK<OrdinalType,float>::SYEV(const char JOBZ, const char UPLO, const OrdinalType n, float* A, const OrdinalType lda, float* W, float* WORK, const OrdinalType lwork, OrdinalType* info) const 01010 { 01011 SSYEV_F77(CHAR_MACRO(JOBZ), CHAR_MACRO(UPLO), &n, A, &lda, W, WORK, &lwork, info); 01012 } 01013 01014 template<typename OrdinalType> 01015 void LAPACK<OrdinalType,float>::SYGV(const OrdinalType itype, const char JOBZ, const char UPLO, const OrdinalType n, float* A, const OrdinalType lda, float* B, const OrdinalType ldb, float* W, float* WORK, const OrdinalType lwork, OrdinalType* info) const 01016 { 01017 SSYGV_F77(&itype, CHAR_MACRO(JOBZ), CHAR_MACRO(UPLO), &n, A, &lda, B, &ldb, W, WORK, &lwork, info); 01018 } 01019 01020 template<typename OrdinalType> 01021 void LAPACK<OrdinalType,float>::HEEV(const char JOBZ, const char UPLO, const OrdinalType n, float* A, const OrdinalType lda, float* W, float* WORK, const OrdinalType lwork, float* RWORK, OrdinalType* info) const 01022 { 01023 SSYEV_F77(CHAR_MACRO(JOBZ), CHAR_MACRO(UPLO), &n, A, &lda, W, WORK, &lwork, info); 01024 } 01025 01026 template<typename OrdinalType> 01027 void LAPACK<OrdinalType,float>::HEGV(const OrdinalType itype, const char JOBZ, const char UPLO, const OrdinalType n, float* A, const OrdinalType lda, float* B, const OrdinalType ldb, float* W, float* WORK, const OrdinalType lwork, float *RWORK, OrdinalType* info) const 01028 { 01029 SSYGV_F77(&itype, CHAR_MACRO(JOBZ), CHAR_MACRO(UPLO), &n, A, &lda, B, &ldb, W, WORK, &lwork, info); 01030 } 01031 01032 template<typename OrdinalType> 01033 void LAPACK<OrdinalType,float>::STEQR(const char COMPZ, const OrdinalType n, float* D, float* E, float* Z, const OrdinalType ldz, float* WORK, OrdinalType* info) const 01034 { 01035 SSTEQR_F77(CHAR_MACRO(COMPZ), &n, D, E, Z, &ldz, WORK, info); 01036 } 01037 01038 template<typename OrdinalType> 01039 void LAPACK<OrdinalType, float>::HSEQR(const char JOB, const char COMPZ, const OrdinalType n, const OrdinalType ilo, const OrdinalType ihi, float* H, const OrdinalType ldh, float* WR, float* WI, float* Z, const OrdinalType ldz, float* WORK, const OrdinalType lwork, OrdinalType* info) const 01040 { 01041 SHSEQR_F77(CHAR_MACRO(JOB), CHAR_MACRO(COMPZ), &n, &ilo, &ihi, H, &ldh, WR, WI, Z, &ldz, WORK, &lwork, info); 01042 } 01043 01044 template<typename OrdinalType> 01045 void LAPACK<OrdinalType, float>::GEES(const char JOBVS, const char SORT, OrdinalType (*ptr2func)(float*, float*), const OrdinalType n, float* A, const OrdinalType lda, OrdinalType* sdim, float* WR, float* WI, float* VS, const OrdinalType ldvs, float* WORK, const OrdinalType lwork, OrdinalType* BWORK, OrdinalType* info) const 01046 { 01047 SGEES_F77(CHAR_MACRO(JOBVS), CHAR_MACRO(SORT), ptr2func, &n, A, &lda, sdim, WR, WI, VS, &ldvs, WORK, &lwork, BWORK, info); 01048 } 01049 01050 template<typename OrdinalType> 01051 void LAPACK<OrdinalType, float>::GEES(const char JOBVS, const OrdinalType n, float* A, const OrdinalType lda, OrdinalType* sdim, float* WR, float* WI, float* VS, const OrdinalType ldvs, float* WORK, const OrdinalType lwork, float* RWORK, OrdinalType* BWORK, OrdinalType* info) const 01052 { 01053 OrdinalType (*nullfptr)(float*,float*) = NULL; 01054 const char sort = 'N'; 01055 SGEES_F77(CHAR_MACRO(JOBVS), CHAR_MACRO(sort), nullfptr, &n, A, &lda, sdim, WR, WI, VS, &ldvs, WORK, &lwork, BWORK, info); 01056 } 01057 01058 template<typename OrdinalType> 01059 void LAPACK<OrdinalType, float>::GEEV(const char JOBVL, const char JOBVR, const OrdinalType n, float* A, const OrdinalType lda, float* WR, float* WI, float* VL, const OrdinalType ldvl, float* VR, const OrdinalType ldvr, float* WORK, const OrdinalType lwork, OrdinalType* info) const 01060 { 01061 SGEEV_F77(CHAR_MACRO(JOBVL), CHAR_MACRO(JOBVR), &n, A, &lda, WR, WI, VL, &ldvl, VR, &ldvr, WORK, &lwork, info); 01062 } 01063 01064 template<typename OrdinalType> 01065 void LAPACK<OrdinalType, float>::GESVD(const char JOBU, const char JOBVT, const OrdinalType m, const OrdinalType n, float* A, const OrdinalType lda, float* S, float* U, const OrdinalType ldu, float* V, const OrdinalType ldv, float* WORK, const OrdinalType lwork, float* RWORK, OrdinalType* info) const { 01066 SGESVD_F77(CHAR_MACRO(JOBU), CHAR_MACRO(JOBVT), &m, &n, A, &lda, S, U, &ldu, V, &ldv, WORK, &lwork, info); 01067 } 01068 01069 template<typename OrdinalType> 01070 void LAPACK<OrdinalType,float>::GGEVX(const char BALANC, const char JOBVL, const char JOBVR, const char SENSE, const OrdinalType n, float* A, const OrdinalType lda, float* B, const OrdinalType ldb, float* ALPHAR, float* ALPHAI, float* BETA, float* VL, const OrdinalType ldvl, float* VR, const OrdinalType ldvr, OrdinalType* ilo, OrdinalType* ihi, float* LSCALE, float* RSCALE, float* abnrm, float* bbnrm, float* RCONDE, float* RCONDV, float* WORK, const OrdinalType lwork, OrdinalType* IWORK, OrdinalType* BWORK, OrdinalType* info) const 01071 { 01072 SGGEVX_F77(CHAR_MACRO(BALANC), CHAR_MACRO(JOBVL), CHAR_MACRO(JOBVR), CHAR_MACRO(SENSE), &n, A, &lda, B, &ldb, ALPHAR, ALPHAI, BETA, VL, &ldvl, VR, &ldvr, ilo, ihi, LSCALE, RSCALE, abnrm, bbnrm, RCONDE, RCONDV, WORK, &lwork, IWORK, BWORK, info); 01073 } 01074 01075 template<typename OrdinalType> 01076 void LAPACK<OrdinalType, float>::GGEV(const char JOBVL, const char JOBVR, const OrdinalType n, float *A, const OrdinalType lda, float *B, const OrdinalType ldb, float *ALPHAR, float *ALPHAI, float *BETA, float *VL, const OrdinalType ldvl, float *VR, const OrdinalType ldvr, float *WORK, const OrdinalType lwork, OrdinalType *info) const 01077 { 01078 SGGEV_F77(CHAR_MACRO(JOBVL), CHAR_MACRO(JOBVR), &n, A, &lda, B, &ldb, ALPHAR, ALPHAI, BETA, VL, &ldvl, VR, &ldvr, WORK, &lwork, info); 01079 } 01080 01081 template<typename OrdinalType> 01082 void LAPACK<OrdinalType, float>::ORMQR(const char SIDE, const char TRANS, const OrdinalType m, const OrdinalType n, const OrdinalType k, float* A, const OrdinalType lda, const float* TAU, float* C, const OrdinalType ldc, float* WORK, const OrdinalType lwork, OrdinalType* info) const 01083 { 01084 SORMQR_F77(CHAR_MACRO(SIDE), CHAR_MACRO(TRANS), &m, &n, &k, A, &lda, TAU, C, &ldc, WORK, &lwork, info); 01085 } 01086 01087 template<typename OrdinalType> 01088 void LAPACK<OrdinalType, float>::ORGQR(const OrdinalType m, const OrdinalType n, const OrdinalType k, float* A, const OrdinalType lda, const float* TAU, float* WORK, const OrdinalType lwork, OrdinalType* info) const 01089 { 01090 SORGQR_F77( &m, &n, &k, A, &lda, TAU, WORK, &lwork, info); 01091 } 01092 01093 template<typename OrdinalType> 01094 void LAPACK<OrdinalType, float>::UNGQR(const OrdinalType m, const OrdinalType n, const OrdinalType k, float* A, const OrdinalType lda, const float* TAU, float* WORK, const OrdinalType lwork, OrdinalType* info) const 01095 { 01096 SORGQR_F77( &m, &n, &k, A, &lda, TAU, WORK, &lwork, info); 01097 } 01098 01099 template<typename OrdinalType> 01100 void LAPACK<OrdinalType, float>::ORGHR(const OrdinalType n, const OrdinalType ilo, const OrdinalType ihi, float* A, const OrdinalType lda, const float* TAU, float* WORK, const OrdinalType lwork, OrdinalType* info) const 01101 { 01102 SORGHR_F77(&n, &ilo, &ihi, A, &lda, TAU, WORK, &lwork, info); 01103 } 01104 01105 template<typename OrdinalType> 01106 void LAPACK<OrdinalType, float>::ORMHR(const char SIDE, const char TRANS, const OrdinalType m, const OrdinalType n, const OrdinalType ilo, const OrdinalType ihi, const float* A, const OrdinalType lda, const float* TAU, float* C, const OrdinalType ldc, float* WORK, const OrdinalType lwork, OrdinalType* info) const 01107 { 01108 SORMHR_F77(CHAR_MACRO(SIDE), CHAR_MACRO(TRANS), &m, &n, &ilo, &ihi, A, &lda, TAU, C, &ldc, WORK, &lwork, info); 01109 } 01110 01111 template<typename OrdinalType> 01112 void LAPACK<OrdinalType, float>::TREVC(const char SIDE, const char HOWMNY, OrdinalType* select, const OrdinalType n, const float* T, const OrdinalType ldt, float* VL, const OrdinalType ldvl, float* VR, const OrdinalType ldvr, const OrdinalType mm, OrdinalType* m, float* WORK, OrdinalType* info) const 01113 { 01114 STREVC_F77(CHAR_MACRO(SIDE), CHAR_MACRO(HOWMNY), select, &n, T, &ldt, VL, &ldvl, VR, &ldvr, &mm, m, WORK, info); 01115 } 01116 01117 template<typename OrdinalType> 01118 void LAPACK<OrdinalType, float>::TREVC(const char SIDE, const OrdinalType n, const float* T, const OrdinalType ldt, float* VL, const OrdinalType ldvl, float* VR, const OrdinalType ldvr, const OrdinalType mm, OrdinalType* m, float* WORK, float* RWORK, OrdinalType* info) const 01119 { 01120 std::vector<OrdinalType> select(1); 01121 const char whch = 'A'; 01122 STREVC_F77(CHAR_MACRO(SIDE), CHAR_MACRO(whch), &select[0], &n, T, &ldt, VL, &ldvl, VR, &ldvr, &mm, m, WORK, info); 01123 } 01124 01125 template<typename OrdinalType> 01126 void LAPACK<OrdinalType, float>::TREXC(const char COMPQ, const OrdinalType n, float* T, const OrdinalType ldt, float* Q, const OrdinalType ldq, OrdinalType ifst, OrdinalType ilst, float* WORK, OrdinalType* info) const 01127 { 01128 STREXC_F77(CHAR_MACRO(COMPQ), &n, T, &ldt, Q, &ldq, &ifst, &ilst, WORK, info); 01129 } 01130 01131 template<typename OrdinalType> 01132 void LAPACK<OrdinalType, float>::LARTG( const float f, const float g, float* c, float* s, float* r ) const 01133 { 01134 SLARTG_F77(&f, &g, c, s, r); 01135 } 01136 01137 template<typename OrdinalType> 01138 void LAPACK<OrdinalType, float>::LARFG( const OrdinalType n, float* alpha, float* x, const OrdinalType incx, float* tau ) const 01139 { 01140 SLARFG_F77(&n, alpha, x, &incx, tau); 01141 } 01142 01143 template<typename OrdinalType> 01144 float LAPACK<OrdinalType, float>::LARND( const OrdinalType idist, OrdinalType* seed ) const 01145 { 01146 return(SLARND_F77(&idist, seed)); 01147 } 01148 01149 template<typename OrdinalType> 01150 void LAPACK<OrdinalType, float>::LARNV( const OrdinalType idist, OrdinalType* seed, const OrdinalType n, float* v ) const 01151 { 01152 SLARNV_F77(&idist, seed, &n, v); 01153 } 01154 01155 template<typename OrdinalType> 01156 float LAPACK<OrdinalType, float>::LAMCH(const char CMACH) const 01157 { 01158 return(SLAMCH_F77(CHAR_MACRO(CMACH))); 01159 } 01160 01161 template<typename OrdinalType> 01162 OrdinalType LAPACK<OrdinalType, float>::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 01163 { 01164 unsigned int opts_length = OPTS.length(); 01165 // if user queries a Hermitian routine, change it to a symmetric routine 01166 std::string temp_NAME = "s" + NAME; 01167 if (temp_NAME.substr(1,2) == "he") { 01168 temp_NAME.replace(1,2,"sy"); 01169 } 01170 unsigned int name_length = temp_NAME.length(); 01171 #if defined (INTEL_CXML) 01172 return ILAENV_F77(&ispec, &temp_NAME[0], name_length, &OPTS[0], opts_length, &N1, &N2, &N3, &N4 ); 01173 #else 01174 return ILAENV_F77(&ispec, &temp_NAME[0], &OPTS[0], &N1, &N2, &N3, &N4, name_length, opts_length ); 01175 #endif 01176 } 01177 01178 template<typename OrdinalType> 01179 float LAPACK<OrdinalType, float>::LAPY2(const float x, const float y) const 01180 { 01181 #ifdef HAVE_TEUCHOS_BLASFLOAT 01182 return SLAPY2_F77(&x, &y); 01183 #else 01184 typedef ScalarTraits<float> ST; 01185 const float xabs = ST::magnitude(x); 01186 const float yabs = ST::magnitude(y); 01187 const float w = TEUCHOS_MAX(xabs, yabs); 01188 const float z = TEUCHOS_MIN(xabs, yabs); 01189 if ( z == 0.0 ) { 01190 return w; 01191 } 01192 const float z_over_w = z/w; 01193 return w*ST::squareroot( 1.0+(z_over_w*z_over_w)); 01194 #endif 01195 } 01196 01197 // END FLOAT PARTIAL SPECIALIZATION IMPLEMENTATION // 01198 01199 // BEGIN DOUBLE PARTIAL SPECIALIZATION DECLARATION // 01200 01201 template<typename OrdinalType> 01202 class LAPACK<OrdinalType, double> 01203 { 01204 public: 01205 inline LAPACK(void) {} 01206 inline LAPACK(const LAPACK<OrdinalType, double>& lapack) {} 01207 inline virtual ~LAPACK(void) {} 01208 01209 // Symmetric positive definite linear system routines 01210 void PTTRF(const OrdinalType n, double* d, double* e, OrdinalType* info) const; 01211 void PTTRS(const OrdinalType n, const OrdinalType nrhs, const double* d, const double* e, double* B, const OrdinalType ldb, OrdinalType* info) const; 01212 void POTRF(const char UPLO, const OrdinalType n, double* A, const OrdinalType lda, OrdinalType* info) const; 01213 void POTRS(const char UPLO, const OrdinalType n, const OrdinalType nrhs, const double* A, const OrdinalType lda, double* B, const OrdinalType ldb, OrdinalType* info) const; 01214 void POTRI(const char UPLO, const OrdinalType n, double* A, const OrdinalType lda, OrdinalType* info) const; 01215 void POCON(const char UPLO, const OrdinalType n, const double* A, const OrdinalType lda, const double anorm, double* rcond, double* WORK, OrdinalType* IWORK, OrdinalType* info) const; 01216 void POSV(const char UPLO, const OrdinalType n, const OrdinalType nrhs, double* A, const OrdinalType lda, double* B, const OrdinalType ldb, OrdinalType* info) const; 01217 void POEQU(const OrdinalType n, const double* A, const OrdinalType lda, double* S, double* scond, double* amax, OrdinalType* info) const; 01218 void PORFS(const char UPLO, const OrdinalType n, const OrdinalType nrhs, double* A, const OrdinalType lda, const double* AF, const OrdinalType ldaf, const double* B, const OrdinalType ldb, double* X, const OrdinalType ldx, double* FERR, double* BERR, double* WORK, OrdinalType* IWORK, OrdinalType* info) const; 01219 void POSVX(const char FACT, const char UPLO, const OrdinalType n, const OrdinalType nrhs, double* A, const OrdinalType lda, double* AF, const OrdinalType ldaf, char EQUED, double* S, double* B, const OrdinalType ldb, double* X, const OrdinalType ldx, double* rcond, double* FERR, double* BERR, double* WORK, OrdinalType* IWORK, OrdinalType* info) const; 01220 01221 // General linear system routines 01222 void GELS(const char TRANS, const OrdinalType m, const OrdinalType n, const OrdinalType nrhs, double* A, const OrdinalType lda, double* B, const OrdinalType ldb, double* WORK, const OrdinalType lwork, OrdinalType* info) const; 01223 void GELSS(const OrdinalType m, const OrdinalType n, const OrdinalType nrhs, double* A, const OrdinalType lda, double* B, const OrdinalType ldb, double* S, const double rcond, OrdinalType* rank, double* WORK, const OrdinalType lwork, OrdinalType* info) const; 01224 void GGLSE(const OrdinalType m, const OrdinalType n, const OrdinalType p, double* A, const OrdinalType lda, double* B, const OrdinalType ldb, double* C, double* D, double* X, double* WORK, const OrdinalType lwork, OrdinalType* info) const; 01225 void GEQRF( const OrdinalType m, const OrdinalType n, double* A, const OrdinalType lda, double* TAU, double* WORK, const OrdinalType lwork, OrdinalType* info) const; 01226 void GETRF(const OrdinalType m, const OrdinalType n, double* A, const OrdinalType lda, OrdinalType* IPIV, OrdinalType* info) const; 01227 void GETRS(const char TRANS, const OrdinalType n, const OrdinalType nrhs, const double* A, const OrdinalType lda, const OrdinalType* IPIV, double* B, const OrdinalType ldb, OrdinalType* info) const; 01228 void GTTRF(const OrdinalType n, double* dl, double* d, double* du, double* du2, OrdinalType* IPIV, OrdinalType* info) const; 01229 void GTTRS(const char TRANS, const OrdinalType n, const OrdinalType nrhs, const double* dl, const double* d, const double* du, const double* du2, const OrdinalType* IPIV, double* B, const OrdinalType ldb, OrdinalType* info) const; 01230 void GETRI(const OrdinalType n, double* A, const OrdinalType lda, const OrdinalType* IPIV, double* WORK, const OrdinalType lwork, OrdinalType* info) const; 01231 void GECON(const char NORM, const OrdinalType n, const double* A, const OrdinalType lda, const double anorm, double* rcond, double* WORK, OrdinalType* IWORK, OrdinalType* info) const; 01232 void GESV(const OrdinalType n, const OrdinalType nrhs, double* A, const OrdinalType lda, OrdinalType* IPIV, double* B, const OrdinalType ldb, OrdinalType* info) const; 01233 void GEEQU(const OrdinalType m, const OrdinalType n, const double* A, const OrdinalType lda, double* R, double* C, double* rowcond, double* colcond, double* amax, OrdinalType* info) const; 01234 void GERFS(const char TRANS, const OrdinalType n, const OrdinalType nrhs, const double* A, const OrdinalType lda, const double* AF, const OrdinalType ldaf, const OrdinalType* IPIV, const double* B, const OrdinalType ldb, double* X, const OrdinalType ldx, double* FERR, double* BERR, double* WORK, OrdinalType* IWORK, OrdinalType* info) const; 01235 void GESVX(const char FACT, const char TRANS, const OrdinalType n, const OrdinalType nrhs, double* A, const OrdinalType lda, double* AF, const OrdinalType ldaf, OrdinalType* IPIV, char EQUED, double* R, double* C, double* B, const OrdinalType ldb, double* X, const OrdinalType ldx, double* rcond, double* FERR, double* BERR, double* WORK, OrdinalType* IWORK, OrdinalType* info) const; 01236 void SYTRD(const char UPLO, const OrdinalType n, double* A, const OrdinalType lda, double* D, double* E, double* TAU, double* WORK, const OrdinalType lwork, OrdinalType* info) const; 01237 void GEHRD(const OrdinalType n, const OrdinalType ilo, const OrdinalType ihi, double* A, const OrdinalType lda, double* TAU, double* WORK, const OrdinalType lwork, OrdinalType* info) const; 01238 void TRTRS(const char UPLO, const char TRANS, const char DIAG, const OrdinalType n, const OrdinalType nrhs, const double* A, const OrdinalType lda, double* B, const OrdinalType ldb, OrdinalType* info) const; 01239 void TRTRI(const char UPLO, const char DIAG, const OrdinalType n, const double* A, const OrdinalType lda, OrdinalType* info) const; 01240 01241 // Symmetric eigenproblem routines. 01242 void SPEV(const char JOBZ, const char UPLO, const OrdinalType n, double* AP, double* W, double* Z, const OrdinalType ldz, double* WORK, OrdinalType* info) const; 01243 void SYEV(const char JOBZ, const char UPLO, const OrdinalType n, double* A, const OrdinalType lda, double* W, double* WORK, const OrdinalType lwork, OrdinalType* info) const; 01244 void SYGV(const OrdinalType itype, const char JOBZ, const char UPLO, const OrdinalType n, double* A, const OrdinalType lda, double* B, const OrdinalType ldb, double* W, double* WORK, const OrdinalType lwork, OrdinalType* info) const; 01245 void HEEV(const char JOBZ, const char UPLO, const OrdinalType n, double* A, const OrdinalType lda, double* W, double* WORK, const OrdinalType lwork, double* RWORK, OrdinalType* info) const; 01246 void HEGV(const OrdinalType itype, const char JOBZ, const char UPLO, const OrdinalType n, double* A, const OrdinalType lda, double* B, const OrdinalType ldb, double* W, double* WORK, const OrdinalType lwork, double *RWORK, OrdinalType* info) const; 01247 void STEQR(const char COMPZ, const OrdinalType n, double* D, double* E, double* Z, const OrdinalType ldz, double* WORK, OrdinalType* info) const; 01248 01249 // Non-Hermitian eigenproblem routines. 01250 void HSEQR(const char JOB, const char COMPZ, const OrdinalType n, const OrdinalType ilo, const OrdinalType ihi, double* H, const OrdinalType ldh, double* WR, double* WI, double* Z, const OrdinalType ldz, double* WORK, const OrdinalType lwork, OrdinalType* info) const; 01251 void GEES(const char JOBVS, const char SORT, OrdinalType (*ptr2func)(double*, double*), const OrdinalType n, double* A, const OrdinalType lda, OrdinalType* sdim, double* WR, double* WI, double* VS, const OrdinalType ldvs, double* WORK, const OrdinalType lwork, OrdinalType* BWORK, OrdinalType* info) const; 01252 void GEES(const char JOBVS, const OrdinalType n, double* A, const OrdinalType lda, OrdinalType* sdim, double* WR, double* WI, double* VS, const OrdinalType ldvs, double* WORK, const OrdinalType lwork, double* RWORK, OrdinalType* BWORK, OrdinalType* info) const; 01253 void GEEV(const char JOBVL, const char JOBVR, const OrdinalType n, double* A, const OrdinalType lda, double* WR, double* WI, double* VL, const OrdinalType ldvl, double* VR, const OrdinalType ldvr, double* WORK, const OrdinalType lwork, OrdinalType* info) const; 01254 void GGEVX(const char BALANC, const char JOBVL, const char JOBVR, const char SENSE, const OrdinalType n, double* A, const OrdinalType lda, double* B, const OrdinalType ldb, double* ALPHAR, double* ALPHAI, double* BETA, double* VL, const OrdinalType ldvl, double* VR, const OrdinalType ldvr, OrdinalType* ilo, OrdinalType* ihi, double* LSCALE, double* RSCALE, double* abnrm, double* bbnrm, double* RCONDE, double* RCONDV, double* WORK, const OrdinalType lwork, OrdinalType* IWORK, OrdinalType* BWORK, OrdinalType* info) const; 01255 void GGEV(const char JOBVL, const char JOBVR, const OrdinalType n, double *A, const OrdinalType lda, double *B, const OrdinalType ldb, double *ALPHAR, double *ALPHAI, double *BETA, double *VL, const OrdinalType ldvl, double *VR, const OrdinalType ldvr, double *WORK, const OrdinalType lwork, OrdinalType *info) const; 01256 01257 01258 // SVD routine 01259 void GESVD(const char JOBU, const char JOBVT, const OrdinalType m, const OrdinalType n, double* A, const OrdinalType lda, double* S, double* U, const OrdinalType ldu, double* V, const OrdinalType ldv, double* WORK, const OrdinalType lwork, double* RWORK, OrdinalType* info) const; 01260 01261 // Orthogonal matrix routines. 01262 void ORMQR(const char SIDE, const char TRANS, const OrdinalType m, const OrdinalType n, const OrdinalType k, double* A, const OrdinalType lda, const double* TAU, double* C, const OrdinalType ldc, double* WORK, const OrdinalType lwork, OrdinalType* info) const; 01263 void ORGQR(const OrdinalType m, const OrdinalType n, const OrdinalType k, double* A, const OrdinalType lda, const double* TAU, double* WORK, const OrdinalType lwork, OrdinalType* info) const; 01264 void UNGQR(const OrdinalType m, const OrdinalType n, const OrdinalType k, double* A, const OrdinalType lda, const double* TAU, double* WORK, const OrdinalType lwork, OrdinalType* info) const; 01265 void ORGHR(const OrdinalType n, const OrdinalType ilo, const OrdinalType ihi, double* A, const OrdinalType lda, const double* TAU, double* WORK, const OrdinalType lwork, OrdinalType* info) const; 01266 void ORMHR(const char SIDE, const char TRANS, const OrdinalType m, const OrdinalType n, const OrdinalType ilo, const OrdinalType ihi, const double* A, const OrdinalType lda, const double* TAU, double* C, const OrdinalType ldc, double* WORK, const OrdinalType lwork, OrdinalType* info) const; 01267 01268 // Triangular matrix routines. 01269 void TREVC(const char SIDE, const char HOWMNY, OrdinalType* select, const OrdinalType n, const double* T, const OrdinalType ldt, double* VL, const OrdinalType ldvl, double* VR, const OrdinalType ldvr, const OrdinalType mm, OrdinalType* m, double* WORK, OrdinalType* info) const; 01270 void TREVC(const char SIDE, const OrdinalType n, const double* T, const OrdinalType ldt, double* VL, const OrdinalType ldvl, double* VR, const OrdinalType ldvr, const OrdinalType mm, OrdinalType* m, double* WORK, double* RWORK, OrdinalType* info) const; 01271 void TREXC(const char COMPQ, const OrdinalType n, double* T, const OrdinalType ldt, double* Q, const OrdinalType ldq, OrdinalType ifst, OrdinalType ilst, double* WORK, OrdinalType* info) const; 01272 01273 // Rotation/reflection generators 01274 void LARTG( const double f, const double g, double* c, double* s, double* r ) const; 01275 void LARFG( const OrdinalType n, double* alpha, double* x, const OrdinalType incx, double* tau ) const; 01276 01277 // Random number generators 01278 double LARND( const OrdinalType idist, OrdinalType* seed ) const; 01279 void LARNV( const OrdinalType idist, OrdinalType* seed, const OrdinalType n, double* v ) const; 01280 01281 // Machine characteristic routines. 01282 double LAMCH(const char CMACH) const; 01283 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; 01284 01285 // Miscellaneous routines. 01286 double LAPY2(const double x, const double y) const; 01287 01288 }; 01289 01290 // END DOUBLE PARTIAL SPECIALIZATION DECLARATION // 01291 01292 // BEGIN DOUBLE PARTIAL SPECIALIZATION IMPLEMENTATION // 01293 01294 01295 template<typename OrdinalType> 01296 void LAPACK<OrdinalType, double>::PTTRF(const OrdinalType n, double* d, double* e, OrdinalType* info) const 01297 { 01298 DPTTRF_F77(&n,d,e,info); 01299 } 01300 01301 template<typename OrdinalType> 01302 void LAPACK<OrdinalType, double>::PTTRS(const OrdinalType n, const OrdinalType nrhs, const double* d, const double* e, double* B, const OrdinalType ldb, OrdinalType* info) const 01303 { 01304 DPTTRS_F77(&n,&nrhs,d,e,B,&ldb,info); 01305 } 01306 01307 template<typename OrdinalType> 01308 void LAPACK<OrdinalType, double>::POTRF(const char UPLO, const OrdinalType n, double* A, const OrdinalType lda, OrdinalType* info) const 01309 { 01310 DPOTRF_F77(CHAR_MACRO(UPLO), &n, A, &lda, info); 01311 } 01312 01313 template<typename OrdinalType> 01314 void LAPACK<OrdinalType, double>::POTRS(const char UPLO, const OrdinalType n, const OrdinalType nrhs, const double* A, const OrdinalType lda, double* B, const OrdinalType ldb, OrdinalType* info) const 01315 { 01316 DPOTRS_F77(CHAR_MACRO(UPLO), &n, &nrhs, A, &lda, B, &ldb, info); 01317 } 01318 01319 template<typename OrdinalType> 01320 void LAPACK<OrdinalType, double>::POTRI(const char UPLO, const OrdinalType n, double* A, const OrdinalType lda, OrdinalType* info) const 01321 { 01322 DPOTRI_F77(CHAR_MACRO(UPLO), &n, A, &lda, info); 01323 } 01324 01325 template<typename OrdinalType> 01326 void LAPACK<OrdinalType, double>::POCON(const char UPLO, const OrdinalType n, const double* A, const OrdinalType lda, const double anorm, double* rcond, double* WORK, OrdinalType* IWORK, OrdinalType* info) const 01327 { 01328 DPOCON_F77(CHAR_MACRO(UPLO), &n, A, &lda, &anorm, rcond, WORK, IWORK, info); 01329 } 01330 01331 template<typename OrdinalType> 01332 void LAPACK<OrdinalType, double>::POSV(const char UPLO, const OrdinalType n, const OrdinalType nrhs, double* A, const OrdinalType lda, double* B, const OrdinalType ldb, OrdinalType* info) const 01333 { 01334 DPOSV_F77(CHAR_MACRO(UPLO), &n, &nrhs, A, &lda, B, &ldb, info); 01335 } 01336 01337 template<typename OrdinalType> 01338 void LAPACK<OrdinalType, double>::POEQU(const OrdinalType n, const double* A, const OrdinalType lda, double* S, double* scond, double* amax, OrdinalType* info) const 01339 { 01340 DPOEQU_F77(&n, A, &lda, S, scond, amax, info); 01341 } 01342 01343 template<typename OrdinalType> 01344 void LAPACK<OrdinalType, double>::PORFS(const char UPLO, const OrdinalType n, const OrdinalType nrhs, double* A, const OrdinalType lda, const double* AF, const OrdinalType ldaf, const double* B, const OrdinalType ldb, double* X, const OrdinalType ldx, double* FERR, double* BERR, double* WORK, OrdinalType* IWORK, OrdinalType* info) const 01345 { 01346 DPORFS_F77(CHAR_MACRO(UPLO), &n, &nrhs, A, &lda, AF, &ldaf, B, &ldb, X, &ldx, FERR, BERR, WORK, IWORK, info); 01347 } 01348 01349 template<typename OrdinalType> 01350 void LAPACK<OrdinalType, double>::POSVX(const char FACT, const char UPLO, const OrdinalType n, const OrdinalType nrhs, double* A, const OrdinalType lda, double* AF, const OrdinalType ldaf, char EQUED, double* S, double* B, const OrdinalType ldb, double* X, const OrdinalType ldx, double* rcond, double* FERR, double* BERR, double* WORK, OrdinalType* IWORK, OrdinalType* info) const 01351 { 01352 DPOSVX_F77(CHAR_MACRO(FACT), CHAR_MACRO(UPLO), &n, &nrhs, A, &lda, AF, &ldaf, CHAR_MACRO(EQUED), S, B, &ldb, X, &ldx, rcond, FERR, BERR, WORK, IWORK, info); 01353 } 01354 01355 template<typename OrdinalType> 01356 void LAPACK<OrdinalType,double>::GELS(const char TRANS, const OrdinalType m, const OrdinalType n, const OrdinalType nrhs, double* A, const OrdinalType lda, double* B, const OrdinalType ldb, double* WORK, const OrdinalType lwork, OrdinalType* info) const 01357 { 01358 DGELS_F77(CHAR_MACRO(TRANS), &m, &n, &nrhs, A, &lda, B, &ldb, WORK, &lwork, &info); 01359 } 01360 01361 template<typename OrdinalType> 01362 void LAPACK<OrdinalType,double>::GELSS(const OrdinalType m, const OrdinalType n, const OrdinalType nrhs, double* A, const OrdinalType lda, double* B, const OrdinalType ldb, double* S, const double rcond, OrdinalType* rank, double* WORK, const OrdinalType lwork, OrdinalType* info) const 01363 { 01364 DGELSS_F77(&m, &n, &nrhs, A, &lda, B, &ldb, S, &rcond, rank, WORK, &lwork, info); 01365 } 01366 01367 template<typename OrdinalType> 01368 void LAPACK<OrdinalType,double>::GGLSE(const OrdinalType m, const OrdinalType n, const OrdinalType p, double* A, const OrdinalType lda, double* B, const OrdinalType ldb, double* C, double* D, double* X, double* WORK, const OrdinalType lwork, OrdinalType* info) const 01369 { 01370 DGGLSE_F77(&m, &n, &p, A, &lda, B, &ldb, C, D, X, WORK, &lwork, info); 01371 } 01372 01373 template<typename OrdinalType> 01374 void LAPACK<OrdinalType,double>::GEQRF( const OrdinalType m, const OrdinalType n, double* A, const OrdinalType lda, double* TAU, double* WORK, const OrdinalType lwork, OrdinalType* info) const 01375 { 01376 DGEQRF_F77(&m, &n, A, &lda, TAU, WORK, &lwork, info); 01377 } 01378 01379 template<typename OrdinalType> 01380 void LAPACK<OrdinalType,double>::GETRF(const OrdinalType m, const OrdinalType n, double* A, const OrdinalType lda, OrdinalType* IPIV, OrdinalType* info) const 01381 { 01382 DGETRF_F77(&m, &n, A, &lda, IPIV, info); 01383 } 01384 01385 template<typename OrdinalType> 01386 void LAPACK<OrdinalType,double>::GETRS(const char TRANS, const OrdinalType n, const OrdinalType nrhs, const double* A, const OrdinalType lda, const OrdinalType* IPIV, double* B, const OrdinalType ldb, OrdinalType* info) const 01387 { 01388 DGETRS_F77(CHAR_MACRO(TRANS), &n, &nrhs, A, &lda, IPIV, B, &ldb, info); 01389 } 01390 01391 template<typename OrdinalType> 01392 void LAPACK<OrdinalType,double>::GTTRF(const OrdinalType n, double* dl, double* d, double* du, double* du2, OrdinalType* IPIV, OrdinalType* info) const 01393 { 01394 DGTTRF_F77(&n, dl, d, du, du2, IPIV, info); 01395 } 01396 01397 template<typename OrdinalType> 01398 void LAPACK<OrdinalType,double>::GTTRS(const char TRANS, const OrdinalType n, const OrdinalType nrhs, const double* dl, const double* d, const double* du, const double* du2, const OrdinalType* IPIV, double* B, const OrdinalType ldb, OrdinalType* info) const 01399 { 01400 DGTTRS_F77(CHAR_MACRO(TRANS), &n, &nrhs, dl, d, du, du2, IPIV, B, &ldb, info); 01401 } 01402 01403 template<typename OrdinalType> 01404 void LAPACK<OrdinalType,double>::GETRI(const OrdinalType n, double* A, const OrdinalType lda, const OrdinalType* IPIV, double* WORK, const OrdinalType lwork, OrdinalType* info) const 01405 { 01406 DGETRI_F77(&n, A, &lda, IPIV, WORK, &lwork, info); 01407 } 01408 01409 template<typename OrdinalType> 01410 void LAPACK<OrdinalType,double>::GECON(const char NORM, const OrdinalType n, const double* A, const OrdinalType lda, const double anorm, double* rcond, double* WORK, OrdinalType* IWORK, OrdinalType* info) const 01411 { 01412 DGECON_F77(CHAR_MACRO(NORM), &n, A, &lda, &anorm, rcond, WORK, IWORK, info); 01413 } 01414 01415 template<typename OrdinalType> 01416 void LAPACK<OrdinalType,double>::GESV(const OrdinalType n, const OrdinalType nrhs, double* A, const OrdinalType lda, OrdinalType* IPIV, double* B, const OrdinalType ldb, OrdinalType* info) const 01417 { 01418 DGESV_F77(&n, &nrhs, A, &lda, IPIV, B, &ldb, info); 01419 } 01420 01421 template<typename OrdinalType> 01422 void LAPACK<OrdinalType,double>::GEEQU(const OrdinalType m, const OrdinalType n, const double* A, const OrdinalType lda, double* R, double* C, double* rowcond, double* colcond, double* amax, OrdinalType* info) const 01423 { 01424 DGEEQU_F77(&m, &n, A, &lda, R, C, rowcond, colcond, amax, info); 01425 } 01426 01427 template<typename OrdinalType> 01428 void LAPACK<OrdinalType,double>::GERFS(const char TRANS, const OrdinalType n, const OrdinalType nrhs, const double* A, const OrdinalType lda, const double* AF, const OrdinalType ldaf, const OrdinalType* IPIV, const double* B, const OrdinalType ldb, double* X, const OrdinalType ldx, double* FERR, double* BERR, double* WORK, OrdinalType* IWORK, OrdinalType* info) const 01429 { 01430 DGERFS_F77(CHAR_MACRO(TRANS), &n, &nrhs, A, &lda, AF, &ldaf, IPIV, B, &ldb, X, &ldx, FERR, BERR, WORK, IWORK, info); 01431 } 01432 01433 template<typename OrdinalType> 01434 void LAPACK<OrdinalType,double>::GESVX(const char FACT, const char TRANS, const OrdinalType n, const OrdinalType nrhs, double* A, const OrdinalType lda, double* AF, const OrdinalType ldaf, OrdinalType* IPIV, char EQUED, double* R, double* C, double* B, const OrdinalType ldb, double* X, const OrdinalType ldx, double* rcond, double* FERR, double* BERR, double* WORK, OrdinalType* IWORK, OrdinalType* info) const 01435 { 01436 DGESVX_F77(CHAR_MACRO(FACT), CHAR_MACRO(TRANS), &n, &nrhs, A, &lda, AF, &ldaf, IPIV, CHAR_MACRO(EQUED), R, C, B, &ldb, X, &ldx, rcond, FERR, BERR, WORK, IWORK, info); 01437 } 01438 01439 template<typename OrdinalType> 01440 void LAPACK<OrdinalType,double>::SYTRD(const char UPLO, const OrdinalType n, double* A, const OrdinalType lda, double* D, double* E, double* TAU, double* WORK, const OrdinalType lwork, OrdinalType* info) const 01441 { 01442 DSYTRD_F77(CHAR_MACRO(UPLO), &n, A, &lda, D, E, TAU, WORK, &lwork, info); 01443 } 01444 01445 template<typename OrdinalType> 01446 void LAPACK<OrdinalType, double>::GEHRD(const OrdinalType n, const OrdinalType ilo, const OrdinalType ihi, double* A, const OrdinalType lda, double* TAU, double* WORK, const OrdinalType lwork, OrdinalType* info) const 01447 { 01448 DGEHRD_F77(&n, &ilo, &ihi, A, &lda, TAU, WORK, &lwork, info); 01449 } 01450 01451 template<typename OrdinalType> 01452 void LAPACK<OrdinalType,double>::TRTRS(const char UPLO, const char TRANS, const char DIAG, const OrdinalType n, const OrdinalType nrhs, const double* A, const OrdinalType lda, double* B, const OrdinalType ldb, OrdinalType* info) const 01453 { 01454 DTRTRS_F77(CHAR_MACRO(UPLO), CHAR_MACRO(TRANS), CHAR_MACRO(DIAG), &n, &nrhs, A, &lda, B, &ldb, info); 01455 } 01456 01457 template<typename OrdinalType> 01458 void LAPACK<OrdinalType,double>::TRTRI(const char UPLO, const char DIAG, const OrdinalType n, const double* A, const OrdinalType lda, OrdinalType* info) const 01459 { 01460 DTRTRI_F77(CHAR_MACRO(UPLO), CHAR_MACRO(DIAG), &n, A, &lda, info); 01461 } 01462 01463 template<typename OrdinalType> 01464 void LAPACK<OrdinalType,double>::SPEV(const char JOBZ, const char UPLO, const OrdinalType n, double* AP, double* W, double* Z, const OrdinalType ldz, double* WORK, OrdinalType* info) const 01465 { 01466 DSPEV_F77(CHAR_MACRO(JOBZ), CHAR_MACRO(UPLO), &n, AP, W, Z, &ldz, WORK, info); 01467 } 01468 01469 template<typename OrdinalType> 01470 void LAPACK<OrdinalType,double>::SYEV(const char JOBZ, const char UPLO, const OrdinalType n, double* A, const OrdinalType lda, double* W, double* WORK, const OrdinalType lwork, OrdinalType* info) const 01471 { 01472 DSYEV_F77(CHAR_MACRO(JOBZ), CHAR_MACRO(UPLO), &n, A, &lda, W, WORK, &lwork, info); 01473 } 01474 01475 template<typename OrdinalType> 01476 void LAPACK<OrdinalType,double>::SYGV(const OrdinalType itype, const char JOBZ, const char UPLO, const OrdinalType n, double* A, const OrdinalType lda, double* B, const OrdinalType ldb, double* W, double* WORK, const OrdinalType lwork, OrdinalType* info) const 01477 { 01478 DSYGV_F77(&itype, CHAR_MACRO(JOBZ), CHAR_MACRO(UPLO), &n, A, &lda, B, &ldb, W, WORK, &lwork, info); 01479 } 01480 01481 template<typename OrdinalType> 01482 void LAPACK<OrdinalType,double>::HEEV(const char JOBZ, const char UPLO, const OrdinalType n, double* A, const OrdinalType lda, double* W, double* WORK, const OrdinalType lwork, double* RWORK, OrdinalType* info) const 01483 { 01484 DSYEV_F77(CHAR_MACRO(JOBZ), CHAR_MACRO(UPLO), &n, A, &lda, W, WORK, &lwork, info); 01485 } 01486 01487 template<typename OrdinalType> 01488 void LAPACK<OrdinalType,double>::HEGV(const OrdinalType itype, const char JOBZ, const char UPLO, const OrdinalType n, double* A, const OrdinalType lda, double* B, const OrdinalType ldb, double* W, double* WORK, const OrdinalType lwork, double *RWORK, OrdinalType* info) const 01489 { 01490 DSYGV_F77(&itype, CHAR_MACRO(JOBZ), CHAR_MACRO(UPLO), &n, A, &lda, B, &ldb, W, WORK, &lwork, info); 01491 } 01492 01493 template<typename OrdinalType> 01494 void LAPACK<OrdinalType,double>::STEQR(const char COMPZ, const OrdinalType n, double* D, double* E, double* Z, const OrdinalType ldz, double* WORK, OrdinalType* info) const 01495 { 01496 DSTEQR_F77(CHAR_MACRO(COMPZ), &n, D, E, Z, &ldz, WORK, info); 01497 } 01498 01499 template<typename OrdinalType> 01500 void LAPACK<OrdinalType, double>::HSEQR(const char JOB, const char COMPZ, const OrdinalType n, const OrdinalType ilo, const OrdinalType ihi, double* H, const OrdinalType ldh, double* WR, double* WI, double* Z, const OrdinalType ldz, double* WORK, const OrdinalType lwork, OrdinalType* info) const 01501 { 01502 DHSEQR_F77(CHAR_MACRO(JOB), CHAR_MACRO(COMPZ), &n, &ilo, &ihi, H, &ldh, WR, WI, Z, &ldz, WORK, &lwork, info); 01503 } 01504 01505 template<typename OrdinalType> 01506 void LAPACK<OrdinalType, double>::GEES(const char JOBVS, const char SORT, OrdinalType (*ptr2func)(double*, double*), const OrdinalType n, double* A, const OrdinalType lda, OrdinalType* sdim, double* WR, double* WI, double* VS, const OrdinalType ldvs, double* WORK, const OrdinalType lwork, OrdinalType* BWORK, OrdinalType* info) const 01507 { 01508 DGEES_F77(CHAR_MACRO(JOBVS), CHAR_MACRO(SORT), ptr2func, &n, A, &lda, sdim, WR, WI, VS, &ldvs, WORK, &lwork, BWORK, info); 01509 } 01510 01511 template<typename OrdinalType> 01512 void LAPACK<OrdinalType, double>::GEES(const char JOBVS, const OrdinalType n, double* A, const OrdinalType lda, OrdinalType* sdim, double* WR, double* WI, double* VS, const OrdinalType ldvs, double* WORK, const OrdinalType lwork, double* RWORK, OrdinalType* BWORK, OrdinalType* info) const 01513 { 01514 //OrdinalType (*nullfptr)(double*,double*) = NULL; 01515 gees_nullfptr_t nullfptr = 0; 01516 const char sort = 'N'; 01517 DGEES_F77(CHAR_MACRO(JOBVS), CHAR_MACRO(sort), nullfptr, &n, A, &lda, sdim, WR, WI, VS, &ldvs, WORK, &lwork, BWORK, info); 01518 } 01519 01520 template<typename OrdinalType> 01521 void LAPACK<OrdinalType, double>::GEEV(const char JOBVL, const char JOBVR, const OrdinalType n, double* A, const OrdinalType lda, double* WR, double* WI, double* VL, const OrdinalType ldvl, double* VR, const OrdinalType ldvr, double* WORK, const OrdinalType lwork, OrdinalType* info) const 01522 { 01523 DGEEV_F77(CHAR_MACRO(JOBVL), CHAR_MACRO(JOBVR), &n, A, &lda, WR, WI, VL, &ldvl, VR, &ldvr, WORK, &lwork, info); 01524 } 01525 01526 template<typename OrdinalType> 01527 void LAPACK<OrdinalType, double>::GESVD(const char JOBU, const char JOBVT, const OrdinalType m, const OrdinalType n, double* A, const OrdinalType lda, double* S, double* U, const OrdinalType ldu, double* V, const OrdinalType ldv, double* WORK, const OrdinalType lwork, double* RWORK, OrdinalType* info) const { 01528 DGESVD_F77(CHAR_MACRO(JOBU), CHAR_MACRO(JOBVT), &m, &n, A, &lda, S, U, &ldu, V, &ldv, WORK, &lwork, info); 01529 } 01530 01531 template<typename OrdinalType> 01532 void LAPACK<OrdinalType, double>::GGEVX(const char BALANC, const char JOBVL, const char JOBVR, const char SENSE, const OrdinalType n, double* A, const OrdinalType lda, double* B, const OrdinalType ldb, double* ALPHAR, double* ALPHAI, double* BETA, double* VL, const OrdinalType ldvl, double* VR, const OrdinalType ldvr, OrdinalType* ilo, OrdinalType* ihi, double* LSCALE, double* RSCALE, double* abnrm, double* bbnrm, double* RCONDE, double* RCONDV, double* WORK, const OrdinalType lwork, OrdinalType* IWORK, OrdinalType* BWORK, OrdinalType* info) const 01533 { 01534 DGGEVX_F77(CHAR_MACRO(BALANC), CHAR_MACRO(JOBVL), CHAR_MACRO(JOBVR), CHAR_MACRO(SENSE), &n, A, &lda, B, &ldb, ALPHAR, ALPHAI, BETA, VL, &ldvl, VR, &ldvr, ilo, ihi, LSCALE, RSCALE, abnrm, bbnrm, RCONDE, RCONDV, WORK, &lwork, IWORK, BWORK, info); 01535 } 01536 01537 template<typename OrdinalType> 01538 void LAPACK<OrdinalType, double>::GGEV(const char JOBVL, const char JOBVR, const OrdinalType n, double *A, const OrdinalType lda, double *B, const OrdinalType ldb, double *ALPHAR, double *ALPHAI, double *BETA, double *VL, const OrdinalType ldvl, double *VR, const OrdinalType ldvr, double *WORK, const OrdinalType lwork, OrdinalType *info) const 01539 { 01540 DGGEV_F77(CHAR_MACRO(JOBVL), CHAR_MACRO(JOBVR), &n, A, &lda, B, &ldb, ALPHAR, ALPHAI, BETA, VL, &ldvl, VR, &ldvr, WORK, &lwork, info); 01541 } 01542 01543 template<typename OrdinalType> 01544 void LAPACK<OrdinalType, double>::ORMQR(const char SIDE, const char TRANS, const OrdinalType m, const OrdinalType n, const OrdinalType k, double* A, const OrdinalType lda, const double* TAU, double* C, const OrdinalType ldc, double* WORK, const OrdinalType lwork, OrdinalType* info) const 01545 { 01546 DORMQR_F77(CHAR_MACRO(SIDE), CHAR_MACRO(TRANS), &m, &n, &k, A, &lda, TAU, C, &ldc, WORK, &lwork, info); 01547 } 01548 01549 template<typename OrdinalType> 01550 void LAPACK<OrdinalType, double>::ORGQR(const OrdinalType m, const OrdinalType n, const OrdinalType k, double* A, const OrdinalType lda, const double* TAU, double* WORK, const OrdinalType lwork, OrdinalType* info) const 01551 { 01552 DORGQR_F77( &m, &n, &k, A, &lda, TAU, WORK, &lwork, info); 01553 } 01554 01555 template<typename OrdinalType> 01556 void LAPACK<OrdinalType, double>::UNGQR(const OrdinalType m, const OrdinalType n, const OrdinalType k, double* A, const OrdinalType lda, const double* TAU, double* WORK, const OrdinalType lwork, OrdinalType* info) const 01557 { 01558 DORGQR_F77( &m, &n, &k, A, &lda, TAU, WORK, &lwork, info); 01559 } 01560 01561 template<typename OrdinalType> 01562 void LAPACK<OrdinalType, double>::ORGHR(const OrdinalType n, const OrdinalType ilo, const OrdinalType ihi, double* A, const OrdinalType lda, const double* TAU, double* WORK, const OrdinalType lwork, OrdinalType* info) const 01563 { 01564 DORGHR_F77(&n, &ilo, &ihi, A, &lda, TAU, WORK, &lwork, info); 01565 } 01566 01567 template<typename OrdinalType> 01568 void LAPACK<OrdinalType, double>::ORMHR(const char SIDE, const char TRANS, const OrdinalType m, const OrdinalType n, const OrdinalType ilo, const OrdinalType ihi, const double* A, const OrdinalType lda, const double* TAU, double* C, const OrdinalType ldc, double* WORK, const OrdinalType lwork, OrdinalType* info) const 01569 { 01570 DORMHR_F77(CHAR_MACRO(SIDE), CHAR_MACRO(TRANS), &m, &n, &ilo, &ihi, A, &lda, TAU, C, &ldc, WORK, &lwork, info); 01571 } 01572 01573 template<typename OrdinalType> 01574 void LAPACK<OrdinalType, double>::TREVC(const char SIDE, const char HOWMNY, OrdinalType* select, const OrdinalType n, const double* T, const OrdinalType ldt, double* VL, const OrdinalType ldvl, double* VR, const OrdinalType ldvr, const OrdinalType mm, OrdinalType* m, double* WORK, OrdinalType* info) const 01575 { 01576 DTREVC_F77(CHAR_MACRO(SIDE), CHAR_MACRO(HOWMNY), select, &n, T, &ldt, VL, &ldvl, VR, &ldvr, &mm, m, WORK, info); 01577 } 01578 01579 template<typename OrdinalType> 01580 void LAPACK<OrdinalType, double>::TREVC(const char SIDE, const OrdinalType n, const double* T, const OrdinalType ldt, double* VL, const OrdinalType ldvl, double* VR, const OrdinalType ldvr, const OrdinalType mm, OrdinalType* m, double* WORK, double* RWORK, OrdinalType* info) const 01581 { 01582 std::vector<OrdinalType> select(1); 01583 const char whch = 'A'; 01584 DTREVC_F77(CHAR_MACRO(SIDE), CHAR_MACRO(whch), &select[0], &n, T, &ldt, VL, &ldvl, VR, &ldvr, &mm, m, WORK, info); 01585 } 01586 01587 template<typename OrdinalType> 01588 void LAPACK<OrdinalType, double>::TREXC(const char COMPQ, const OrdinalType n, double* T, const OrdinalType ldt, double* Q, const OrdinalType ldq, OrdinalType ifst, OrdinalType ilst, double* WORK, OrdinalType* info) const 01589 { 01590 DTREXC_F77(CHAR_MACRO(COMPQ), &n, T, &ldt, Q, &ldq, &ifst, &ilst, WORK, info); 01591 } 01592 01593 template<typename OrdinalType> 01594 void LAPACK<OrdinalType, double>::LARTG( const double f, const double g, double* c, double* s, double* r ) const 01595 { 01596 DLARTG_F77(&f, &g, c, s, r); 01597 } 01598 01599 template<typename OrdinalType> 01600 void LAPACK<OrdinalType, double>::LARFG( const OrdinalType n, double* alpha, double* x, const OrdinalType incx, double* tau ) const 01601 { 01602 DLARFG_F77(&n, alpha, x, &incx, tau); 01603 } 01604 01605 template<typename OrdinalType> 01606 double LAPACK<OrdinalType, double>::LARND( const OrdinalType idist, OrdinalType* seed ) const 01607 { 01608 return(DLARND_F77(&idist, seed)); 01609 } 01610 01611 template<typename OrdinalType> 01612 void LAPACK<OrdinalType, double>::LARNV( const OrdinalType idist, OrdinalType* seed, const OrdinalType n, double* v ) const 01613 { 01614 DLARNV_F77(&idist, seed, &n, v); 01615 } 01616 01617 template<typename OrdinalType> 01618 double LAPACK<OrdinalType, double>::LAMCH(const char CMACH) const 01619 { 01620 return(DLAMCH_F77(CHAR_MACRO(CMACH))); 01621 } 01622 01623 template<typename OrdinalType> 01624 OrdinalType LAPACK<OrdinalType, double>::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 01625 { 01626 unsigned int opts_length = OPTS.length(); 01627 // if user queries a Hermitian routine, change it to a symmetric routine 01628 std::string temp_NAME = "d" + NAME; 01629 if (temp_NAME.substr(1,2) == "he") { 01630 temp_NAME.replace(1,2,"sy"); 01631 } 01632 unsigned int name_length = temp_NAME.length(); 01633 #if defined(INTEL_CXML) 01634 return ILAENV_F77(&ispec, &temp_NAME[0], name_length, &OPTS[0], opts_length, &N1, &N2, &N3, &N4 ); 01635 #else 01636 return ::ILAENV_F77(&ispec, &temp_NAME[0], &OPTS[0], &N1, &N2, &N3, &N4, name_length, opts_length ); 01637 #endif 01638 } 01639 01640 template<typename OrdinalType> 01641 double LAPACK<OrdinalType, double>::LAPY2(const double x, const double y) const 01642 { 01643 return DLAPY2_F77(&x, &y); 01644 } 01645 01646 // END DOUBLE PARTIAL SPECIALIZATION IMPLEMENTATION // 01647 01648 #ifdef HAVE_TEUCHOS_COMPLEX 01649 01650 // BEGIN COMPLEX<FLOAT> PARTIAL SPECIALIZATION DECLARATION // 01651 01652 template<typename OrdinalType> 01653 class LAPACK<OrdinalType, std::complex<float> > 01654 { 01655 public: 01656 inline LAPACK(void) {} 01657 inline LAPACK(const LAPACK<OrdinalType, std::complex<float> >& lapack) {} 01658 inline virtual ~LAPACK(void) {} 01659 01660 // Symmetric positive definite linear system routines 01661 void PTTRF(const OrdinalType n, std::complex<float>* d, std::complex<float>* e, OrdinalType* info) const; 01662 void PTTRS(const OrdinalType n, const OrdinalType nrhs, const std::complex<float>* d, const std::complex<float>* e, std::complex<float>* B, const OrdinalType ldb, OrdinalType* info) const; 01663 void POTRF(const char UPLO, const OrdinalType n, std::complex<float>* A, const OrdinalType lda, OrdinalType* info) const; 01664 void POTRS(const char UPLO, const OrdinalType n, const OrdinalType nrhs, const std::complex<float>* A, const OrdinalType lda, std::complex<float>* B, const OrdinalType ldb, OrdinalType* info) const; 01665 void POTRI(const char UPLO, const OrdinalType n, std::complex<float>* A, const OrdinalType lda, OrdinalType* info) const; 01666 void POCON(const char UPLO, const OrdinalType n, const std::complex<float>* A, const OrdinalType lda, const float anorm, float* rcond, std::complex<float>* WORK, float* rwork, OrdinalType* info) const; 01667 void POSV(const char UPLO, const OrdinalType n, const OrdinalType nrhs, std::complex<float>* A, const OrdinalType lda, std::complex<float>* B, const OrdinalType ldb, OrdinalType* info) const; 01668 void POEQU(const OrdinalType n, const std::complex<float>* A, const OrdinalType lda, float* S, float* scond, float* amax, OrdinalType* info) const; 01669 void PORFS(const char UPLO, const OrdinalType n, const OrdinalType nrhs, std::complex<float>* A, const OrdinalType lda, const std::complex<float>* AF, const OrdinalType ldaf, const std::complex<float>* B, const OrdinalType ldb, std::complex<float>* X, const OrdinalType ldx, float* FERR, float* BERR, std::complex<float>* WORK, float* RWORK, OrdinalType* info) const; 01670 void POSVX(const char FACT, const char UPLO, const OrdinalType n, const OrdinalType nrhs, std::complex<float>* A, const OrdinalType lda, std::complex<float>* AF, const OrdinalType ldaf, char EQUED, float* S, std::complex<float>* B, const OrdinalType ldb, std::complex<float>* X, const OrdinalType ldx, float* rcond, float* FERR, float* BERR, std::complex<float>* WORK, float* RWORK, OrdinalType* info) const; 01671 01672 // General Linear System Routines 01673 void GELS(const char TRANS, const OrdinalType m, const OrdinalType n, const OrdinalType nrhs, std::complex<float>* A, const OrdinalType lda, std::complex<float>* B, const OrdinalType ldb, std::complex<float>* WORK, const OrdinalType lwork, OrdinalType* info) const; 01674 void GEQRF( const OrdinalType m, const OrdinalType n, std::complex<float>* A, const OrdinalType lda, std::complex<float>* TAU, std::complex<float>* WORK, const OrdinalType lwork, OrdinalType* info) const; 01675 void UNGQR(const OrdinalType m, const OrdinalType n, const OrdinalType k, std::complex<float>* A, const OrdinalType lda, const std::complex<float>* TAU, std::complex<float>* WORK, const OrdinalType lwork, OrdinalType* info) const; 01676 void GETRF(const OrdinalType m, const OrdinalType n, std::complex<float>* A, const OrdinalType lda, OrdinalType* IPIV, OrdinalType* info) const; 01677 void GETRS(const char TRANS, const OrdinalType n, const OrdinalType nrhs, const std::complex<float>* A, const OrdinalType lda, const OrdinalType* IPIV, std::complex<float>* B, const OrdinalType ldb, OrdinalType* info) const; 01678 void GTTRF(const OrdinalType n, std::complex<float>* dl, std::complex<float>* d, std::complex<float>* du, std::complex<float>* du2, OrdinalType* IPIV, OrdinalType* info) const; 01679 void GTTRS(const char TRANS, const OrdinalType n, const OrdinalType nrhs, const std::complex<float>* dl, const std::complex<float>* d, const std::complex<float>* du, const std::complex<float>* du2, const OrdinalType* IPIV, std::complex<float>* B, const OrdinalType ldb, OrdinalType* info) const; 01680 void GETRI(const OrdinalType n, std::complex<float>* A, const OrdinalType lda, const OrdinalType* IPIV, std::complex<float>* WORK, const OrdinalType lwork, OrdinalType* info) const; 01681 void GECON(const char NORM, const OrdinalType n, const std::complex<float>* A, const OrdinalType lda, const float anorm, float* rcond, std::complex<float>* WORK, float* RWORK, OrdinalType* info) const; 01682 void GESV(const OrdinalType n, const OrdinalType nrhs, std::complex<float>* A, const OrdinalType lda, OrdinalType* IPIV, std::complex<float>* B, const OrdinalType ldb, OrdinalType* info) const; 01683 void GEEQU(const OrdinalType m, const OrdinalType n, const std::complex<float>* A, const OrdinalType lda, float* R, float* C, float* rowcond, float* colcond, float* amax, OrdinalType* info) const; 01684 void GERFS(const char TRANS, const OrdinalType n, const OrdinalType nrhs, const std::complex<float>* A, const OrdinalType lda, const std::complex<float>* AF, const OrdinalType ldaf, const OrdinalType* IPIV, const std::complex<float>* B, const OrdinalType ldb, std::complex<float>* X, const OrdinalType ldx, float* FERR, float* BERR, std::complex<float>* WORK, float* RWORK, OrdinalType* info) const; 01685 void GESVX(const char FACT, const char TRANS, const OrdinalType n, const OrdinalType nrhs, std::complex<float>* A, const OrdinalType lda, std::complex<float>* AF, const OrdinalType ldaf, OrdinalType* IPIV, char EQUED, float* R, float* C, std::complex<float>* B, const OrdinalType ldb, std::complex<float>* X, const OrdinalType ldx, float* rcond, float* FERR, float* BERR, std::complex<float>* WORK, float* RWORK, OrdinalType* info) const; 01686 void GEHRD(const OrdinalType n, const OrdinalType ilo, const OrdinalType ihi, std::complex<float>* A, const OrdinalType lda, std::complex<float>* TAU, std::complex<float>* WORK, const OrdinalType lwork, OrdinalType* info) const; 01687 void TRTRS(const char UPLO, const char TRANS, const char DIAG, const OrdinalType n, const OrdinalType nrhs, const std::complex<float>* A, const OrdinalType lda, std::complex<float>* B, const OrdinalType ldb, OrdinalType* info) const; 01688 void TRTRI(const char UPLO, const char DIAG, const OrdinalType n, const std::complex<float>* A, const OrdinalType lda, OrdinalType* info) const; 01689 01690 // Symmetric eigenvalue routines. 01691 void STEQR(const char COMPZ, const OrdinalType n, float* D, float* E, std::complex<float>* Z, const OrdinalType ldz, float* WORK, OrdinalType* info) const; 01692 void HEEV(const char JOBZ, const char UPLO, const OrdinalType n, std::complex<float>* A, const OrdinalType lda, float* W, std::complex<float>* WORK, const OrdinalType lwork, float* RWORK, OrdinalType* info) const; 01693 void HEGV(const OrdinalType itype, const char JOBZ, const char UPLO, const OrdinalType n, std::complex<float>* A, const OrdinalType lda, std::complex<float>* B, const OrdinalType ldb, float* W, std::complex<float>* WORK, const OrdinalType lwork, float *RWORK, OrdinalType* info) const; 01694 01695 // Non-Hermitian eigenvalue routines. 01696 void HSEQR(const char JOB, const char COMPZ, const OrdinalType n, const OrdinalType ilo, const OrdinalType ihi, std::complex<float>* H, const OrdinalType ldh, std::complex<float>* W, std::complex<float>* Z, const OrdinalType ldz, std::complex<float>* WORK, const OrdinalType lwork, OrdinalType* info) const; 01697 void GEES(const char JOBVS, const char SORT, OrdinalType (*ptr2func)(std::complex<float>*), const OrdinalType n, std::complex<float>* A, const OrdinalType lda, OrdinalType* sdim, std::complex<float>* W, std::complex<float>* VS, const OrdinalType ldvs, std::complex<float>* WORK, const OrdinalType lwork, float* RWORK, OrdinalType* BWORK, OrdinalType* info) const; 01698 void GEES(const char JOBVS, const OrdinalType n, std::complex<float>* A, const OrdinalType lda, OrdinalType* sdim, float* WR, float* WI, std::complex<float>* VS, const OrdinalType ldvs, std::complex<float>* WORK, const OrdinalType lwork, float* RWORK, OrdinalType* BWORK, OrdinalType* info) const; 01699 void GEEV(const char JOBVL, const char JOBVR, const OrdinalType n, std::complex<float>* A, const OrdinalType lda, std::complex<float>* W, std::complex<float>* VL, const OrdinalType ldvl, std::complex<float>* VR, const OrdinalType ldvr, std::complex<float>* WORK, const OrdinalType lwork, float* RWORK, OrdinalType* info) const; 01700 // void GGEVX(const char BALANC, const char JOBVL, const char JOBVR, const char SENSE, const OrdinalType n, std::complex<float>* A, const OrdinalType lda, std::complex<float>* B, const OrdinalType ldb, float* ALPHAR, float* ALPHAI, std::complex<float>* BETA, std::complex<float>* VL, const OrdinalType ldvl, std::complex<float>* VR, const OrdinalType ldvr, OrdinalType* ilo, OrdinalType* ihi, float* LSCALE, float* RSCALE, float* abnrm, float* bbnrm, float* RCONDE, float* RCONDV, std::complex<float>* work, const OrdinalType lwork, OrdinalType* IWORK, OrdinalType* BWORK, OrdinalType* info) const; 01701 01702 // SVD routine 01703 void GESVD(const char JOBU, const char JOBVT, const OrdinalType m, const OrdinalType n, std::complex<float>* A, const OrdinalType lda, float* S, std::complex<float>* U, const OrdinalType ldu, std::complex<float>* V, const OrdinalType ldv, std::complex<float>* WORK, const OrdinalType lwork, float* RWORK, OrdinalType* info) const; 01704 01705 // Triangular matrix routines. 01706 void TREVC(const char SIDE, const char HOWMNY, OrdinalType* select, const OrdinalType n, const std::complex<float>* T, const OrdinalType ldt, std::complex<float>* VL, const OrdinalType ldvl, std::complex<float>* VR, const OrdinalType ldvr, const OrdinalType mm, OrdinalType* m, std::complex<float>* WORK, float* RWORK, OrdinalType* info) const; 01707 void TREVC(const char SIDE, const OrdinalType n, const std::complex<float>* T, const OrdinalType ldt, std::complex<float>* VL, const OrdinalType ldvl, std::complex<float>* VR, const OrdinalType ldvr, const OrdinalType mm, OrdinalType* m, std::complex<float>* WORK, float* RWORK, OrdinalType* info) const; 01708 void TREXC(const char COMPQ, const OrdinalType n, std::complex<float>* T, const OrdinalType ldt, std::complex<float>* Q, const OrdinalType ldq, OrdinalType ifst, OrdinalType ilst, std::complex<float>* WORK, OrdinalType* info) const; 01709 01710 // Rotation/reflection generators 01711 void LARTG( const std::complex<float> f, const std::complex<float> g, float* c, std::complex<float>* s, std::complex<float>* r ) const; 01712 void LARFG( const OrdinalType n, std::complex<float>* alpha, std::complex<float>* x, const OrdinalType incx, std::complex<float>* tau ) const; 01713 01714 // Random number generators 01715 std::complex<float> LARND( const OrdinalType idist, OrdinalType* seed ) const; 01716 void LARNV( const OrdinalType idist, OrdinalType* seed, const OrdinalType n, std::complex<float>* v ) const; 01717 01718 // Machine characteristics 01719 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; 01720 01721 }; 01722 01723 // END COMPLEX<FLOAT> PARTIAL SPECIALIZATION DECLARATION // 01724 01725 // BEGIN COMPLEX<FLOAT> PARTIAL SPECIALIZATION IMPLEMENTATION // 01726 01727 template<typename OrdinalType> 01728 void LAPACK<OrdinalType, std::complex<float> >::PTTRF(const OrdinalType n, std::complex<float>* d, std::complex<float>* e, OrdinalType* info) const 01729 { 01730 CPTTRF_F77(&n,d,e,info); 01731 } 01732 01733 template<typename OrdinalType> 01734 void LAPACK<OrdinalType, std::complex<float> >::PTTRS(const OrdinalType n, const OrdinalType nrhs, const std::complex<float>* d, const std::complex<float>* e, std::complex<float>* B, const OrdinalType ldb, OrdinalType* info) const 01735 { 01736 CPTTRS_F77(&n,&nrhs,d,e,B,&ldb,info); 01737 } 01738 01739 template<typename OrdinalType> 01740 void LAPACK<OrdinalType, std::complex<float> >::POTRF(const char UPLO, const OrdinalType n, std::complex<float>* A, const OrdinalType lda, OrdinalType* info) const 01741 { 01742 CPOTRF_F77(CHAR_MACRO(UPLO), &n, A, &lda, info); 01743 } 01744 01745 template<typename OrdinalType> 01746 void LAPACK<OrdinalType, std::complex<float> >::POTRS(const char UPLO, const OrdinalType n, const OrdinalType nrhs, const std::complex<float>* A, const OrdinalType lda, std::complex<float>* B, const OrdinalType ldb, OrdinalType* info) const 01747 { 01748 CPOTRS_F77(CHAR_MACRO(UPLO), &n, &nrhs, A, &lda, B, &ldb, info); 01749 } 01750 01751 template<typename OrdinalType> 01752 void LAPACK<OrdinalType, std::complex<float> >::POTRI(const char UPLO, const OrdinalType n, std::complex<float>* A, const OrdinalType lda, OrdinalType* info) const 01753 { 01754 CPOTRI_F77(CHAR_MACRO(UPLO), &n, A, &lda, info); 01755 } 01756 01757 template<typename OrdinalType> 01758 void LAPACK<OrdinalType, std::complex<float> >::POCON(const char UPLO, const OrdinalType n, const std::complex<float>* A, const OrdinalType lda, const float anorm, float* rcond, std::complex<float>* WORK, float* RWORK, OrdinalType* info) const 01759 { 01760 CPOCON_F77(CHAR_MACRO(UPLO), &n, A, &lda, &anorm, rcond, WORK, RWORK, info); 01761 } 01762 01763 template<typename OrdinalType> 01764 void LAPACK<OrdinalType, std::complex<float> >::POSV(const char UPLO, const OrdinalType n, const OrdinalType nrhs, std::complex<float>* A, const OrdinalType lda, std::complex<float>* B, const OrdinalType ldb, OrdinalType* info) const 01765 { 01766 CPOSV_F77(CHAR_MACRO(UPLO), &n, &nrhs, A, &lda, B, &ldb, info); 01767 } 01768 01769 template<typename OrdinalType> 01770 void LAPACK<OrdinalType, std::complex<float> >::POEQU(const OrdinalType n, const std::complex<float>* A, const OrdinalType lda, float* S, float* scond, float* amax, OrdinalType* info) const 01771 { 01772 CPOEQU_F77(&n, A, &lda, S, scond, amax, info); 01773 } 01774 01775 template<typename OrdinalType> 01776 void LAPACK<OrdinalType, std::complex<float> >::PORFS(const char UPLO, const OrdinalType n, const OrdinalType nrhs, std::complex<float>* A, const OrdinalType lda, const std::complex<float>* AF, const OrdinalType ldaf, const std::complex<float>* B, const OrdinalType ldb, std::complex<float>* X, const OrdinalType ldx, float* FERR, float* BERR, std::complex<float>* WORK, float* RWORK, OrdinalType* info) const 01777 { 01778 CPORFS_F77(CHAR_MACRO(UPLO), &n, &nrhs, A, &lda, AF, &ldaf, B, &ldb, X, &ldx, FERR, BERR, WORK, RWORK, info); 01779 } 01780 01781 template<typename OrdinalType> 01782 void LAPACK<OrdinalType, std::complex<float> >::POSVX(const char FACT, const char UPLO, const OrdinalType n, const OrdinalType nrhs, std::complex<float>* A, const OrdinalType lda, std::complex<float>* AF, const OrdinalType ldaf, char EQUED, float* S, std::complex<float>* B, const OrdinalType ldb, std::complex<float>* X, const OrdinalType ldx, float* rcond, float* FERR, float* BERR, std::complex<float>* WORK, float* RWORK, OrdinalType* info) const 01783 { 01784 CPOSVX_F77(CHAR_MACRO(FACT), CHAR_MACRO(UPLO), &n, &nrhs, A, &lda, AF, &ldaf, CHAR_MACRO(EQUED), S, B, &ldb, X, &ldx, rcond, FERR, BERR, WORK, RWORK, info); 01785 } 01786 01787 template<typename OrdinalType> 01788 void LAPACK<OrdinalType,std::complex<float> >::GELS(const char TRANS, const OrdinalType m, const OrdinalType n, const OrdinalType nrhs, std::complex<float>* A, const OrdinalType lda, std::complex<float>* B, const OrdinalType ldb, std::complex<float>* WORK, const OrdinalType lwork, OrdinalType* info) const 01789 { 01790 CGELS_F77(CHAR_MACRO(TRANS), &m, &n, &nrhs, A, &lda, B, &ldb, WORK, &lwork, info); 01791 } 01792 01793 template<typename OrdinalType> 01794 void LAPACK<OrdinalType,std::complex<float> >::GEQRF( const OrdinalType m, const OrdinalType n, std::complex<float>* A, const OrdinalType lda, std::complex<float>* TAU, std::complex<float>* WORK, const OrdinalType lwork, OrdinalType* info) const 01795 { 01796 CGEQRF_F77(&m, &n, A, &lda, TAU, WORK, &lwork, info); 01797 } 01798 01799 template<typename OrdinalType> 01800 void LAPACK<OrdinalType,std::complex<float> >::UNGQR(const OrdinalType m, const OrdinalType n, const OrdinalType k, std::complex<float>* A, const OrdinalType lda, const std::complex<float>* TAU, std::complex<float>* WORK, const OrdinalType lwork, OrdinalType* info) const 01801 { 01802 CUNGQR_F77( &m, &n, &k, A, &lda, TAU, WORK, &lwork, info); 01803 } 01804 01805 template<typename OrdinalType> 01806 void LAPACK<OrdinalType,std::complex<float> >::GETRF(const OrdinalType m, const OrdinalType n, std::complex<float>* A, const OrdinalType lda, OrdinalType* IPIV, OrdinalType* info) const 01807 { 01808 CGETRF_F77(&m, &n, A, &lda, IPIV, info); 01809 } 01810 01811 template<typename OrdinalType> 01812 void LAPACK<OrdinalType,std::complex<float> >::GETRS(const char TRANS, const OrdinalType n, const OrdinalType nrhs, const std::complex<float>* A, const OrdinalType lda, const OrdinalType* IPIV, std::complex<float>* B , const OrdinalType ldb, OrdinalType* info) const 01813 { 01814 CGETRS_F77(CHAR_MACRO(TRANS), &n, &nrhs, A, &lda, IPIV, B, &ldb, info); 01815 } 01816 01817 template<typename OrdinalType> 01818 void LAPACK<OrdinalType,std::complex<float> >::GTTRF(const OrdinalType n, std::complex<float>* dl, std::complex<float>* d, std::complex<float>* du, std::complex<float>* du2, OrdinalType* IPIV, OrdinalType* info) const 01819 { 01820 CGTTRF_F77(&n, dl, d, du, du2, IPIV, info); 01821 } 01822 01823 template<typename OrdinalType> 01824 void LAPACK<OrdinalType,std::complex<float> >::GTTRS(const char TRANS, const OrdinalType n, const OrdinalType nrhs, const std::complex<float>* dl, const std::complex<float>* d, const std::complex<float>* du, const std::complex<float>* du2, const OrdinalType* IPIV, std::complex<float>* B, const OrdinalType ldb, OrdinalType* info) const 01825 { 01826 CGTTRS_F77(CHAR_MACRO(TRANS), &n, &nrhs, dl, d, du, du2, IPIV, B, &ldb, info); 01827 } 01828 01829 template<typename OrdinalType> 01830 void LAPACK<OrdinalType,std::complex<float> >::GETRI(const OrdinalType n, std::complex<float>* A, const OrdinalType lda, const OrdinalType* IPIV, std::complex<float>* WORK, const OrdinalType lwork, OrdinalType* info) const 01831 { 01832 CGETRI_F77(&n, A, &lda, IPIV, WORK, &lwork, info); 01833 } 01834 01835 template<typename OrdinalType> 01836 void LAPACK<OrdinalType,std::complex<float> >::GECON(const char NORM, const OrdinalType n, const std::complex<float>* A, const OrdinalType lda, const float anorm, float* rcond, std::complex<float>* WORK, float* RWORK, OrdinalType* info) const 01837 { 01838 CGECON_F77(CHAR_MACRO(NORM), &n, A, &lda, &anorm, rcond, WORK, RWORK, info); 01839 } 01840 01841 template<typename OrdinalType> 01842 void LAPACK<OrdinalType,std::complex<float> >::GESV(const OrdinalType n, const OrdinalType nrhs, std::complex<float>* A, const OrdinalType lda, OrdinalType* IPIV, std::complex<float>* B, const OrdinalType ldb, OrdinalType* info) const 01843 { 01844 CGESV_F77(&n, &nrhs, A, &lda, IPIV, B, &ldb, info); 01845 } 01846 01847 template<typename OrdinalType> 01848 void LAPACK<OrdinalType,std::complex<float> >::GEEQU(const OrdinalType m, const OrdinalType n, const std::complex<float>* A, const OrdinalType lda, float* R, float* C, float* rowcond, float* colcond, float* amax, OrdinalType* info) const 01849 { 01850 CGEEQU_F77(&m, &n, A, &lda, R, C, rowcond, colcond, amax, info); 01851 } 01852 01853 template<typename OrdinalType> 01854 void LAPACK<OrdinalType,std::complex<float> >::GERFS(const char TRANS, const OrdinalType n, const OrdinalType nrhs, const std::complex<float>* A, const OrdinalType lda, const std::complex<float>* AF, const OrdinalType ldaf, const OrdinalType* IPIV, const std::complex<float>* B, const OrdinalType ldb, std::complex<float>* X, const OrdinalType ldx, float* FERR, float* BERR, std::complex<float>* WORK, float* RWORK, OrdinalType* info) const 01855 { 01856 CGERFS_F77(CHAR_MACRO(TRANS), &n, &nrhs, A, &lda, AF, &ldaf, IPIV, B, &ldb, X, &ldx, FERR, BERR, WORK, RWORK, info); 01857 } 01858 01859 template<typename OrdinalType> 01860 void LAPACK<OrdinalType,std::complex<float> >::GESVX(const char FACT, const char TRANS, const OrdinalType n, const OrdinalType nrhs, std::complex<float>* A, const OrdinalType lda, std::complex<float>* AF, const OrdinalType ldaf, OrdinalType* IPIV, char EQUED, float* R, float* C, std::complex<float>* B, const OrdinalType ldb, std::complex<float>* X, const OrdinalType ldx, float* rcond, float* FERR, float* BERR, std::complex<float>* WORK, float* RWORK, OrdinalType* info) const 01861 { 01862 CGESVX_F77(CHAR_MACRO(FACT), CHAR_MACRO(TRANS), &n, &nrhs, A, &lda, AF, &ldaf, IPIV, CHAR_MACRO(EQUED), R, C, B, &ldb, X, &ldx, rcond, FERR, BERR, WORK, RWORK, info); 01863 } 01864 01865 template<typename OrdinalType> 01866 void LAPACK<OrdinalType,std::complex<float> >::GEHRD(const OrdinalType n, const OrdinalType ilo, const OrdinalType ihi, std::complex<float>* A, const OrdinalType lda, std::complex<float>* TAU, std::complex<float>* WORK, const OrdinalType lwork, OrdinalType* info) const 01867 { 01868 CGEHRD_F77(&n, &ilo, &ihi, A, &lda, TAU, WORK, &lwork, info); 01869 } 01870 01871 template<typename OrdinalType> 01872 void LAPACK<OrdinalType,std::complex<float> >::TRTRS(const char UPLO, const char TRANS, const char DIAG, const OrdinalType n, const OrdinalType nrhs, const std::complex<float>* A, const OrdinalType lda, std::complex<float>* B, const OrdinalType ldb, OrdinalType* info) const 01873 { 01874 CTRTRS_F77(CHAR_MACRO(UPLO), CHAR_MACRO(TRANS), CHAR_MACRO(DIAG), &n, &nrhs, A, &lda, B, &ldb, info); 01875 } 01876 01877 template<typename OrdinalType> 01878 void LAPACK<OrdinalType,std::complex<float> >::TRTRI(const char UPLO, const char DIAG, const OrdinalType n, const std::complex<float>* A, const OrdinalType lda, OrdinalType* info) const 01879 { 01880 CTRTRI_F77(CHAR_MACRO(UPLO), CHAR_MACRO(DIAG), &n, A, &lda, info); 01881 } 01882 01883 template<typename OrdinalType> 01884 void LAPACK<OrdinalType,std::complex<float> >::STEQR(const char COMPZ, const OrdinalType n, float* D, float* E, std::complex<float>* Z, const OrdinalType ldz, float* WORK, OrdinalType* info) const 01885 { 01886 CSTEQR_F77(CHAR_MACRO(COMPZ), &n, D, E, Z, &ldz, WORK, info); 01887 } 01888 01889 template<typename OrdinalType> 01890 void LAPACK<OrdinalType,std::complex<float> >::HEEV(const char JOBZ, const char UPLO, const OrdinalType n, std::complex<float> * A, const OrdinalType lda, float * W, std::complex<float> * WORK, const OrdinalType lwork, float* RWORK, OrdinalType* info) const 01891 { 01892 CHEEV_F77(CHAR_MACRO(JOBZ), CHAR_MACRO(UPLO), &n, A, &lda, W, WORK, &lwork, RWORK, info); 01893 } 01894 01895 template<typename OrdinalType> 01896 void LAPACK<OrdinalType,std::complex<float> >::HEGV(const OrdinalType itype, const char JOBZ, const char UPLO, const OrdinalType n, std::complex<float> * A, const OrdinalType lda, std::complex<float> * B, const OrdinalType ldb, float * W, std::complex<float> * WORK, const OrdinalType lwork, float *RWORK, OrdinalType* info) const 01897 { 01898 CHEGV_F77(&itype, CHAR_MACRO(JOBZ), CHAR_MACRO(UPLO), &n, A, &lda, B, &ldb, W, WORK, &lwork, RWORK, info); 01899 } 01900 01901 template<typename OrdinalType> 01902 void LAPACK<OrdinalType, std::complex<float> >::HSEQR(const char JOB, const char COMPZ, const OrdinalType n, const OrdinalType ilo, const OrdinalType ihi, std::complex<float>* H, const OrdinalType ldh, std::complex<float>* W, std::complex<float>* Z, const OrdinalType ldz, std::complex<float>* WORK, const OrdinalType lwork, OrdinalType* info) const 01903 { 01904 CHSEQR_F77(CHAR_MACRO(JOB), CHAR_MACRO(COMPZ), &n, &ilo, &ihi, H, &ldh, W, Z, &ldz, WORK, &lwork, info); 01905 } 01906 01907 template<typename OrdinalType> 01908 void LAPACK<OrdinalType, std::complex<float> >::GEES(const char JOBVS, const char SORT, OrdinalType (*ptr2func)(std::complex<float>*), const OrdinalType n, std::complex<float>* A, const OrdinalType lda, OrdinalType* sdim, std::complex<float>* W, std::complex<float>* VS, const OrdinalType ldvs, std::complex<float>* WORK, const OrdinalType lwork, float* RWORK, OrdinalType* BWORK, OrdinalType* info) const 01909 { 01910 CGEES_F77(CHAR_MACRO(JOBVS), CHAR_MACRO(SORT), ptr2func, &n, A, &lda, sdim, W, VS, &ldvs, WORK, &lwork, RWORK, BWORK, info); 01911 } 01912 01913 template<typename OrdinalType> 01914 void LAPACK<OrdinalType, std::complex<float> >::GEES(const char JOBVS, const OrdinalType n, std::complex<float>* A, const OrdinalType lda, OrdinalType* sdim, float* WR, float* WI, std::complex<float>* VS, const OrdinalType ldvs, std::complex<float>* WORK, const OrdinalType lwork, float* RWORK, OrdinalType* BWORK, OrdinalType* info) const 01915 { 01916 OrdinalType (*nullfptr)(std::complex<float>*) = NULL; 01917 std::vector< std::complex<float> > W(n); 01918 const char sort = 'N'; 01919 CGEES_F77(CHAR_MACRO(JOBVS), CHAR_MACRO(sort), nullfptr, &n, A, &lda, sdim, &W[0], VS, &ldvs, WORK, &lwork, RWORK, BWORK, info); 01920 for (int i=0; i<n; i++) { 01921 WR[i] = W[i].real(); 01922 WI[i] = W[i].imag(); 01923 } 01924 } 01925 01926 template<typename OrdinalType> 01927 void LAPACK<OrdinalType, std::complex<float> >::GEEV(const char JOBVL, const char JOBVR, const OrdinalType n, std::complex<float>* A, const OrdinalType lda, std::complex<float>* W, std::complex<float>* VL, const OrdinalType ldvl, std::complex<float>* VR, const OrdinalType ldvr, std::complex<float>* WORK, const OrdinalType lwork, float* RWORK, OrdinalType* info) const 01928 { 01929 CGEEV_F77(CHAR_MACRO(JOBVL), CHAR_MACRO(JOBVR), &n, A, &lda, W, VL, &ldvl, VR, &ldvr, WORK, &lwork, RWORK, info); 01930 } 01931 01932 template<typename OrdinalType> 01933 void LAPACK<OrdinalType, std::complex<float> >::GESVD(const char JOBU, const char JOBVT, const OrdinalType m, const OrdinalType n, std::complex<float> * A, const OrdinalType lda, float* S, std::complex<float> * U, const OrdinalType ldu, std::complex<float> * V, const OrdinalType ldv, std::complex<float> * WORK, const OrdinalType lwork, float* RWORK, OrdinalType* info) const { 01934 CGESVD_F77(CHAR_MACRO(JOBU), CHAR_MACRO(JOBVT), &m, &n, A, &lda, S, U, &ldu, V, &ldv, WORK, &lwork, RWORK, info); 01935 } 01936 01937 /* 01938 template<typename OrdinalType> 01939 void LAPACK<OrdinalType, std::complex<float> >::GGEVX(const char BALANC, const char JOBVL, const char JOBVR, const char SENSE, const OrdinalType n, std::complex<float>* A, const OrdinalType lda, std::complex<float>* B, const OrdinalType ldb, float* ALPHAR, float* ALPHAI, std::complex<float>* BETA, std::complex<float>* VL, const OrdinalType ldvl, std::complex<float>* VR, const OrdinalType ldvr, OrdinalType* ilo, OrdinalType* ihi, float* LSCALE, float* RSCALE, float* abnrm, float* bbnrm, float* RCONDE, float* RCONDV, std::complex<float>* WORK, const OrdinalType lwork, OrdinalType* IWORK, OrdinalType* BWORK, OrdinalType* info) const 01940 { 01941 std::vector< std::complex<float> > ALPHA(n); 01942 CGGEVX_F77(CHAR_MACRO(BALANC), CHAR_MACRO(JOBVL), CHAR_MACRO(JOBVR), CHAR_MACRO(SENSE), &n, A, &lda, B, &ldb, &ALPHA[0], BETA, VL, &ldvl, VR, &ldvr, ilo, ihi, LSCALE, RSCALE, abnrm, bbnrm, RCONDE, RCONDV, WORK, &lwork, IWORK, BWORK, info); 01943 for (int i=0; i<n; i++) { 01944 ALPHAR[i] = ALPHA[i].real(); 01945 ALPHAI[i] = ALPHA[i].imag(); 01946 } 01947 } 01948 */ 01949 01950 template<typename OrdinalType> 01951 void LAPACK<OrdinalType, std::complex<float> >::TREVC(const char SIDE, const char HOWMNY, OrdinalType* select, const OrdinalType n, const std::complex<float>* T, const OrdinalType ldt, std::complex<float>* VL, const OrdinalType ldvl, std::complex<float>* VR, const OrdinalType ldvr, const OrdinalType mm, OrdinalType* m, std::complex<float>* WORK, float* RWORK, OrdinalType* info) const 01952 { 01953 CTREVC_F77(CHAR_MACRO(SIDE), CHAR_MACRO(HOWMNY), select, &n, T, &ldt, VL, &ldvl, VR, &ldvr, &mm, m, WORK, RWORK, info); 01954 } 01955 01956 template<typename OrdinalType> 01957 void LAPACK<OrdinalType, std::complex<float> >::TREVC(const char SIDE, const OrdinalType n, const std::complex<float>* T, const OrdinalType ldt, std::complex<float>* VL, const OrdinalType ldvl, std::complex<float>* VR, const OrdinalType ldvr, const OrdinalType mm, OrdinalType* m, std::complex<float>* WORK, float* RWORK, OrdinalType* info) const 01958 { 01959 std::vector<OrdinalType> select(1); 01960 const char whch = 'A'; 01961 CTREVC_F77(CHAR_MACRO(SIDE), CHAR_MACRO(whch), &select[0], &n, T, &ldt, VL, &ldvl, VR, &ldvr, &mm, m, WORK, RWORK, info); 01962 } 01963 01964 template<typename OrdinalType> 01965 void LAPACK<OrdinalType, std::complex<float> >::TREXC(const char COMPQ, const OrdinalType n, std::complex<float>* T, const OrdinalType ldt, std::complex<float>* Q, const OrdinalType ldq, OrdinalType ifst, OrdinalType ilst, std::complex<float>* WORK, OrdinalType* info) const 01966 { 01967 CTREXC_F77(CHAR_MACRO(COMPQ), &n, T, &ldt, Q, &ldq, &ifst, &ilst, info); 01968 } 01969 01970 template<typename OrdinalType> 01971 void LAPACK<OrdinalType, std::complex<float> >::LARTG( const std::complex<float> f, const std::complex<float> g, float* c, std::complex<float>* s, std::complex<float>* r ) const 01972 { 01973 CLARTG_F77(&f, &g, c, s, r); 01974 } 01975 01976 template<typename OrdinalType> 01977 void LAPACK<OrdinalType, std::complex<float> >::LARFG( const OrdinalType n, std::complex<float>* alpha, std::complex<float>* x, const OrdinalType incx, std::complex<float>* tau ) const 01978 { 01979 CLARFG_F77(&n, alpha, x, &incx, tau); 01980 } 01981 01982 template<typename OrdinalType> 01983 std::complex<float> LAPACK<OrdinalType, std::complex<float> >::LARND( const OrdinalType idist, OrdinalType* seed ) const 01984 { 01985 return(CLARND_F77(&idist, seed)); 01986 } 01987 01988 template<typename OrdinalType> 01989 void LAPACK<OrdinalType, std::complex<float> >::LARNV( const OrdinalType idist, OrdinalType* seed, const OrdinalType n, std::complex<float>* v ) const 01990 { 01991 CLARNV_F77(&idist, seed, &n, v); 01992 } 01993 01994 template<typename OrdinalType> 01995 OrdinalType LAPACK<OrdinalType, std::complex<float> >::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 01996 { 01997 unsigned int opts_length = OPTS.length(); 01998 std::string temp_NAME = "c" + NAME; 01999 unsigned int name_length = temp_NAME.length(); 02000 #if defined (INTEL_CXML) 02001 return ILAENV_F77(&ispec, &temp_NAME[0], name_length, &OPTS[0], opts_length, &N1, &N2, &N3, &N4 ); 02002 #else 02003 return ILAENV_F77(&ispec, &temp_NAME[0], &OPTS[0], &N1, &N2, &N3, &N4, name_length, opts_length ); 02004 #endif 02005 } 02006 02007 // END COMPLEX<FLOAT> PARTIAL SPECIALIZATION IMPLEMENTATION // 02008 02009 // BEGIN COMPLEX<DOUBLE> PARTIAL SPECIALIZATION DECLARATION // 02010 02011 template<typename OrdinalType> 02012 class LAPACK<OrdinalType, std::complex<double> > 02013 { 02014 public: 02015 inline LAPACK(void) {} 02016 inline LAPACK(const LAPACK<OrdinalType, std::complex<double> >& lapack) {} 02017 inline virtual ~LAPACK(void) {} 02018 02019 // Symmetric positive definite linear system routines 02020 void PTTRF(const OrdinalType n, std::complex<double>* d, std::complex<double>* e, OrdinalType* info) const; 02021 void PTTRS(const OrdinalType n, const OrdinalType nrhs, const std::complex<double>* d, const std::complex<double>* e, std::complex<double>* B, const OrdinalType ldb, OrdinalType* info) const; 02022 void POTRF(const char UPLO, const OrdinalType n, std::complex<double>* A, const OrdinalType lda, OrdinalType* info) const; 02023 void POTRS(const char UPLO, const OrdinalType n, const OrdinalType nrhs, const std::complex<double>* A, const OrdinalType lda, std::complex<double>* B, const OrdinalType ldb, OrdinalType* info) const; 02024 void POTRI(const char UPLO, const OrdinalType n, std::complex<double>* A, const OrdinalType lda, OrdinalType* info) const; 02025 void POCON(const char UPLO, const OrdinalType n, const std::complex<double>* A, const OrdinalType lda, const double anorm, double* rcond, std::complex<double>* WORK, double* RWORK, OrdinalType* info) const; 02026 void POSV(const char UPLO, const OrdinalType n, const OrdinalType nrhs, std::complex<double>* A, const OrdinalType lda, std::complex<double>* B, const OrdinalType ldb, OrdinalType* info) const; 02027 void POEQU(const OrdinalType n, const std::complex<double>* A, const OrdinalType lda, double* S, double* scond, double* amax, OrdinalType* info) const; 02028 void PORFS(const char UPLO, const OrdinalType n, const OrdinalType nrhs, std::complex<double>* A, const OrdinalType lda, const std::complex<double>* AF, const OrdinalType ldaf, const std::complex<double>* B, const OrdinalType ldb, std::complex<double>* X, const OrdinalType ldx, double* FERR, double* BERR, std::complex<double>* WORK, double* RWORK, OrdinalType* info) const; 02029 void POSVX(const char FACT, const char UPLO, const OrdinalType n, const OrdinalType nrhs, std::complex<double>* A, const OrdinalType lda, std::complex<double>* AF, const OrdinalType ldaf, char EQUED, double* S, std::complex<double>* B, const OrdinalType ldb, std::complex<double>* X, const OrdinalType ldx, double* rcond, double* FERR, double* BERR, std::complex<double>* WORK, double* RWORK, OrdinalType* info) const; 02030 02031 // General Linear System Routines 02032 void GELS(const char TRANS, const OrdinalType m, const OrdinalType n, const OrdinalType nrhs, std::complex<double>* A, const OrdinalType lda, std::complex<double>* B, const OrdinalType ldb, std::complex<double>* WORK, const OrdinalType lwork, OrdinalType* info) const; 02033 void GEQRF( const OrdinalType m, const OrdinalType n, std::complex<double>* A, const OrdinalType lda, std::complex<double>* TAU, std::complex<double>* WORK, const OrdinalType lwork, OrdinalType* info) const; 02034 void UNGQR(const OrdinalType m, const OrdinalType n, const OrdinalType k, std::complex<double>* A, const OrdinalType lda, const std::complex<double>* TAU, std::complex<double>* WORK, const OrdinalType lwork, OrdinalType* info) const; 02035 void GETRF(const OrdinalType m, const OrdinalType n, std::complex<double>* A, const OrdinalType lda, OrdinalType* IPIV, OrdinalType* info) const; 02036 void GETRS(const char TRANS, const OrdinalType n, const OrdinalType nrhs, const std::complex<double>* A, const OrdinalType lda, const OrdinalType* IPIV, std::complex<double>* B, const OrdinalType ldb, OrdinalType* info) const; 02037 void GTTRF(const OrdinalType n, std::complex<double>* dl, std::complex<double>* d, std::complex<double>* du, std::complex<double>* du2, OrdinalType* IPIV, OrdinalType* info) const; 02038 void GTTRS(const char TRANS, const OrdinalType n, const OrdinalType nrhs, const std::complex<double>* dl, const std::complex<double>* d, const std::complex<double>* du, const std::complex<double>* du2, const OrdinalType* IPIV, std::complex<double>* B, const OrdinalType ldb, OrdinalType* info) const; 02039 void GETRI(const OrdinalType n, std::complex<double>* A, const OrdinalType lda, const OrdinalType* IPIV, std::complex<double>* WORK, const OrdinalType lwork, OrdinalType* info) const; 02040 void GECON(const char NORM, const OrdinalType n, const std::complex<double>* A, const OrdinalType lda, const double anorm, double* rcond, std::complex<double>* WORK, double* RWORK, OrdinalType* info) const; 02041 void GESV(const OrdinalType n, const OrdinalType nrhs, std::complex<double>* A, const OrdinalType lda, OrdinalType* IPIV, std::complex<double>* B, const OrdinalType ldb, OrdinalType* info) const; 02042 void GEEQU(const OrdinalType m, const OrdinalType n, const std::complex<double>* A, const OrdinalType lda, double* R, double* C, double* rowcond, double* colcond, double* amax, OrdinalType* info) const; 02043 void GERFS(const char TRANS, const OrdinalType n, const OrdinalType nrhs, const std::complex<double>* A, const OrdinalType lda, const std::complex<double>* AF, const OrdinalType ldaf, const OrdinalType* IPIV, const std::complex<double>* B, const OrdinalType ldb, std::complex<double>* X, const OrdinalType ldx, double* FERR, double* BERR, std::complex<double>* WORK, double* RWORK, OrdinalType* info) const; 02044 void GESVX(const char FACT, const char TRANS, const OrdinalType n, const OrdinalType nrhs, std::complex<double>* A, const OrdinalType lda, std::complex<double>* AF, const OrdinalType ldaf, OrdinalType* IPIV, char EQUED, double* R, double* C, std::complex<double>* B, const OrdinalType ldb, std::complex<double>* X, const OrdinalType ldx, double* rcond, double* FERR, double* BERR, std::complex<double>* WORK, double* RWORK, OrdinalType* info) const; 02045 void GEHRD(const OrdinalType n, const OrdinalType ilo, const OrdinalType ihi, std::complex<double>* A, const OrdinalType lda, std::complex<double>* TAU, std::complex<double>* WORK, const OrdinalType lwork, OrdinalType* info) const; 02046 void TRTRS(const char UPLO, const char TRANS, const char DIAG, const OrdinalType n, const OrdinalType nrhs, const std::complex<double>* A, const OrdinalType lda, std::complex<double>* B, const OrdinalType ldb, OrdinalType* info) const; 02047 void TRTRI(const char UPLO, const char DIAG, const OrdinalType n, const std::complex<double>* A, const OrdinalType lda, OrdinalType* info) const; 02048 02049 // Symmetric eigenvalue routines. 02050 void STEQR(const char COMPZ, const OrdinalType n, double* D, double* E, std::complex<double>* Z, const OrdinalType ldz, double* WORK, OrdinalType* info) const; 02051 void HEEV(const char JOBZ, const char UPLO, const OrdinalType n, std::complex<double>* A, const OrdinalType lda, double* W, std::complex<double>* WORK, const OrdinalType lwork, double* RWORK, OrdinalType* info) const; 02052 void HEGV(const OrdinalType itype, const char JOBZ, const char UPLO, const OrdinalType n, std::complex<double>* A, const OrdinalType lda, std::complex<double>* B, const OrdinalType ldb, double* W, std::complex<double>* WORK, const OrdinalType lwork, double *RWORK, OrdinalType* info) const; 02053 02054 // Non-hermitian eigenvalue routines. 02055 void HSEQR(const char JOB, const char COMPZ, const OrdinalType n, const OrdinalType ilo, const OrdinalType ihi, std::complex<double>* H, const OrdinalType ldh, std::complex<double>* W, std::complex<double>* Z, const OrdinalType ldz, std::complex<double>* WORK, const OrdinalType lwork, OrdinalType* info) const; 02056 void GEES(const char JOBVS, const char SORT, OrdinalType (*ptr2func)(std::complex<double>*), const OrdinalType n, std::complex<double>* A, const OrdinalType lda, OrdinalType* sdim, std::complex<double>* W, std::complex<double>* VS, const OrdinalType ldvs, std::complex<double>* WORK, const OrdinalType lwork, double* RWORK, OrdinalType* BWORK, OrdinalType* info) const; 02057 void GEES(const char JOBVS, const OrdinalType n, std::complex<double>* A, const OrdinalType lda, OrdinalType* sdim, double* WR, double* WI, std::complex<double>* VS, const OrdinalType ldvs, std::complex<double>* WORK, const OrdinalType lwork, double* RWORK, OrdinalType* BWORK, OrdinalType* info) const; 02058 void GEEV(const char JOBVL, const char JOBVR, const OrdinalType n, std::complex<double>* A, const OrdinalType lda, std::complex<double>* W, std::complex<double>* VL, const OrdinalType ldvl, std::complex<double>* VR, const OrdinalType ldvr, std::complex<double>* WORK, const OrdinalType lwork, double* RWORK, OrdinalType* info) const; 02059 // void GGEVX(const char BALANC, const char JOBVL, const char JOBVR, const char SENSE, const OrdinalType n, std::complex<double>* A, const OrdinalType lda, std::complex<double>* B, const OrdinalType ldb, double* ALPHAR, double* ALPHAI, std::complex<double>* BETA, std::complex<double>* VL, const OrdinalType ldvl, std::complex<double>* VR, const OrdinalType ldvr, OrdinalType* ilo, OrdinalType* ihi, double* LSCALE, double* RSCALE, double* abnrm, double* bbnrm, double* RCONDE, double* RCONDV, std::complex<double>* work, const OrdinalType lwork, OrdinalType* IWORK, OrdinalType* BWORK, OrdinalType* info) const; 02060 02061 // SVD routine 02062 void GESVD(const char JOBU, const char JOBVT, const OrdinalType m, const OrdinalType n, std::complex<double>* A, const OrdinalType lda, double* S, std::complex<double>* U, const OrdinalType ldu, std::complex<double>* V, const OrdinalType ldv, std::complex<double>* WORK, const OrdinalType lwork, double* RWORK, OrdinalType* info) const; 02063 02064 // Triangular matrix routines. 02065 void TREVC(const char SIDE, const char HOWMNY, OrdinalType* select, const OrdinalType n, const std::complex<double>* T, const OrdinalType ldt, std::complex<double>* VL, const OrdinalType ldvl, std::complex<double>* VR, const OrdinalType ldvr, const OrdinalType mm, OrdinalType* m, std::complex<double>* WORK, double* RWORK, OrdinalType* info) const; 02066 void TREVC(const char SIDE, const OrdinalType n, const std::complex<double>* T, const OrdinalType ldt, std::complex<double>* VL, const OrdinalType ldvl, std::complex<double>* VR, const OrdinalType ldvr, const OrdinalType mm, OrdinalType* m, std::complex<double>* WORK, double* RWORK, OrdinalType* info) const; 02067 void TREXC(const char COMPQ, const OrdinalType n, std::complex<double>* T, const OrdinalType ldt, std::complex<double>* Q, const OrdinalType ldq, OrdinalType ifst, OrdinalType ilst, std::complex<double>* WORK, OrdinalType* info) const; 02068 02069 // Rotation/reflection generators 02070 void LARTG( const std::complex<double> f, const std::complex<double> g, double* c, std::complex<double>* s, std::complex<double>* r ) const; 02071 void LARFG( const OrdinalType n, std::complex<double>* alpha, std::complex<double>* x, const OrdinalType incx, std::complex<double>* tau ) const; 02072 02073 // Random number generators 02074 std::complex<double> LARND( const OrdinalType idist, OrdinalType* seed ) const; 02075 void LARNV( const OrdinalType idist, OrdinalType* seed, const OrdinalType n, std::complex<double>* v ) const; 02076 02077 // Machine characteristics 02078 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; 02079 02080 }; 02081 02082 // END COMPLEX<DOUBLE> PARTIAL SPECIALIZATION DECLARATION // 02083 02084 // BEGIN COMPLEX<DOUBLE> PARTIAL SPECIALIZATION IMPLEMENTATION // 02085 02086 template<typename OrdinalType> 02087 void LAPACK<OrdinalType, std::complex<double> >::PTTRF(const OrdinalType n, std::complex<double>* d, std::complex<double>* e, OrdinalType* info) const 02088 { 02089 ZPTTRF_F77(&n,d,e,info); 02090 } 02091 02092 template<typename OrdinalType> 02093 void LAPACK<OrdinalType, std::complex<double> >::PTTRS(const OrdinalType n, const OrdinalType nrhs, const std::complex<double>* d, const std::complex<double>* e, std::complex<double>* B, const OrdinalType ldb, OrdinalType* info) const 02094 { 02095 ZPTTRS_F77(&n,&nrhs,d,e,B,&ldb,info); 02096 } 02097 02098 template<typename OrdinalType> 02099 void LAPACK<OrdinalType, std::complex<double> >::POTRF(const char UPLO, const OrdinalType n, std::complex<double>* A, const OrdinalType lda, OrdinalType* info) const 02100 { 02101 ZPOTRF_F77(CHAR_MACRO(UPLO), &n, A, &lda, info); 02102 } 02103 02104 template<typename OrdinalType> 02105 void LAPACK<OrdinalType, std::complex<double> >::POTRS(const char UPLO, const OrdinalType n, const OrdinalType nrhs, const std::complex<double>* A, const OrdinalType lda, std::complex<double>* B, const OrdinalType ldb, OrdinalType* info) const 02106 { 02107 ZPOTRS_F77(CHAR_MACRO(UPLO), &n, &nrhs, A, &lda, B, &ldb, info); 02108 } 02109 02110 template<typename OrdinalType> 02111 void LAPACK<OrdinalType, std::complex<double> >::POTRI(const char UPLO, const OrdinalType n, std::complex<double>* A, const OrdinalType lda, OrdinalType* info) const 02112 { 02113 ZPOTRI_F77(CHAR_MACRO(UPLO), &n, A, &lda, info); 02114 } 02115 02116 template<typename OrdinalType> 02117 void LAPACK<OrdinalType, std::complex<double> >::POCON(const char UPLO, const OrdinalType n, const std::complex<double>* A, const OrdinalType lda, const double anorm, double* rcond, std::complex<double>* WORK, double* RWORK, OrdinalType* info) const 02118 { 02119 ZPOCON_F77(CHAR_MACRO(UPLO), &n, A, &lda, &anorm, rcond, WORK, RWORK, info); 02120 } 02121 02122 template<typename OrdinalType> 02123 void LAPACK<OrdinalType, std::complex<double> >::POSV(const char UPLO, const OrdinalType n, const OrdinalType nrhs, std::complex<double>* A, const OrdinalType lda, std::complex<double>* B, const OrdinalType ldb, OrdinalType* info) const 02124 { 02125 ZPOSV_F77(CHAR_MACRO(UPLO), &n, &nrhs, A, &lda, B, &ldb, info); 02126 } 02127 02128 template<typename OrdinalType> 02129 void LAPACK<OrdinalType, std::complex<double> >::POEQU(const OrdinalType n, const std::complex<double>* A, const OrdinalType lda, double* S, double* scond, double* amax, OrdinalType* info) const 02130 { 02131 ZPOEQU_F77(&n, A, &lda, S, scond, amax, info); 02132 } 02133 02134 template<typename OrdinalType> 02135 void LAPACK<OrdinalType, std::complex<double> >::PORFS(const char UPLO, const OrdinalType n, const OrdinalType nrhs, std::complex<double>* A, const OrdinalType lda, const std::complex<double>* AF, const OrdinalType ldaf, const std::complex<double>* B, const OrdinalType ldb, std::complex<double>* X, const OrdinalType ldx, double* FERR, double* BERR, std::complex<double>* WORK, double* RWORK, OrdinalType* info) const 02136 { 02137 ZPORFS_F77(CHAR_MACRO(UPLO), &n, &nrhs, A, &lda, AF, &ldaf, B, &ldb, X, &ldx, FERR, BERR, WORK, RWORK, info); 02138 } 02139 02140 template<typename OrdinalType> 02141 void LAPACK<OrdinalType, std::complex<double> >::POSVX(const char FACT, const char UPLO, const OrdinalType n, const OrdinalType nrhs, std::complex<double>* A, const OrdinalType lda, std::complex<double>* AF, const OrdinalType ldaf, char EQUED, double* S, std::complex<double>* B, const OrdinalType ldb, std::complex<double>* X, const OrdinalType ldx, double* rcond, double* FERR, double* BERR, std::complex<double>* WORK, double* RWORK, OrdinalType* info) const 02142 { 02143 ZPOSVX_F77(CHAR_MACRO(FACT), CHAR_MACRO(UPLO), &n, &nrhs, A, &lda, AF, &ldaf, CHAR_MACRO(EQUED), S, B, &ldb, X, &ldx, rcond, FERR, BERR, WORK, RWORK, info); 02144 } 02145 02146 template<typename OrdinalType> 02147 void LAPACK<OrdinalType,std::complex<double> >::GELS(const char TRANS, const OrdinalType m, const OrdinalType n, const OrdinalType nrhs, std::complex<double>* A, const OrdinalType lda, std::complex<double>* B, const OrdinalType ldb, std::complex<double>* WORK, const OrdinalType lwork, OrdinalType* info) const 02148 { 02149 ZGELS_F77(CHAR_MACRO(TRANS), &m, &n, &nrhs, A, &lda, B, &ldb, WORK, &lwork, info); 02150 } 02151 02152 template<typename OrdinalType> 02153 void LAPACK<OrdinalType,std::complex<double> >::GEQRF( const OrdinalType m, const OrdinalType n, std::complex<double>* A, const OrdinalType lda, std::complex<double>* TAU, std::complex<double>* WORK, const OrdinalType lwork, OrdinalType* info) const 02154 { 02155 ZGEQRF_F77(&m, &n, A, &lda, TAU, WORK, &lwork, info); 02156 } 02157 02158 template<typename OrdinalType> 02159 void LAPACK<OrdinalType,std::complex<double> >::UNGQR(const OrdinalType m, const OrdinalType n, const OrdinalType k, std::complex<double>* A, const OrdinalType lda, const std::complex<double>* TAU, std::complex<double>* WORK, const OrdinalType lwork, OrdinalType* info) const 02160 { 02161 ZUNGQR_F77( &m, &n, &k, A, &lda, TAU, WORK, &lwork, info); 02162 } 02163 02164 template<typename OrdinalType> 02165 void LAPACK<OrdinalType,std::complex<double> >::GETRF(const OrdinalType m, const OrdinalType n, std::complex<double>* A, const OrdinalType lda, OrdinalType* IPIV, OrdinalType* info) const 02166 { 02167 ZGETRF_F77(&m, &n, A, &lda, IPIV, info); 02168 } 02169 02170 template<typename OrdinalType> 02171 void LAPACK<OrdinalType,std::complex<double> >::GETRS(const char TRANS, const OrdinalType n, const OrdinalType nrhs, const std::complex<double>* A, const OrdinalType lda, const OrdinalType* IPIV, std::complex<double>* B, const OrdinalType ldb, OrdinalType* info) const 02172 { 02173 ZGETRS_F77(CHAR_MACRO(TRANS), &n, &nrhs, A, &lda, IPIV, B, &ldb, info); 02174 } 02175 02176 template<typename OrdinalType> 02177 void LAPACK<OrdinalType,std::complex<double> >::GTTRF(const OrdinalType n, std::complex<double>* dl, std::complex<double>* d, std::complex<double>* du, std::complex<double>* du2, OrdinalType* IPIV, OrdinalType* info) const 02178 { 02179 ZGTTRF_F77(&n, dl, d, du, du2, IPIV, info); 02180 } 02181 02182 template<typename OrdinalType> 02183 void LAPACK<OrdinalType,std::complex<double> >::GTTRS(const char TRANS, const OrdinalType n, const OrdinalType nrhs, const std::complex<double>* dl, const std::complex<double>* d, const std::complex<double>* du, const std::complex<double>* du2, const OrdinalType* IPIV, std::complex<double>* B, const OrdinalType ldb, OrdinalType* info) const 02184 { 02185 ZGTTRS_F77(CHAR_MACRO(TRANS), &n, &nrhs, dl, d, du, du2, IPIV, B, &ldb, info); 02186 } 02187 02188 template<typename OrdinalType> 02189 void LAPACK<OrdinalType,std::complex<double> >::GETRI(const OrdinalType n, std::complex<double>* A, const OrdinalType lda, const OrdinalType* IPIV, std::complex<double>* WORK, const OrdinalType lwork, OrdinalType* info) const 02190 { 02191 ZGETRI_F77(&n, A, &lda, IPIV, WORK, &lwork, info); 02192 } 02193 02194 template<typename OrdinalType> 02195 void LAPACK<OrdinalType,std::complex<double> >::GECON(const char NORM, const OrdinalType n, const std::complex<double>* A, const OrdinalType lda, const double anorm, double* rcond, std::complex<double>* WORK, double* RWORK, OrdinalType* info) const 02196 { 02197 ZGECON_F77(CHAR_MACRO(NORM), &n, A, &lda, &anorm, rcond, WORK, RWORK, info); 02198 } 02199 02200 template<typename OrdinalType> 02201 void LAPACK<OrdinalType,std::complex<double> >::GESV(const OrdinalType n, const OrdinalType nrhs, std::complex<double>* A, const OrdinalType lda, OrdinalType* IPIV, std::complex<double>* B, const OrdinalType ldb, OrdinalType* info) const 02202 { 02203 ZGESV_F77(&n, &nrhs, A, &lda, IPIV, B, &ldb, info); 02204 } 02205 02206 template<typename OrdinalType> 02207 void LAPACK<OrdinalType,std::complex<double> >::GEEQU(const OrdinalType m, const OrdinalType n, const std::complex<double>* A, const OrdinalType lda, double* R, double* C, double* rowcond, double* colcond, double* amax, OrdinalType* info) const 02208 { 02209 ZGEEQU_F77(&m, &n, A, &lda, R, C, rowcond, colcond, amax, info); 02210 } 02211 02212 template<typename OrdinalType> 02213 void LAPACK<OrdinalType,std::complex<double> >::GERFS(const char TRANS, const OrdinalType n, const OrdinalType nrhs, const std::complex<double>* A, const OrdinalType lda, const std::complex<double>* AF, const OrdinalType ldaf, const OrdinalType* IPIV, const std::complex<double>* B, const OrdinalType ldb, std::complex<double>* X, const OrdinalType ldx, double* FERR, double* BERR, std::complex<double>* WORK, double* RWORK, OrdinalType* info) const 02214 { 02215 ZGERFS_F77(CHAR_MACRO(TRANS), &n, &nrhs, A, &lda, AF, &ldaf, IPIV, B, &ldb, X, &ldx, FERR, BERR, WORK, RWORK, info); 02216 } 02217 02218 template<typename OrdinalType> 02219 void LAPACK<OrdinalType,std::complex<double> >::GESVX(const char FACT, const char TRANS, const OrdinalType n, const OrdinalType nrhs, std::complex<double>* A, const OrdinalType lda, std::complex<double>* AF, const OrdinalType ldaf, OrdinalType* IPIV, char EQUED, double* R, double* C, std::complex<double>* B, const OrdinalType ldb, std::complex<double>* X, const OrdinalType ldx, double* rcond, double* FERR, double* BERR, std::complex<double>* WORK, double* RWORK, OrdinalType* info) const 02220 { 02221 ZGESVX_F77(CHAR_MACRO(FACT), CHAR_MACRO(TRANS), &n, &nrhs, A, &lda, AF, &ldaf, IPIV, CHAR_MACRO(EQUED), R, C, B, &ldb, X, &ldx, rcond, FERR, BERR, WORK, RWORK, info); 02222 } 02223 02224 template<typename OrdinalType> 02225 void LAPACK<OrdinalType,std::complex<double> >::GEHRD(const OrdinalType n, const OrdinalType ilo, const OrdinalType ihi, std::complex<double>* A, const OrdinalType lda, std::complex<double>* TAU, std::complex<double>* WORK, const OrdinalType lwork, OrdinalType* info) const 02226 { 02227 ZGEHRD_F77(&n, &ilo, &ihi, A, &lda, TAU, WORK, &lwork, info); 02228 } 02229 02230 template<typename OrdinalType> 02231 void LAPACK<OrdinalType,std::complex<double> >::TRTRS(const char UPLO, const char TRANS, const char DIAG, const OrdinalType n, const OrdinalType nrhs, const std::complex<double>* A, const OrdinalType lda, std::complex<double>* B, const OrdinalType ldb, OrdinalType* info) const 02232 { 02233 ZTRTRS_F77(CHAR_MACRO(UPLO), CHAR_MACRO(TRANS), CHAR_MACRO(DIAG), &n, &nrhs, A, &lda, B, &ldb, info); 02234 } 02235 02236 template<typename OrdinalType> 02237 void LAPACK<OrdinalType,std::complex<double> >::TRTRI(const char UPLO, const char DIAG, const OrdinalType n, const std::complex<double>* A, const OrdinalType lda, OrdinalType* info) const 02238 { 02239 ZTRTRI_F77(CHAR_MACRO(UPLO), CHAR_MACRO(DIAG), &n, A, &lda, info); 02240 } 02241 02242 template<typename OrdinalType> 02243 void LAPACK<OrdinalType,std::complex<double> >::STEQR(const char COMPZ, const OrdinalType n, double* D, double* E, std::complex<double>* Z, const OrdinalType ldz, double* WORK, OrdinalType* info) const 02244 { 02245 ZSTEQR_F77(CHAR_MACRO(COMPZ), &n, D, E, Z, &ldz, WORK, info); 02246 } 02247 02248 template<typename OrdinalType> 02249 void LAPACK<OrdinalType,std::complex<double> >::HEEV(const char JOBZ, const char UPLO, const OrdinalType n, std::complex<double> * A, const OrdinalType lda, double * W, std::complex<double> * WORK, const OrdinalType lwork, double* RWORK, OrdinalType* info) const 02250 { 02251 ZHEEV_F77(CHAR_MACRO(JOBZ), CHAR_MACRO(UPLO), &n, A, &lda, W, WORK, &lwork, RWORK, info); 02252 } 02253 02254 template<typename OrdinalType> 02255 void LAPACK<OrdinalType,std::complex<double> >::HEGV(const OrdinalType itype, const char JOBZ, const char UPLO, const OrdinalType n, std::complex<double> * A, const OrdinalType lda, std::complex<double> * B, const OrdinalType ldb, double * W, std::complex<double> * WORK, const OrdinalType lwork, double *RWORK, OrdinalType* info) const 02256 { 02257 ZHEGV_F77(&itype, CHAR_MACRO(JOBZ), CHAR_MACRO(UPLO), &n, A, &lda, B, &ldb, W, WORK, &lwork, RWORK, info); 02258 } 02259 02260 template<typename OrdinalType> 02261 void LAPACK<OrdinalType, std::complex<double> >::HSEQR(const char JOB, const char COMPZ, const OrdinalType n, const OrdinalType ilo, const OrdinalType ihi, std::complex<double>* H, const OrdinalType ldh, std::complex<double>* W, std::complex<double>* Z, const OrdinalType ldz, std::complex<double>* WORK, const OrdinalType lwork, OrdinalType* info) const 02262 { 02263 ZHSEQR_F77(CHAR_MACRO(JOB), CHAR_MACRO(COMPZ), &n, &ilo, &ihi, H, &ldh, W, Z, &ldz, WORK, &lwork, info); 02264 } 02265 02266 template<typename OrdinalType> 02267 void LAPACK<OrdinalType, std::complex<double> >::GEES(const char JOBVS, const char SORT, OrdinalType (*ptr2func)(std::complex<double>*), const OrdinalType n, std::complex<double>* A, const OrdinalType lda, OrdinalType* sdim, std::complex<double>* W, std::complex<double>* VS, const OrdinalType ldvs, std::complex<double>* WORK, const OrdinalType lwork, double* RWORK, OrdinalType* BWORK, OrdinalType* info) const 02268 { 02269 ZGEES_F77(CHAR_MACRO(JOBVS), CHAR_MACRO(SORT), ptr2func, &n, A, &lda, sdim, W, VS, &ldvs, WORK, &lwork, RWORK, BWORK, info); 02270 } 02271 02272 template<typename OrdinalType> 02273 void LAPACK<OrdinalType, std::complex<double> >::GEES(const char JOBVS, const OrdinalType n, std::complex<double>* A, const OrdinalType lda, OrdinalType* sdim, double* WR, double* WI, std::complex<double>* VS, const OrdinalType ldvs, std::complex<double>* WORK, const OrdinalType lwork, double* RWORK, OrdinalType* BWORK, OrdinalType* info) const 02274 { 02275 OrdinalType (*nullfptr)(std::complex<double>*) = NULL; 02276 std::vector< std::complex<double> > W(n); 02277 const char sort = 'N'; 02278 ZGEES_F77(CHAR_MACRO(JOBVS), CHAR_MACRO(sort), nullfptr, &n, A, &lda, sdim, &W[0], VS, &ldvs, WORK, &lwork, RWORK, BWORK, info); 02279 for (int i=0; i<n; i++) { 02280 WR[i] = W[i].real(); 02281 WI[i] = W[i].imag(); 02282 } 02283 } 02284 02285 template<typename OrdinalType> 02286 void LAPACK<OrdinalType, std::complex<double> >::GEEV(const char JOBVL, const char JOBVR, const OrdinalType n, std::complex<double>* A, const OrdinalType lda, std::complex<double>* W, std::complex<double>* VL, const OrdinalType ldvl, std::complex<double>* VR, const OrdinalType ldvr, std::complex<double>* WORK, const OrdinalType lwork, double* RWORK, OrdinalType* info) const 02287 { 02288 ZGEEV_F77(CHAR_MACRO(JOBVL), CHAR_MACRO(JOBVR), &n, A, &lda, W, VL, &ldvl, VR, &ldvr, WORK, &lwork, RWORK, info); 02289 } 02290 02291 template<typename OrdinalType> 02292 void LAPACK<OrdinalType, std::complex<double> >::GESVD(const char JOBU, const char JOBVT, const OrdinalType m, const OrdinalType n, std::complex<double> * A, const OrdinalType lda, double* S, std::complex<double> * U, const OrdinalType ldu, std::complex<double> * V, const OrdinalType ldv, std::complex<double> * WORK, const OrdinalType lwork, double* RWORK, OrdinalType* info) const { 02293 ZGESVD_F77(CHAR_MACRO(JOBU), CHAR_MACRO(JOBVT), &m, &n, A, &lda, S, U, &ldu, V, &ldv, WORK, &lwork, RWORK, info); 02294 } 02295 02296 /* 02297 template<typename OrdinalType> 02298 void LAPACK<OrdinalType, std::complex<double> >::GGEVX(const char BALANC, const char JOBVL, const char JOBVR, const char SENSE, const OrdinalType n, std::complex<double>* A, const OrdinalType lda, std::complex<double>* B, const OrdinalType ldb, double* ALPHAR, double* ALPHAI, std::complex<double>* BETA, std::complex<double>* VL, const OrdinalType ldvl, std::complex<double>* VR, const OrdinalType ldvr, OrdinalType* ilo, OrdinalType* ihi, double* LSCALE, double* RSCALE, double* abnrm, double* bbnrm, double* RCONDE, double* RCONDV, std::complex<double>* WORK, const OrdinalType lwork, OrdinalType* IWORK, OrdinalType* BWORK, OrdinalType* info) const 02299 { 02300 std::vector< std::complex<double> > ALPHA(n); 02301 ZGGEVX_F77(CHAR_MACRO(BALANC), CHAR_MACRO(JOBVL), CHAR_MACRO(JOBVR), CHAR_MACRO(SENSE), &n, A, &lda, B, &ldb, &ALPHA[0], BETA, VL, &ldvl, VR, &ldvr, ilo, ihi, LSCALE, RSCALE, abnrm, bbnrm, RCONDE, RCONDV, WORK, &lwork, IWORK, BWORK, info); 02302 for (int i=0; i<n; i++) { 02303 ALPHAR[i] = ALPHA[i].real(); 02304 ALPHAI[i] = ALPHA[i].imag(); 02305 } 02306 } 02307 */ 02308 02309 template<typename OrdinalType> 02310 void LAPACK<OrdinalType, std::complex<double> >::TREVC(const char SIDE, const char HOWMNY, OrdinalType* select, const OrdinalType n, const std::complex<double>* T, const OrdinalType ldt, std::complex<double>* VL, const OrdinalType ldvl, std::complex<double>* VR, const OrdinalType ldvr, const OrdinalType mm, OrdinalType* m, std::complex<double>* WORK, double* RWORK, OrdinalType* info) const 02311 { 02312 ZTREVC_F77(CHAR_MACRO(SIDE), CHAR_MACRO(HOWMNY), select, &n, T, &ldt, VL, &ldvl, VR, &ldvr, &mm, m, WORK, RWORK, info); 02313 } 02314 02315 template<typename OrdinalType> 02316 void LAPACK<OrdinalType, std::complex<double> >::TREVC(const char SIDE, const OrdinalType n, const std::complex<double>* T, const OrdinalType ldt, std::complex<double>* VL, const OrdinalType ldvl, std::complex<double>* VR, const OrdinalType ldvr, const OrdinalType mm, OrdinalType* m, std::complex<double>* WORK, double* RWORK, OrdinalType* info) const 02317 { 02318 std::vector<OrdinalType> select(1); 02319 const char whch = 'A'; 02320 ZTREVC_F77(CHAR_MACRO(SIDE), CHAR_MACRO(whch), &select[0], &n, T, &ldt, VL, &ldvl, VR, &ldvr, &mm, m, WORK, RWORK, info); 02321 } 02322 02323 template<typename OrdinalType> 02324 void LAPACK<OrdinalType, std::complex<double> >::TREXC(const char COMPQ, const OrdinalType n, std::complex<double>* T, const OrdinalType ldt, std::complex<double>* Q, const OrdinalType ldq, OrdinalType ifst, OrdinalType ilst, std::complex<double>* WORK, OrdinalType* info) const 02325 { 02326 ZTREXC_F77(CHAR_MACRO(COMPQ), &n, T, &ldt, Q, &ldq, &ifst, &ilst, info); 02327 } 02328 02329 template<typename OrdinalType> 02330 void LAPACK<OrdinalType, std::complex<double> >::LARTG( const std::complex<double> f, const std::complex<double> g, double* c, std::complex<double>* s, std::complex<double>* r ) const 02331 { 02332 ZLARTG_F77(&f, &g, c, s, r); 02333 } 02334 02335 template<typename OrdinalType> 02336 void LAPACK<OrdinalType, std::complex<double> >::LARFG( const OrdinalType n, std::complex<double>* alpha, std::complex<double>* x, const OrdinalType incx, std::complex<double>* tau ) const 02337 { 02338 ZLARFG_F77(&n, alpha, x, &incx, tau); 02339 } 02340 02341 template<typename OrdinalType> 02342 std::complex<double> LAPACK<OrdinalType, std::complex<double> >::LARND( const OrdinalType idist, OrdinalType* seed ) const 02343 { 02344 return(ZLARND_F77(&idist, seed)); 02345 } 02346 02347 template<typename OrdinalType> 02348 void LAPACK<OrdinalType, std::complex<double> >::LARNV( const OrdinalType idist, OrdinalType* seed, const OrdinalType n, std::complex<double>* v ) const 02349 { 02350 ZLARNV_F77(&idist, seed, &n, v); 02351 } 02352 02353 template<typename OrdinalType> 02354 OrdinalType LAPACK<OrdinalType, std::complex<double> >::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 02355 { 02356 unsigned int opts_length = OPTS.length(); 02357 std::string temp_NAME = "z" + NAME; 02358 unsigned int name_length = temp_NAME.length(); 02359 #if defined (INTEL_CXML) 02360 return ILAENV_F77(&ispec, &temp_NAME[0], name_length, &OPTS[0], opts_length, &N1, &N2, &N3, &N4 ); 02361 #else 02362 return ::ILAENV_F77(&ispec, &temp_NAME[0], &OPTS[0], &N1, &N2, &N3, &N4, name_length, opts_length ); 02363 #endif 02364 } 02365 02366 // END COMPLEX<DOUBLE> PARTIAL SPECIALIZATION IMPLEMENTATION // 02367 02368 #endif // HAVE_TEUCHOS_COMPLEX 02369 02370 #endif // DOXYGEN_SHOULD_SKIP_THIS 02371 02372 } // namespace Teuchos 02373 02374 #endif // _TEUCHOS_LAPACK_HPP_
1.7.4