Teuchos - Trilinos Tools Package Version of the Day
Teuchos_LAPACK.cpp
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 // Redistribution and use in source and binary forms, with or without
00011 // modification, are permitted provided that the following conditions are
00012 // met:
00013 //
00014 // 1. Redistributions of source code must retain the above copyright
00015 // notice, this list of conditions and the following disclaimer.
00016 //
00017 // 2. Redistributions in binary form must reproduce the above copyright
00018 // notice, this list of conditions and the following disclaimer in the
00019 // documentation and/or other materials provided with the distribution.
00020 //
00021 // 3. Neither the name of the Corporation nor the names of the
00022 // contributors may be used to endorse or promote products derived from
00023 // this software without specific prior written permission.
00024 //
00025 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
00026 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00027 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
00028 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
00029 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00030 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00031 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
00032 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
00033 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
00034 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
00035 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00036 //
00037 // Questions? Contact Michael A. Heroux (maherou@sandia.gov)
00038 //
00039 // ***********************************************************************
00040 // @HEADER
00041 
00042 #include "Teuchos_ConfigDefs.hpp"
00043 #include "Teuchos_ScalarTraits.hpp"
00044 #include "Teuchos_LAPACK.hpp"
00045 #include "Teuchos_LAPACK_wrappers.hpp"
00046 
00047 /* for INTEL_CXML, the second arg may need to be changed to 'one'.  If so
00048 the appropriate declaration of one will need to be added back into
00049 functions that include the macro:
00050 */
00051 #if defined (INTEL_CXML)
00052         unsigned int one=1;
00053 #endif
00054 
00055 #ifdef CHAR_MACRO
00056 #undef CHAR_MACRO
00057 #endif
00058 #if defined (INTEL_CXML)
00059 #define CHAR_MACRO(char_var) &char_var, one
00060 #else
00061 #define CHAR_MACRO(char_var) &char_var
00062 #endif
00063 
00064 extern "C" {
00065 
00066 
00067 typedef int (*gees_nullfptr_t)(double*,double*);
00068 
00069 
00070 } // extern "C"
00071 
00072 
00073 namespace Teuchos
00074 {
00075   // BEGIN INT, FLOAT SPECIALIZATION IMPLEMENTATION //
00076 
00077   void LAPACK<int, float>::PTTRF(const int n, float* d, float* e, int* info) const
00078   { SPTTRF_F77(&n,d,e,info); }
00079 
00080 
00081   void LAPACK<int, float>::PTTRS(const int n, const int nrhs, const float* d, const float* e, float* B, const int ldb, int* info) const
00082   { SPTTRS_F77(&n,&nrhs,d,e,B,&ldb,info); }
00083 
00084 
00085   void LAPACK<int, float>::POTRF(const char UPLO, const int n, float* A, const int lda, int* info) const
00086   { SPOTRF_F77(CHAR_MACRO(UPLO), &n, A, &lda, info); }
00087 
00088 
00089   void LAPACK<int, float>::POTRS(const char UPLO, const int n, const int nrhs, const float* A, const int lda, float* B, const int ldb, int* info) const
00090   { SPOTRS_F77(CHAR_MACRO(UPLO), &n, &nrhs, A, &lda, B, &ldb, info); }
00091 
00092 
00093   void LAPACK<int, float>::POTRI(const char UPLO, const int n, float* A, const int lda, int* info) const
00094   { SPOTRI_F77(CHAR_MACRO(UPLO), &n, A, &lda, info); }
00095 
00096 
00097   void LAPACK<int, float>::POCON(const char UPLO, const int n, const float* A, const int lda, const float anorm, float* rcond, float* WORK, int* IWORK, int* info) const
00098   { SPOCON_F77(CHAR_MACRO(UPLO), &n, A, &lda, &anorm, rcond, WORK, IWORK, info); }
00099 
00100 
00101   void LAPACK<int, float>::POSV(const char UPLO, const int n, const int nrhs, float* A, const int lda, float* B, const int ldb, int* info) const
00102   { SPOSV_F77(CHAR_MACRO(UPLO), &n, &nrhs, A, &lda, B, &ldb, info); }
00103 
00104 
00105   void LAPACK<int, float>::POEQU(const int n, const float* A, const int lda, float* S, float* scond, float* amax, int* info) const
00106   { SPOEQU_F77(&n, A, &lda, S, scond, amax, info); }
00107 
00108 
00109   void LAPACK<int, float>::PORFS(const char UPLO, const int n, const int nrhs, float* A, const int lda, const float* AF, const int ldaf, const float* B, const int ldb, float* X, const int ldx, float* FERR, float* BERR, float* WORK, int* IWORK, int* info) const
00110   { SPORFS_F77(CHAR_MACRO(UPLO), &n, &nrhs, A, &lda, AF, &ldaf, B, &ldb, X, &ldx, FERR, BERR, WORK, IWORK, info); }
00111 
00112 
00113   void LAPACK<int, float>::POSVX(const char FACT, const char UPLO, const int n, const int nrhs, float* A, const int lda, float* AF, const int ldaf, char EQUED, float* S, float* B, const int ldb, float* X, const int ldx, float* rcond, float* FERR, float* BERR, float* WORK, int* IWORK, int* info) const
00114   { 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); }
00115 
00116 
00117   void LAPACK<int,float>::GELS(const char TRANS, const int m, const int n, const int nrhs, float* A, const int lda, float* B, const int ldb, float* WORK, const int lwork, int* info) const
00118   { SGELS_F77(CHAR_MACRO(TRANS), &m, &n, &nrhs, A, &lda, B, &ldb, WORK, &lwork, info); }
00119 
00120   void LAPACK<int,float>::GELSS (const int m, const int n, const int nrhs, float* A, const int lda, float* B, const int ldb, float* S, const float rcond, int* rank, float* WORK, const int lwork, float* rwork, int* info) const
00121   {
00122     (void) rwork;
00123     SGELSS_F77(&m, &n, &nrhs, A, &lda, B, &ldb, S, &rcond, rank, WORK, &lwork, info);
00124   }
00125 
00126   void LAPACK<int,float>::GELSS(const int m, const int n, const int nrhs, float* A, const int lda, float* B, const int ldb, float* S, const float rcond, int* rank, float* WORK, const int lwork, int* info) const
00127   { SGELSS_F77(&m, &n, &nrhs, A, &lda, B, &ldb, S, &rcond, rank, WORK, &lwork, info); }
00128 
00129 
00130   void LAPACK<int,float>::GGLSE(const int m, const int n, const int p, float* A, const int lda, float* B, const int ldb, float* C, float* D, float* X, float* WORK, const int lwork, int* info) const
00131   { SGGLSE_F77(&m, &n, &p, A, &lda, B, &ldb, C, D, X, WORK, &lwork, info); }
00132 
00133 
00134   void LAPACK<int,float>::GEQRF( const int m, const int n, float* A, const int lda, float* TAU, float* WORK, const int lwork, int* info) const
00135   { SGEQRF_F77(&m, &n, A, &lda, TAU, WORK, &lwork, info); }
00136 
00137 
00138   void LAPACK<int,float>::GETRF(const int m, const int n, float* A, const int lda, int* IPIV, int* info) const
00139   { SGETRF_F77(&m, &n, A, &lda, IPIV, info); }
00140 
00141 
00142   void LAPACK<int,float>::GETRS(const char TRANS, const int n, const int nrhs, const float* A, const int lda, const int* IPIV, float* B, const int ldb, int* info) const
00143   { SGETRS_F77(CHAR_MACRO(TRANS), &n, &nrhs, A, &lda, IPIV, B, &ldb, info); }
00144 
00145   void LAPACK<int, float>::
00146   LASWP (const int N,
00147          float A[],
00148          const int LDA,
00149          const int K1,
00150          const int K2,
00151          const int IPIV[],
00152          const int INCX) const
00153   {
00154     SLASWP_F77(&N, A, &LDA, &K1, &K2, IPIV, &INCX);
00155   }
00156 
00157   void LAPACK<int,float>::GBTRF(const int m, const int n, const int kl, const int ku, float* A, const int lda, int* IPIV, int* info) const
00158   { SGBTRF_F77(&m, &n, &kl, &ku, A, &lda, IPIV, info); }
00159 
00160 
00161   void LAPACK<int,float>::GBTRS(const char TRANS, const int n, const int kl, const int ku, const int nrhs, const float* A, const int lda, const int* IPIV, float* B, const int ldb, int* info) const
00162   { SGBTRS_F77(CHAR_MACRO(TRANS), &n, &kl, &ku, &nrhs, A, &lda, IPIV, B, &ldb, info); }
00163 
00164 
00165   void LAPACK<int,float>::GTTRF(const int n, float* dl, float* d, float* du, float* du2, int* IPIV, int* info) const
00166   { SGTTRF_F77(&n, dl, d, du, du2, IPIV, info); }
00167 
00168 
00169   void LAPACK<int,float>::GTTRS(const char TRANS, const int n, const int nrhs, const float* dl, const float* d, const float* du, const float* du2, const int* IPIV, float* B, const int ldb, int* info) const
00170   { SGTTRS_F77(CHAR_MACRO(TRANS), &n, &nrhs, dl, d, du, du2, IPIV, B, &ldb, info); }
00171 
00172 
00173   void LAPACK<int,float>::GETRI(const int n, float* A, const int lda, const int* IPIV, float* WORK, const int lwork, int* info) const
00174   { SGETRI_F77(&n, A, &lda, IPIV, WORK, &lwork, info); }
00175 
00176   void
00177   LAPACK<int, float>::LATRS (const char UPLO,
00178                              const char TRANS,
00179                              const char DIAG,
00180                              const char NORMIN,
00181                              const int N,
00182                              float* A,
00183                              const int LDA,
00184                              float* X,
00185                              float* SCALE,
00186                              float* CNORM,
00187                              int* INFO) const
00188   {
00189     SLATRS_F77(CHAR_MACRO(UPLO),
00190                CHAR_MACRO(TRANS),
00191                CHAR_MACRO(DIAG),
00192                CHAR_MACRO(NORMIN),
00193                &N,
00194                A,
00195                &LDA,
00196                X,
00197                SCALE,
00198                CNORM,
00199                INFO);
00200   }
00201 
00202 
00203   void LAPACK<int,float>::GECON(const char NORM, const int n, const float* A, const int lda, const float anorm, float* rcond, float* WORK, int* IWORK, int* info) const
00204   { SGECON_F77(CHAR_MACRO(NORM), &n, A, &lda, &anorm, rcond, WORK, IWORK, info); }
00205 
00206 
00207   void LAPACK<int,float>::GBCON(const char NORM, const int n, const int kl, const int ku, const float* A, const int lda, int* IPIV, const float anorm, float* rcond, float* WORK, int* IWORK, int* info) const
00208   { SGBCON_F77(CHAR_MACRO(NORM), &n, &kl, &ku, A, &lda, IPIV, &anorm, rcond, WORK, IWORK, info); }
00209 
00210 
00211   float LAPACK<int,float>::LANGB(const char NORM, const int n, const int kl, const int ku, const float* A, const int lda, float* WORK) const
00212   { return( SLANGB_F77(CHAR_MACRO(NORM), &n, &kl, &ku, A, &lda, WORK) ); }
00213 
00214 
00215   void LAPACK<int,float>::GESV(const int n, const int nrhs, float* A, const int lda, int* IPIV, float* B, const int ldb, int* info) const
00216   { SGESV_F77(&n, &nrhs, A, &lda, IPIV, B, &ldb, info); }
00217 
00218 
00219   void LAPACK<int,float>::GEEQU(const int m, const int n, const float* A, const int lda, float* R, float* C, float* rowcond, float* colcond, float* amax, int* info) const
00220   { SGEEQU_F77(&m, &n, A, &lda, R, C, rowcond, colcond, amax, info); }
00221 
00222 
00223   void LAPACK<int,float>::GERFS(const char TRANS, const int n, const int nrhs, const float* A, const int lda, const float* AF, const int ldaf, const int* IPIV, const float* B, const int ldb, float* X, const int ldx, float* FERR, float* BERR, float* WORK, int* IWORK, int* info) const
00224   { SGERFS_F77(CHAR_MACRO(TRANS), &n, &nrhs, A, &lda, AF, &ldaf, IPIV, B, &ldb, X, &ldx, FERR, BERR, WORK, IWORK, info); }
00225 
00226 
00227   void LAPACK<int,float>::GBEQU(const int m, const int n, const int kl, const int ku, const float* A, const int lda, float* R, float* C, float* rowcond, float* colcond, float* amax, int* info) const
00228   { SGBEQU_F77(&m, &n, &kl, &ku, A, &lda, R, C, rowcond, colcond, amax, info); }
00229 
00230 
00231   void LAPACK<int,float>::GBRFS(const char TRANS, const int n, const int kl, const int ku, const int nrhs, const float* A, const int lda, const float* AF, const int ldaf, const int* IPIV, const float* B, const int ldb, float* X, const int ldx, float* FERR, float* BERR, float* WORK, int* IWORK, int* info) const
00232   { SGBRFS_F77(CHAR_MACRO(TRANS), &n, &kl, &ku, &nrhs, A, &lda, AF, &ldaf, IPIV, B, &ldb, X, &ldx, FERR, BERR, WORK, IWORK, info); }
00233 
00234 
00235   void LAPACK<int,float>::GESVX(const char FACT, const char TRANS, const int n, const int nrhs, float* A, const int lda, float* AF, const int ldaf, int* IPIV, char EQUED, float* R, float* C, float* B, const int ldb, float* X, const int ldx, float* rcond, float* FERR, float* BERR, float* WORK, int* IWORK, int* info) const
00236   { 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); }
00237 
00238 
00239   void LAPACK<int,float>::SYTRD(const char UPLO, const int n, float* A, const int lda, float* D, float* E, float* TAU, float* WORK, const int lwork, int* info) const
00240   { SSYTRD_F77(CHAR_MACRO(UPLO), &n, A, &lda, D, E, TAU, WORK, &lwork, info); }
00241 
00242 
00243   void LAPACK<int,float>::GEHRD(const int n, const int ilo, const int ihi, float* A, const int lda, float* TAU, float* WORK, const int lwork, int* info) const
00244   { SGEHRD_F77(&n, &ilo, &ihi, A, &lda, TAU, WORK, &lwork, info); }
00245 
00246 
00247   void LAPACK<int,float>::TRTRS(const char UPLO, const char TRANS, const char DIAG, const int n, const int nrhs, const float* A, const int lda, float* B, const int ldb, int* info) const
00248   { STRTRS_F77(CHAR_MACRO(UPLO), CHAR_MACRO(TRANS), CHAR_MACRO(DIAG), &n, &nrhs, A, &lda, B, &ldb, info); }
00249 
00250 
00251   void LAPACK<int,float>::TRTRI(const char UPLO, const char DIAG, const int n, const float* A, const int lda, int* info) const
00252   { STRTRI_F77(CHAR_MACRO(UPLO), CHAR_MACRO(DIAG), &n, A, &lda, info); }
00253 
00254 
00255   void LAPACK<int,float>::SPEV(const char JOBZ, const char UPLO, const int n, float* AP, float* W, float* Z, const int ldz, float* WORK, int* info) const
00256   { SSPEV_F77(CHAR_MACRO(JOBZ), CHAR_MACRO(UPLO), &n, AP, W, Z, &ldz, WORK, info); }
00257 
00258 
00259   void LAPACK<int,float>::SYEV(const char JOBZ, const char UPLO, const int n, float* A, const int lda, float* W, float* WORK, const int lwork, int* info) const
00260   { SSYEV_F77(CHAR_MACRO(JOBZ), CHAR_MACRO(UPLO), &n, A, &lda, W, WORK, &lwork, info); }
00261 
00262 
00263   void LAPACK<int,float>::SYGV(const int itype, const char JOBZ, const char UPLO, const int n, float* A, const int lda, float* B, const int ldb, float* W, float* WORK, const int lwork, int* info) const
00264   { SSYGV_F77(&itype, CHAR_MACRO(JOBZ), CHAR_MACRO(UPLO), &n, A, &lda, B, &ldb, W, WORK, &lwork, info); }
00265 
00266 
00267   void LAPACK<int,float>::HEEV(const char JOBZ, const char UPLO, const int n, float* A, const int lda, float* W, float* WORK, const int lwork, float* RWORK, int* info) const
00268   { SSYEV_F77(CHAR_MACRO(JOBZ), CHAR_MACRO(UPLO), &n, A, &lda, W, WORK, &lwork, info); }
00269 
00270 
00271   void LAPACK<int,float>::HEGV(const int itype, const char JOBZ, const char UPLO, const int n, float* A, const int lda, float* B, const int ldb, float* W, float* WORK, const int lwork, float *RWORK, int* info) const
00272   { SSYGV_F77(&itype, CHAR_MACRO(JOBZ), CHAR_MACRO(UPLO), &n, A, &lda, B, &ldb, W, WORK, &lwork, info); }
00273 
00274 
00275   void LAPACK<int,float>::STEQR(const char COMPZ, const int n, float* D, float* E, float* Z, const int ldz, float* WORK, int* info) const
00276   { SSTEQR_F77(CHAR_MACRO(COMPZ), &n, D, E, Z, &ldz, WORK, info); }
00277 
00278 
00279   void LAPACK<int, float>::HSEQR(const char JOB, const char COMPZ, const int n, const int ilo, const int ihi, float* H, const int ldh, float* WR, float* WI, float* Z, const int ldz, float* WORK, const int lwork, int* info) const
00280   { SHSEQR_F77(CHAR_MACRO(JOB), CHAR_MACRO(COMPZ), &n, &ilo, &ihi, H, &ldh, WR, WI, Z, &ldz, WORK, &lwork, info); }
00281 
00282 
00283   void LAPACK<int, float>::GEES(const char JOBVS, const char SORT, int (*ptr2func)(float*, float*), const int n, float* A, const int lda, int* sdim, float* WR, float* WI, float* VS, const int ldvs, float* WORK, const int lwork, int* BWORK, int* info) const
00284   { SGEES_F77(CHAR_MACRO(JOBVS), CHAR_MACRO(SORT), ptr2func, &n, A, &lda, sdim, WR, WI, VS, &ldvs, WORK, &lwork, BWORK, info); }
00285 
00286 
00287   void LAPACK<int, float>::GEES(const char JOBVS, const int n, float* A, const int lda, int* sdim, float* WR, float* WI, float* VS, const int ldvs, float* WORK, const int lwork, float* RWORK, int* BWORK, int* info) const
00288   {
00289     int (*nullfptr)(float*,float*) = NULL;
00290     const char sort = 'N';
00291     SGEES_F77(CHAR_MACRO(JOBVS), CHAR_MACRO(sort), nullfptr, &n, A, &lda, sdim, WR, WI, VS, &ldvs, WORK, &lwork, BWORK, info);
00292   }
00293 
00294 
00295   void LAPACK<int, float>::GEEV(const char JOBVL, const char JOBVR, const int n, float* A, const int lda, float* WR, float* WI, float* VL, const int ldvl, float* VR, const int ldvr, float* WORK, const int lwork, int* info) const
00296   { SGEEV_F77(CHAR_MACRO(JOBVL), CHAR_MACRO(JOBVR), &n, A, &lda, WR, WI, VL, &ldvl, VR, &ldvr, WORK, &lwork, info); }
00297 
00298 
00299   void LAPACK<int, float>::GESVD(const char JOBU, const char JOBVT, const int m, const int n, float* A, const int lda, float* S, float* U, const int ldu, float* V, const int ldv, float* WORK, const int lwork, float* RWORK, int* info) const
00300   { SGESVD_F77(CHAR_MACRO(JOBU), CHAR_MACRO(JOBVT), &m, &n, A, &lda, S, U, &ldu, V, &ldv, WORK, &lwork, info); }
00301 
00302 
00303   void LAPACK<int,float>::GGEVX(const char BALANC, const char JOBVL, const char JOBVR, const char SENSE, const int n, float* A, const int lda, float* B, const int ldb, float* ALPHAR, float* ALPHAI, float* BETA, float* VL, const int ldvl, float* VR, const int ldvr, int* ilo, int* ihi, float* LSCALE, float* RSCALE, float* abnrm, float* bbnrm, float* RCONDE, float* RCONDV, float* WORK, const int lwork, int* IWORK, int* BWORK, int* info) const
00304   { 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); }
00305 
00306 
00307   void LAPACK<int, float>::GGEV(const char JOBVL, const char JOBVR, const int n, float *A, const int lda, float *B, const int ldb, float *ALPHAR, float *ALPHAI, float *BETA, float *VL, const int ldvl, float *VR, const int ldvr, float *WORK, const int lwork, int *info) const
00308   { SGGEV_F77(CHAR_MACRO(JOBVL), CHAR_MACRO(JOBVR), &n, A, &lda, B, &ldb, ALPHAR, ALPHAI, BETA, VL, &ldvl, VR, &ldvr, WORK, &lwork, info); }
00309 
00310 
00311   void LAPACK<int, float>::ORMQR(const char SIDE, const char TRANS, const int m, const int n, const int k, float* A, const int lda, const float* TAU, float* C, const int ldc, float* WORK, const int lwork, int* info) const
00312   { SORMQR_F77(CHAR_MACRO(SIDE), CHAR_MACRO(TRANS), &m, &n, &k, A, &lda, TAU, C, &ldc, WORK, &lwork, info); }
00313 
00314   void LAPACK<int, float>::UNMQR(const char SIDE, const char TRANS, const int m, const int n, const int k, float* A, const int lda, const float* TAU, float* C, const int ldc, float* WORK, const int lwork, int* info) const
00315   {
00316     // LAPACK only defines UNMQR for Z and C (complex*8
00317     // resp. complex*16), but logically, UNMQR means the same thing as
00318     // ORMQR for real arithmetic.
00319     ORMQR (SIDE, TRANS, m, n, k, A, lda, TAU, C, ldc, WORK, lwork, info);
00320   }
00321 
00322   void LAPACK<int, float>::ORGQR(const int m, const int n, const int k, float* A, const int lda, const float* TAU, float* WORK, const int lwork, int* info) const
00323   { SORGQR_F77( &m, &n, &k, A, &lda, TAU, WORK, &lwork, info); }
00324 
00325 
00326   void LAPACK<int, float>::UNGQR(const int m, const int n, const int k, float* A, const int lda, const float* TAU, float* WORK, const int lwork, int* info) const
00327   { SORGQR_F77( &m, &n, &k, A, &lda, TAU, WORK, &lwork, info); }
00328 
00329 
00330   void LAPACK<int, float>::ORGHR(const int n, const int ilo, const int ihi, float* A, const int lda, const float* TAU, float* WORK, const int lwork, int* info) const
00331   { SORGHR_F77(&n, &ilo, &ihi, A, &lda, TAU, WORK, &lwork, info); }
00332 
00333 
00334   void LAPACK<int, float>::ORMHR(const char SIDE, const char TRANS, const int m, const int n, const int ilo, const int ihi, const float* A, const int lda, const float* TAU, float* C, const int ldc, float* WORK, const int lwork, int* info) const
00335   { SORMHR_F77(CHAR_MACRO(SIDE), CHAR_MACRO(TRANS), &m, &n, &ilo, &ihi, A, &lda, TAU, C, &ldc, WORK, &lwork, info); }
00336 
00337 
00338   void LAPACK<int, float>::TREVC(const char SIDE, const char HOWMNY, int* select, const int n, const float* T, const int ldt, float* VL, const int ldvl, float* VR, const int ldvr, const int mm, int* m, float* WORK, int* info) const
00339   { STREVC_F77(CHAR_MACRO(SIDE), CHAR_MACRO(HOWMNY), select, &n, T, &ldt, VL, &ldvl, VR, &ldvr, &mm, m, WORK, info); }
00340 
00341 
00342   void LAPACK<int, float>::TREVC(const char SIDE, const int n, const float* T, const int ldt, float* VL, const int ldvl, float* VR, const int ldvr, const int mm, int* m, float* WORK, float* RWORK, int* info) const
00343   {
00344     std::vector<int> select(1);
00345     const char whch = 'A';
00346     STREVC_F77(CHAR_MACRO(SIDE), CHAR_MACRO(whch), &select[0], &n, T, &ldt, VL, &ldvl, VR, &ldvr, &mm, m, WORK, info);
00347   }
00348 
00349 
00350   void LAPACK<int, float>::TREXC(const char COMPQ, const int n, float* T, const int ldt, float* Q, const int ldq, int ifst, int ilst, float* WORK, int* info) const
00351   { STREXC_F77(CHAR_MACRO(COMPQ), &n, T, &ldt, Q, &ldq, &ifst, &ilst, WORK, info); }
00352 
00353 
00354   void LAPACK<int, float>::LARTG( const float f, const float g, float* c, float* s, float* r ) const
00355   { SLARTG_F77(&f, &g, c, s, r); }
00356 
00357 
00358   void LAPACK<int, float>::LARFG( const int n, float* alpha, float* x, const int incx, float* tau ) const
00359   { SLARFG_F77(&n, alpha, x, &incx, tau); }
00360 
00361 
00362   void LAPACK<int, float>::GEBAL(const char JOBZ, const int n, float* A, const int lda, int ilo, int ihi, float* scale, int* info) const
00363   { SGEBAL_F77(CHAR_MACRO(JOBZ),&n, A, &lda, &ilo, &ihi, scale, info); }
00364 
00365 
00366   void LAPACK<int, float>::GEBAK(const char JOBZ, const char SIDE, const int n, const int ilo, const int ihi, const float* scale, const int m, float* V, const int ldv, int* info) const
00367   { SGEBAK_F77(CHAR_MACRO(JOBZ), CHAR_MACRO(SIDE), &n, &ilo, &ihi, scale, &m, V, &ldv, info); }
00368 
00369 #ifdef HAVE_TEUCHOS_LAPACKLARND
00370   float LAPACK<int, float>::LARND( const int idist, int* seed ) const
00371   { return(SLARND_F77(&idist, seed)); }
00372 #endif
00373 
00374   void LAPACK<int, float>::LARNV( const int idist, int* seed, const int n, float* v ) const
00375   { SLARNV_F77(&idist, seed, &n, v); }
00376 
00377 
00378   float LAPACK<int, float>::LAMCH(const char CMACH) const
00379   { return(SLAMCH_F77(CHAR_MACRO(CMACH))); }
00380 
00381 
00382   int LAPACK<int, float>::ILAENV( const int ispec, const std::string& NAME, const std::string& OPTS, const int N1, const int N2, const int N3, const int N4 ) const
00383   {
00384     unsigned int opts_length = OPTS.length();
00385     // if user queries a Hermitian routine, change it to a symmetric routine
00386     std::string temp_NAME = "s" + NAME;
00387     if (temp_NAME.substr(1,2) == "he") {
00388       temp_NAME.replace(1,2,"sy");
00389     }
00390     unsigned int name_length = temp_NAME.length();
00391 #if defined (INTEL_CXML)
00392     return ILAENV_F77(&ispec, &temp_NAME[0], name_length, &OPTS[0], opts_length, &N1, &N2, &N3, &N4 );
00393 #else
00394     return ILAENV_F77(&ispec, &temp_NAME[0], &OPTS[0], &N1, &N2, &N3, &N4, name_length, opts_length );
00395 #endif
00396   }
00397 
00398 
00399   float LAPACK<int, float>::LAPY2(const float x, const float y) const
00400   {
00401 #if defined(HAVE_TEUCHOS_BLASFLOAT)
00402     return SLAPY2_F77(&x, &y);
00403 #else
00404     typedef ScalarTraits<float> ST;
00405     const float xabs = ST::magnitude(x);
00406     const float yabs = ST::magnitude(y);
00407     const float w = TEUCHOS_MAX(xabs, yabs);
00408     const float z = TEUCHOS_MIN(xabs, yabs);
00409     if ( z == 0.0 ) {
00410       return w;
00411     }
00412     const float z_over_w = z/w;
00413     return w*ST::squareroot( 1.0+(z_over_w*z_over_w));
00414 #endif
00415   }
00416 
00417   // END INT, FLOAT SPECIALIZATION IMPLEMENTATION //
00418 
00419   // BEGIN INT, DOUBLE SPECIALIZATION IMPLEMENTATION //
00420 
00421 
00422 
00423   void LAPACK<int, double>::PTTRF(const int n, double* d, double* e, int* info) const
00424   { DPTTRF_F77(&n,d,e,info); }
00425 
00426 
00427   void LAPACK<int, double>::PTTRS(const int n, const int nrhs, const double* d, const double* e, double* B, const int ldb, int* info) const
00428   { DPTTRS_F77(&n,&nrhs,d,e,B,&ldb,info); }
00429 
00430 
00431   void LAPACK<int, double>::POTRF(const char UPLO, const int n, double* A, const int lda, int* info) const
00432   { DPOTRF_F77(CHAR_MACRO(UPLO), &n, A, &lda, info); }
00433 
00434 
00435   void LAPACK<int, double>::POTRS(const char UPLO, const int n, const int nrhs, const double* A, const int lda, double* B, const int ldb, int* info) const
00436   { DPOTRS_F77(CHAR_MACRO(UPLO), &n, &nrhs, A, &lda, B, &ldb, info); }
00437 
00438 
00439   void LAPACK<int, double>::POTRI(const char UPLO, const int n, double* A, const int lda, int* info) const
00440   { DPOTRI_F77(CHAR_MACRO(UPLO), &n, A, &lda, info); }
00441 
00442 
00443   void LAPACK<int, double>::POCON(const char UPLO, const int n, const double* A, const int lda, const double anorm, double* rcond, double* WORK, int* IWORK, int* info) const
00444   { DPOCON_F77(CHAR_MACRO(UPLO), &n, A, &lda, &anorm, rcond, WORK, IWORK, info); }
00445 
00446 
00447   void LAPACK<int, double>::POSV(const char UPLO, const int n, const int nrhs, double* A, const int lda, double* B, const int ldb, int* info) const
00448   { DPOSV_F77(CHAR_MACRO(UPLO), &n, &nrhs, A, &lda, B, &ldb, info); }
00449 
00450 
00451   void LAPACK<int, double>::POEQU(const int n, const double* A, const int lda, double* S, double* scond, double* amax, int* info) const
00452   { DPOEQU_F77(&n, A, &lda, S, scond, amax, info); }
00453 
00454 
00455   void LAPACK<int, double>::PORFS(const char UPLO, const int n, const int nrhs, double* A, const int lda, const double* AF, const int ldaf, const double* B, const int ldb, double* X, const int ldx, double* FERR, double* BERR, double* WORK, int* IWORK, int* info) const
00456   { DPORFS_F77(CHAR_MACRO(UPLO), &n, &nrhs, A, &lda, AF, &ldaf, B, &ldb, X, &ldx, FERR, BERR, WORK, IWORK, info); }
00457 
00458 
00459   void LAPACK<int, double>::POSVX(const char FACT, const char UPLO, const int n, const int nrhs, double* A, const int lda, double* AF, const int ldaf, char EQUED, double* S, double* B, const int ldb, double* X, const int ldx, double* rcond, double* FERR, double* BERR, double* WORK, int* IWORK, int* info) const
00460   { 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); }
00461 
00462 
00463   void LAPACK<int,double>::GELS(const char TRANS, const int m, const int n, const int nrhs, double* A, const int lda, double* B, const int ldb, double* WORK, const int lwork, int* info) const
00464   { DGELS_F77(CHAR_MACRO(TRANS), &m, &n, &nrhs, A, &lda, B, &ldb, WORK, &lwork, info); }
00465 
00466 
00467   void LAPACK<int,double>::GELSS(const int m, const int n, const int nrhs, double* A, const int lda, double* B, const int ldb, double* S, const double rcond, int* rank, double* WORK, const int lwork, double* rwork, int* info) const
00468   {
00469     (void) rwork;
00470     DGELSS_F77(&m, &n, &nrhs, A, &lda, B, &ldb, S, &rcond, rank, WORK, &lwork, info);
00471   }
00472 
00473 
00474   void LAPACK<int,double>::GELSS(const int m, const int n, const int nrhs, double* A, const int lda, double* B, const int ldb, double* S, const double rcond, int* rank, double* WORK, const int lwork, int* info) const
00475   { DGELSS_F77(&m, &n, &nrhs, A, &lda, B, &ldb, S, &rcond, rank, WORK, &lwork, info); }
00476 
00477 
00478   void LAPACK<int,double>::GGLSE(const int m, const int n, const int p, double* A, const int lda, double* B, const int ldb, double* C, double* D, double* X, double* WORK, const int lwork, int* info) const
00479   { DGGLSE_F77(&m, &n, &p, A, &lda, B, &ldb, C, D, X, WORK, &lwork, info); }
00480 
00481 
00482   void LAPACK<int,double>::GEQRF( const int m, const int n, double* A, const int lda, double* TAU, double* WORK, const int lwork, int* info) const
00483   { DGEQRF_F77(&m, &n, A, &lda, TAU, WORK, &lwork, info); }
00484 
00485 
00486   void LAPACK<int,double>::GETRF(const int m, const int n, double* A, const int lda, int* IPIV, int* info) const
00487   { DGETRF_F77(&m, &n, A, &lda, IPIV, info); }
00488 
00489 
00490   void LAPACK<int,double>::GETRS(const char TRANS, const int n, const int nrhs, const double* A, const int lda, const int* IPIV, double* B, const int ldb, int* info) const
00491   { DGETRS_F77(CHAR_MACRO(TRANS), &n, &nrhs, A, &lda, IPIV, B, &ldb, info); }
00492 
00493   void LAPACK<int, double>::
00494   LASWP (const int N,
00495          double A[],
00496          const int LDA,
00497          const int K1,
00498          const int K2,
00499          const int IPIV[],
00500          const int INCX) const
00501   {
00502     DLASWP_F77(&N, A, &LDA, &K1, &K2, IPIV, &INCX);
00503   }
00504 
00505   void LAPACK<int,double>::GBTRF(const int m, const int n, const int kl, const int ku, double* A, const int lda, int* IPIV, int* info) const
00506   { DGBTRF_F77(&m, &n, &kl, &ku, A, &lda, IPIV, info); }
00507 
00508 
00509   void LAPACK<int,double>::GBTRS(const char TRANS, const int n, const int kl, const int ku, const int nrhs, const double* A, const int lda, const int* IPIV, double* B, const int ldb, int* info) const
00510   { DGBTRS_F77(CHAR_MACRO(TRANS), &n, &kl, &ku, &nrhs, A, &lda, IPIV, B, &ldb, info); }
00511 
00512 
00513   void LAPACK<int,double>::GTTRF(const int n, double* dl, double* d, double* du, double* du2, int* IPIV, int* info) const
00514   { DGTTRF_F77(&n, dl, d, du, du2, IPIV, info); }
00515 
00516 
00517   void LAPACK<int,double>::GTTRS(const char TRANS, const int n, const int nrhs, const double* dl, const double* d, const double* du, const double* du2, const int* IPIV, double* B, const int ldb, int* info) const
00518   { DGTTRS_F77(CHAR_MACRO(TRANS), &n, &nrhs, dl, d, du, du2, IPIV, B, &ldb, info); }
00519 
00520 
00521   void LAPACK<int,double>::GETRI(const int n, double* A, const int lda, const int* IPIV, double* WORK, const int lwork, int* info) const
00522   { DGETRI_F77(&n, A, &lda, IPIV, WORK, &lwork, info); }
00523 
00524   void
00525   LAPACK<int, double>::LATRS (const char UPLO,
00526                               const char TRANS,
00527                               const char DIAG,
00528                               const char NORMIN,
00529                               const int N,
00530                               double* A,
00531                               const int LDA,
00532                               double* X,
00533                               double* SCALE,
00534                               double* CNORM,
00535                               int* INFO) const
00536   {
00537     DLATRS_F77(CHAR_MACRO(UPLO),
00538                CHAR_MACRO(TRANS),
00539                CHAR_MACRO(DIAG),
00540                CHAR_MACRO(NORMIN),
00541                &N,
00542                A,
00543                &LDA,
00544                X,
00545                SCALE,
00546                CNORM,
00547                INFO);
00548   }
00549 
00550   void LAPACK<int,double>::GECON(const char NORM, const int n, const double* A, const int lda, const double anorm, double* rcond, double* WORK, int* IWORK, int* info) const
00551   { DGECON_F77(CHAR_MACRO(NORM), &n, A, &lda, &anorm, rcond, WORK, IWORK, info); }
00552 
00553 
00554   void LAPACK<int,double>::GBCON(const char NORM, const int n, const int kl, const int ku, const double* A, const int lda, int* IPIV, const double anorm, double* rcond, double* WORK, int* IWORK, int* info) const
00555   { DGBCON_F77(CHAR_MACRO(NORM), &n, &kl, &ku, A, &lda, IPIV, &anorm, rcond, WORK, IWORK, info); }
00556 
00557 
00558   double LAPACK<int,double>::LANGB(const char NORM, const int n, const int kl, const int ku, const double* A, const int lda, double* WORK) const
00559   { return( DLANGB_F77(CHAR_MACRO(NORM), &n, &kl, &ku, A, &lda, WORK) ); }
00560 
00561 
00562   void LAPACK<int,double>::GESV(const int n, const int nrhs, double* A, const int lda, int* IPIV, double* B, const int ldb, int* info) const
00563   { DGESV_F77(&n, &nrhs, A, &lda, IPIV, B, &ldb, info); }
00564 
00565 
00566   void LAPACK<int,double>::GEEQU(const int m, const int n, const double* A, const int lda, double* R, double* C, double* rowcond, double* colcond, double* amax, int* info) const
00567   { DGEEQU_F77(&m, &n, A, &lda, R, C, rowcond, colcond, amax, info); }
00568 
00569 
00570   void LAPACK<int,double>::GERFS(const char TRANS, const int n, const int nrhs, const double* A, const int lda, const double* AF, const int ldaf, const int* IPIV, const double* B, const int ldb, double* X, const int ldx, double* FERR, double* BERR, double* WORK, int* IWORK, int* info) const
00571   { DGERFS_F77(CHAR_MACRO(TRANS), &n, &nrhs, A, &lda, AF, &ldaf, IPIV, B, &ldb, X, &ldx, FERR, BERR, WORK, IWORK, info); }
00572 
00573 
00574   void LAPACK<int,double>::GBEQU(const int m, const int n, const int kl, const int ku, const double* A, const int lda, double* R, double* C, double* rowcond, double* colcond, double* amax, int* info) const
00575   { DGBEQU_F77(&m, &n, &kl, &ku, A, &lda, R, C, rowcond, colcond, amax, info); }
00576 
00577 
00578   void LAPACK<int,double>::GBRFS(const char TRANS, const int n, const int kl, const int ku, const int nrhs, const double* A, const int lda, const double* AF, const int ldaf, const int* IPIV, const double* B, const int ldb, double* X, const int ldx, double* FERR, double* BERR, double* WORK, int* IWORK, int* info) const
00579   { DGBRFS_F77(CHAR_MACRO(TRANS), &n, &kl, &ku, &nrhs, A, &lda, AF, &ldaf, IPIV, B, &ldb, X, &ldx, FERR, BERR, WORK, IWORK, info); }
00580 
00581 
00582   void LAPACK<int,double>::GESVX(const char FACT, const char TRANS, const int n, const int nrhs, double* A, const int lda, double* AF, const int ldaf, int* IPIV, char EQUED, double* R, double* C, double* B, const int ldb, double* X, const int ldx, double* rcond, double* FERR, double* BERR, double* WORK, int* IWORK, int* info) const
00583   { 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); }
00584 
00585 
00586   void LAPACK<int,double>::SYTRD(const char UPLO, const int n, double* A, const int lda, double* D, double* E, double* TAU, double* WORK, const int lwork, int* info) const
00587   { DSYTRD_F77(CHAR_MACRO(UPLO), &n, A, &lda, D, E, TAU, WORK, &lwork, info); }
00588 
00589 
00590   void LAPACK<int, double>::GEHRD(const int n, const int ilo, const int ihi, double* A, const int lda, double* TAU, double* WORK, const int lwork, int* info) const
00591   { DGEHRD_F77(&n, &ilo, &ihi, A, &lda, TAU, WORK, &lwork, info); }
00592 
00593 
00594   void LAPACK<int,double>::TRTRS(const char UPLO, const char TRANS, const char DIAG, const int n, const int nrhs, const double* A, const int lda, double* B, const int ldb, int* info) const
00595   { DTRTRS_F77(CHAR_MACRO(UPLO), CHAR_MACRO(TRANS), CHAR_MACRO(DIAG), &n, &nrhs, A, &lda, B, &ldb, info); }
00596 
00597 
00598   void LAPACK<int,double>::TRTRI(const char UPLO, const char DIAG, const int n, const double* A, const int lda, int* info) const
00599   { DTRTRI_F77(CHAR_MACRO(UPLO), CHAR_MACRO(DIAG), &n, A, &lda, info); }
00600 
00601 
00602   void LAPACK<int,double>::SPEV(const char JOBZ, const char UPLO, const int n, double* AP, double* W, double* Z, const int ldz, double* WORK, int* info) const
00603   { DSPEV_F77(CHAR_MACRO(JOBZ), CHAR_MACRO(UPLO), &n, AP, W, Z, &ldz, WORK, info); }
00604 
00605 
00606   void LAPACK<int,double>::SYEV(const char JOBZ, const char UPLO, const int n, double* A, const int lda, double* W, double* WORK, const int lwork, int* info) const
00607   {
00608     DSYEV_F77(CHAR_MACRO(JOBZ), CHAR_MACRO(UPLO), &n, A, &lda, W, WORK, &lwork, info);
00609   }
00610 
00611 
00612   void LAPACK<int,double>::SYGV(const int itype, const char JOBZ, const char UPLO, const int n, double* A, const int lda, double* B, const int ldb, double* W, double* WORK, const int lwork, int* info) const
00613   {
00614     DSYGV_F77(&itype, CHAR_MACRO(JOBZ), CHAR_MACRO(UPLO), &n, A, &lda, B, &ldb, W, WORK, &lwork, info);
00615   }
00616 
00617 
00618   void LAPACK<int,double>::HEEV(const char JOBZ, const char UPLO, const int n, double* A, const int lda, double* W, double* WORK, const int lwork, double* RWORK, int* info) const
00619   {
00620     DSYEV_F77(CHAR_MACRO(JOBZ), CHAR_MACRO(UPLO), &n, A, &lda, W, WORK, &lwork, info);
00621   }
00622 
00623 
00624   void LAPACK<int,double>::HEGV(const int itype, const char JOBZ, const char UPLO, const int n, double* A, const int lda, double* B, const int ldb, double* W, double* WORK, const int lwork, double *RWORK, int* info) const
00625   {
00626     DSYGV_F77(&itype, CHAR_MACRO(JOBZ), CHAR_MACRO(UPLO), &n, A, &lda, B, &ldb, W, WORK, &lwork, info);
00627   }
00628 
00629 
00630   void LAPACK<int,double>::STEQR(const char COMPZ, const int n, double* D, double* E, double* Z, const int ldz, double* WORK, int* info) const
00631   {
00632     DSTEQR_F77(CHAR_MACRO(COMPZ), &n, D, E, Z, &ldz, WORK, info);
00633   }
00634 
00635 
00636   void LAPACK<int, double>::HSEQR(const char JOB, const char COMPZ, const int n, const int ilo, const int ihi, double* H, const int ldh, double* WR, double* WI, double* Z, const int ldz, double* WORK, const int lwork, int* info) const
00637   {
00638     DHSEQR_F77(CHAR_MACRO(JOB), CHAR_MACRO(COMPZ), &n, &ilo, &ihi, H, &ldh, WR, WI, Z, &ldz, WORK, &lwork, info);
00639   }
00640 
00641 
00642   void LAPACK<int, double>::GEES(const char JOBVS, const char SORT, int (*ptr2func)(double*, double*), const int n, double* A, const int lda, int* sdim, double* WR, double* WI, double* VS, const int ldvs, double* WORK, const int lwork, int* BWORK, int* info) const
00643   {
00644     DGEES_F77(CHAR_MACRO(JOBVS), CHAR_MACRO(SORT), ptr2func, &n, A, &lda, sdim, WR, WI, VS, &ldvs, WORK, &lwork, BWORK, info);
00645   }
00646 
00647 
00648   void LAPACK<int, double>::GEES(const char JOBVS, const int n, double* A, const int lda, int* sdim, double* WR, double* WI, double* VS, const int ldvs, double* WORK, const int lwork, double* RWORK, int* BWORK, int* info) const
00649   {
00650     //int (*nullfptr)(double*,double*) = NULL;
00651     gees_nullfptr_t nullfptr = 0;
00652     const char sort = 'N';
00653     DGEES_F77(CHAR_MACRO(JOBVS), CHAR_MACRO(sort), nullfptr, &n, A, &lda, sdim, WR, WI, VS, &ldvs, WORK, &lwork, BWORK, info);
00654   }
00655 
00656 
00657   void LAPACK<int, double>::GEEV(const char JOBVL, const char JOBVR, const int n, double* A, const int lda, double* WR, double* WI, double* VL, const int ldvl, double* VR, const int ldvr, double* WORK, const int lwork, int* info) const
00658   {
00659     DGEEV_F77(CHAR_MACRO(JOBVL), CHAR_MACRO(JOBVR), &n, A, &lda, WR, WI, VL, &ldvl, VR, &ldvr, WORK, &lwork, info);
00660   }
00661 
00662 
00663   void LAPACK<int, double>::GESVD(const char JOBU, const char JOBVT, const int m, const int n, double* A, const int lda, double* S, double* U, const int ldu, double* V, const int ldv, double* WORK, const int lwork, double* RWORK, int* info) const {
00664     DGESVD_F77(CHAR_MACRO(JOBU), CHAR_MACRO(JOBVT), &m, &n, A, &lda, S, U, &ldu, V, &ldv, WORK, &lwork, info);
00665   }
00666 
00667 
00668   void LAPACK<int, double>::GGEVX(const char BALANC, const char JOBVL, const char JOBVR, const char SENSE, const int n, double* A, const int lda, double* B, const int ldb, double* ALPHAR, double* ALPHAI, double* BETA, double* VL, const int ldvl, double* VR, const int ldvr, int* ilo, int* ihi, double* LSCALE, double* RSCALE, double* abnrm, double* bbnrm, double* RCONDE, double* RCONDV, double* WORK, const int lwork, int* IWORK, int* BWORK, int* info) const
00669   {
00670     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);
00671   }
00672 
00673 
00674   void LAPACK<int, double>::GGEV(const char JOBVL, const char JOBVR, const int n, double *A, const int lda, double *B, const int ldb, double *ALPHAR, double *ALPHAI, double *BETA, double *VL, const int ldvl, double *VR, const int ldvr, double *WORK, const int lwork, int *info) const
00675   {
00676     DGGEV_F77(CHAR_MACRO(JOBVL), CHAR_MACRO(JOBVR), &n, A, &lda, B, &ldb, ALPHAR, ALPHAI, BETA, VL, &ldvl, VR, &ldvr, WORK, &lwork, info);
00677   }
00678 
00679 
00680   void LAPACK<int, double>::ORMQR(const char SIDE, const char TRANS, const int m, const int n, const int k, double* A, const int lda, const double* TAU, double* C, const int ldc, double* WORK, const int lwork, int* info) const
00681   {
00682     DORMQR_F77(CHAR_MACRO(SIDE), CHAR_MACRO(TRANS), &m, &n, &k, A, &lda, TAU, C, &ldc, WORK, &lwork, info);
00683   }
00684 
00685   void LAPACK<int, double>::UNMQR(const char SIDE, const char TRANS, const int m, const int n, const int k, double* A, const int lda, const double* TAU, double* C, const int ldc, double* WORK, const int lwork, int* info) const
00686   {
00687     // LAPACK only defines UNMQR for Z and C (complex*8
00688     // resp. complex*16), but logically, UNMQR means the same thing as
00689     // ORMQR for real arithmetic.
00690     ORMQR (SIDE, TRANS, m, n, k, A, lda, TAU, C, ldc, WORK, lwork, info);
00691   }
00692 
00693   void LAPACK<int, double>::ORGQR(const int m, const int n, const int k, double* A, const int lda, const double* TAU, double* WORK, const int lwork, int* info) const
00694   {
00695     DORGQR_F77( &m, &n, &k, A, &lda, TAU, WORK, &lwork, info);
00696   }
00697 
00698 
00699   void LAPACK<int, double>::UNGQR(const int m, const int n, const int k, double* A, const int lda, const double* TAU, double* WORK, const int lwork, int* info) const
00700   {
00701     DORGQR_F77( &m, &n, &k, A, &lda, TAU, WORK, &lwork, info);
00702   }
00703 
00704 
00705   void LAPACK<int, double>::ORGHR(const int n, const int ilo, const int ihi, double* A, const int lda, const double* TAU, double* WORK, const int lwork, int* info) const
00706   {
00707     DORGHR_F77(&n, &ilo, &ihi, A, &lda, TAU, WORK, &lwork, info);
00708   }
00709 
00710 
00711   void LAPACK<int, double>::ORMHR(const char SIDE, const char TRANS, const int m, const int n, const int ilo, const int ihi, const double* A, const int lda, const double* TAU, double* C, const int ldc, double* WORK, const int lwork, int* info) const
00712   {
00713     DORMHR_F77(CHAR_MACRO(SIDE), CHAR_MACRO(TRANS), &m, &n, &ilo, &ihi, A, &lda, TAU, C, &ldc, WORK, &lwork, info);
00714   }
00715 
00716 
00717   void LAPACK<int, double>::TREVC(const char SIDE, const char HOWMNY, int* select, const int n, const double* T, const int ldt, double* VL, const int ldvl, double* VR, const int ldvr, const int mm, int* m, double* WORK, int* info) const
00718   {
00719     DTREVC_F77(CHAR_MACRO(SIDE), CHAR_MACRO(HOWMNY), select, &n, T, &ldt, VL, &ldvl, VR, &ldvr, &mm, m, WORK, info);
00720   }
00721 
00722 
00723   void LAPACK<int, double>::TREVC(const char SIDE, const int n, const double* T, const int ldt, double* VL, const int ldvl, double* VR, const int ldvr, const int mm, int* m, double* WORK, double* RWORK, int* info) const
00724   {
00725     std::vector<int> select(1);
00726     const char whch = 'A';
00727     DTREVC_F77(CHAR_MACRO(SIDE), CHAR_MACRO(whch), &select[0], &n, T, &ldt, VL, &ldvl, VR, &ldvr, &mm, m, WORK, info);
00728   }
00729 
00730 
00731   void LAPACK<int, double>::TREXC(const char COMPQ, const int n, double* T, const int ldt, double* Q, const int ldq, int ifst, int ilst, double* WORK, int* info) const
00732   {
00733     DTREXC_F77(CHAR_MACRO(COMPQ), &n, T, &ldt, Q, &ldq, &ifst, &ilst, WORK, info);
00734   }
00735 
00736 
00737   void LAPACK<int, double>::LARTG( const double f, const double g, double* c, double* s, double* r ) const
00738   {
00739     DLARTG_F77(&f, &g, c, s, r);
00740   }
00741 
00742 
00743   void LAPACK<int, double>::LARFG( const int n, double* alpha, double* x, const int incx, double* tau ) const
00744   {
00745     DLARFG_F77(&n, alpha, x, &incx, tau);
00746   }
00747 
00748 
00749   void LAPACK<int, double>::GEBAL(const char JOBZ, const int n, double* A, const int lda, int ilo, int ihi, double* scale, int* info) const
00750   {
00751     DGEBAL_F77(CHAR_MACRO(JOBZ),&n, A, &lda, &ilo, &ihi, scale, info);
00752   }
00753 
00754 
00755   void LAPACK<int, double>::GEBAK(const char JOBZ, const char SIDE, const int n, const int ilo, const int ihi, const double* scale, const int m, double* V, const int ldv, int* info) const
00756   {
00757     DGEBAK_F77(CHAR_MACRO(JOBZ), CHAR_MACRO(SIDE), &n, &ilo, &ihi, scale, &m, V, &ldv, info);
00758   }
00759 
00760 
00761 #ifdef HAVE_TEUCHOS_LAPACKLARND
00762   double LAPACK<int, double>::LARND( const int idist, int* seed ) const
00763   {
00764     return(DLARND_F77(&idist, seed));
00765   }
00766 #endif
00767 
00768   void LAPACK<int, double>::LARNV( const int idist, int* seed, const int n, double* v ) const
00769   {
00770     DLARNV_F77(&idist, seed, &n, v);
00771   }
00772 
00773 
00774   double LAPACK<int, double>::LAMCH(const char CMACH) const
00775   {
00776     return(DLAMCH_F77(CHAR_MACRO(CMACH)));
00777   }
00778 
00779 
00780   int LAPACK<int, double>::ILAENV( const int ispec, const std::string& NAME, const std::string& OPTS, const int N1, const int N2, const int N3, const int N4 ) const
00781   {
00782     unsigned int opts_length = OPTS.length();
00783     // if user queries a Hermitian routine, change it to a symmetric routine
00784     std::string temp_NAME = "d" + NAME;
00785     if (temp_NAME.substr(1,2) == "he") {
00786       temp_NAME.replace(1,2,"sy");
00787     }
00788     unsigned int name_length = temp_NAME.length();
00789 #if defined(INTEL_CXML)
00790     return ILAENV_F77(&ispec, &temp_NAME[0], name_length, &OPTS[0], opts_length, &N1, &N2, &N3, &N4 );
00791 #else
00792     return ::ILAENV_F77(&ispec, &temp_NAME[0], &OPTS[0], &N1, &N2, &N3, &N4, name_length, opts_length );
00793 #endif
00794   }
00795 
00796 
00797   double LAPACK<int, double>::LAPY2(const double x, const double y) const
00798   {
00799     return DLAPY2_F77(&x, &y);
00800   }
00801 
00802   // END INT, DOUBLE SPECIALIZATION IMPLEMENTATION //
00803 
00804 #ifdef HAVE_TEUCHOS_COMPLEX
00805 
00806   // BEGIN INT, COMPLEX<FLOAT> SPECIALIZATION IMPLEMENTATION //
00807 
00808 
00809   void LAPACK<int, std::complex<float> >::PTTRF(const int n, std::complex<float>* d, std::complex<float>* e, int* info) const
00810   {
00811     CPTTRF_F77(&n,d,e,info);
00812   }
00813 
00814 
00815   void LAPACK<int, std::complex<float> >::PTTRS(const int n, const int nrhs, const std::complex<float>* d, const std::complex<float>* e, std::complex<float>* B, const int ldb, int* info) const
00816   {
00817     CPTTRS_F77(&n,&nrhs,d,e,B,&ldb,info);
00818   }
00819 
00820 
00821   void LAPACK<int, std::complex<float> >::POTRF(const char UPLO, const int n, std::complex<float>* A, const int lda, int* info) const
00822   {
00823     CPOTRF_F77(CHAR_MACRO(UPLO), &n, A, &lda, info);
00824   }
00825 
00826 
00827   void LAPACK<int, std::complex<float> >::POTRS(const char UPLO, const int n, const int nrhs, const std::complex<float>* A, const int lda, std::complex<float>* B, const int ldb, int* info) const
00828   {
00829     CPOTRS_F77(CHAR_MACRO(UPLO), &n, &nrhs, A, &lda, B, &ldb, info);
00830   }
00831 
00832 
00833   void LAPACK<int, std::complex<float> >::POTRI(const char UPLO, const int n, std::complex<float>* A, const int lda, int* info) const
00834   {
00835     CPOTRI_F77(CHAR_MACRO(UPLO), &n, A, &lda, info);
00836   }
00837 
00838 
00839   void LAPACK<int, std::complex<float> >::POCON(const char UPLO, const int n, const std::complex<float>* A, const int lda, const float anorm, float* rcond, std::complex<float>* WORK, float* RWORK, int* info) const
00840   {
00841     CPOCON_F77(CHAR_MACRO(UPLO), &n, A, &lda, &anorm, rcond, WORK, RWORK, info);
00842   }
00843 
00844 
00845   void LAPACK<int, std::complex<float> >::POSV(const char UPLO, const int n, const int nrhs, std::complex<float>* A, const int lda, std::complex<float>* B, const int ldb, int* info) const
00846   {
00847     CPOSV_F77(CHAR_MACRO(UPLO), &n, &nrhs, A, &lda, B, &ldb, info);
00848   }
00849 
00850 
00851   void LAPACK<int, std::complex<float> >::POEQU(const int n, const std::complex<float>* A, const int lda, float* S, float* scond, float* amax, int* info) const
00852   {
00853     CPOEQU_F77(&n, A, &lda, S, scond, amax, info);
00854   }
00855 
00856 
00857   void LAPACK<int, std::complex<float> >::PORFS(const char UPLO, const int n, const int nrhs, std::complex<float>* A, const int lda, const std::complex<float>* AF, const int ldaf, const std::complex<float>* B, const int ldb, std::complex<float>* X, const int ldx, float* FERR, float* BERR, std::complex<float>* WORK, float* RWORK, int* info) const
00858   {
00859     CPORFS_F77(CHAR_MACRO(UPLO), &n, &nrhs, A, &lda, AF, &ldaf, B, &ldb, X, &ldx, FERR, BERR, WORK, RWORK, info);
00860   }
00861 
00862 
00863   void LAPACK<int, std::complex<float> >::POSVX(const char FACT, const char UPLO, const int n, const int nrhs, std::complex<float>* A, const int lda, std::complex<float>* AF, const int ldaf, char EQUED, float* S, std::complex<float>* B, const int ldb, std::complex<float>* X, const int ldx, float* rcond, float* FERR, float* BERR, std::complex<float>* WORK, float* RWORK, int* info) const
00864   {
00865     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);
00866   }
00867 
00868 
00869   void LAPACK<int,std::complex<float> >::GELS(const char TRANS, const int m, const int n, const int nrhs, std::complex<float>* A, const int lda, std::complex<float>* B, const int ldb, std::complex<float>* WORK, const int lwork, int* info) const
00870   {
00871     CGELS_F77(CHAR_MACRO(TRANS), &m, &n, &nrhs, A, &lda, B, &ldb, WORK, &lwork, info);
00872   }
00873 
00874 
00875   void LAPACK<int, std::complex<float> >::GELSS(const int m, const int n, const int nrhs, std::complex<float>* A, const int lda, std::complex<float>* B, const int ldb, float* S, const float rcond, int* rank, std::complex<float>* WORK, const int lwork, float* rwork, int* info) const
00876   {
00877     CGELSS_F77(&m, &n, &nrhs, A, &lda, B, &ldb, S, &rcond, rank, WORK, &lwork, rwork, info);
00878   }
00879 
00880 
00881   void LAPACK<int,std::complex<float> >::GEQRF( const int m, const int n, std::complex<float>* A, const int lda, std::complex<float>* TAU, std::complex<float>* WORK, const int lwork, int* info) const
00882   {
00883     CGEQRF_F77(&m, &n, A, &lda, TAU, WORK, &lwork, info);
00884   }
00885 
00886 
00887   void LAPACK<int,std::complex<float> >::UNGQR(const int m, const int n, const int k, std::complex<float>* A, const int lda, const std::complex<float>* TAU, std::complex<float>* WORK, const int lwork, int* info) const
00888   {
00889     CUNGQR_F77( &m, &n, &k, A, &lda, TAU, WORK, &lwork, info);
00890   }
00891 
00892 
00893   void LAPACK<int,std::complex<float> >::UNMQR(const char SIDE, const char TRANS, const int m, const int n, const int k, std::complex<float>* A, const int lda, const std::complex<float>* TAU, std::complex<float>* C, const int ldc, std::complex<float>* WORK, const int lwork, int* info) const
00894   {
00895     CUNMQR_F77(CHAR_MACRO(SIDE), CHAR_MACRO(TRANS), &m, &n, &k, A, &lda, TAU, C, &ldc, WORK, &lwork, info);
00896   }
00897 
00898 
00899   void LAPACK<int,std::complex<float> >::GETRF(const int m, const int n, std::complex<float>* A, const int lda, int* IPIV, int* info) const
00900   {
00901     CGETRF_F77(&m, &n, A, &lda, IPIV, info);
00902   }
00903 
00904 
00905   void LAPACK<int,std::complex<float> >::GETRS(const char TRANS, const int n, const int nrhs, const std::complex<float>* A, const int lda, const int* IPIV, std::complex<float>* B , const int ldb, int* info) const
00906   {
00907     CGETRS_F77(CHAR_MACRO(TRANS), &n, &nrhs, A, &lda, IPIV, B, &ldb, info);
00908   }
00909 
00910   void LAPACK<int, std::complex<float> >::
00911   LASWP (const int N,
00912          std::complex<float> A[],
00913          const int LDA,
00914          const int K1,
00915          const int K2,
00916          const int IPIV[],
00917          const int INCX) const
00918   {
00919     CLASWP_F77(&N, A, &LDA, &K1, &K2, IPIV, &INCX);
00920   }
00921 
00922   void LAPACK<int,std::complex<float> >::GBTRF(const int m, const int n, const int kl, const int ku, std::complex<float>* A, const int lda, int* IPIV, int* info) const
00923   {
00924     CGBTRF_F77(&m, &kl, &ku, &n, A, &lda, IPIV, info);
00925   }
00926 
00927 
00928   void LAPACK<int,std::complex<float> >::GBTRS(const char TRANS, const int n, const int kl, const int ku, const int nrhs, const std::complex<float>* A, const int lda, const int* IPIV, std::complex<float>* B , const int ldb, int* info) const
00929   {
00930     CGBTRS_F77(CHAR_MACRO(TRANS), &n, &kl, &ku, &nrhs, A, &lda, IPIV, B, &ldb, info);
00931   }
00932 
00933 
00934   void LAPACK<int,std::complex<float> >::GTTRF(const int n, std::complex<float>* dl, std::complex<float>* d, std::complex<float>* du, std::complex<float>* du2, int* IPIV, int* info) const
00935   {
00936     CGTTRF_F77(&n, dl, d, du, du2, IPIV, info);
00937   }
00938 
00939 
00940   void LAPACK<int,std::complex<float> >::GTTRS(const char TRANS, const int n, const int nrhs, const std::complex<float>* dl, const std::complex<float>* d, const std::complex<float>* du, const std::complex<float>* du2, const int* IPIV, std::complex<float>* B, const int ldb, int* info) const
00941   {
00942     CGTTRS_F77(CHAR_MACRO(TRANS), &n, &nrhs, dl, d, du, du2, IPIV, B, &ldb, info);
00943   }
00944 
00945 
00946   void LAPACK<int,std::complex<float> >::GETRI(const int n, std::complex<float>* A, const int lda, const int* IPIV, std::complex<float>* WORK, const int lwork, int* info) const
00947   {
00948     CGETRI_F77(&n, A, &lda, IPIV, WORK, &lwork, info);
00949   }
00950 
00951 
00952   void
00953   LAPACK<int, std::complex<float> >::LATRS (const char UPLO,
00954                                             const char TRANS,
00955                                             const char DIAG,
00956                                             const char NORMIN,
00957                                             const int N,
00958                                             std::complex<float>* A,
00959                                             const int LDA,
00960                                             std::complex<float>* X,
00961                                             float* SCALE,
00962                                             float* CNORM,
00963                                             int* INFO) const
00964   {
00965     CLATRS_F77(CHAR_MACRO(UPLO),
00966                CHAR_MACRO(TRANS),
00967                CHAR_MACRO(DIAG),
00968                CHAR_MACRO(NORMIN),
00969                &N,
00970                A,
00971                &LDA,
00972                X,
00973                SCALE,
00974                CNORM,
00975                INFO);
00976   }
00977 
00978 
00979   void LAPACK<int,std::complex<float> >::GECON(const char NORM, const int n, const std::complex<float>* A, const int lda, const float anorm, float* rcond, std::complex<float>* WORK, float* RWORK, int* info) const
00980   {
00981     CGECON_F77(CHAR_MACRO(NORM), &n, A, &lda, &anorm, rcond, WORK, RWORK, info);
00982   }
00983 
00984 
00985   void LAPACK<int,std::complex<float> >::GBCON(const char NORM, const int n, const int kl, const int ku, const std::complex<float>* A, const int lda, int* IPIV, const float anorm, float* rcond, std::complex<float>* WORK, float* RWORK, int* info) const
00986   {
00987     CGBCON_F77(CHAR_MACRO(NORM), &n, &kl, &ku, A, &lda, IPIV, &anorm, rcond, WORK, RWORK, info);
00988   }
00989 
00990 
00991   float LAPACK<int,std::complex<float> >::LANGB(const char NORM, const int n, const int kl, const int ku, const std::complex<float>* A, const int lda, float* WORK) const
00992   {
00993     return( CLANGB_F77(CHAR_MACRO(NORM), &n, &kl, &ku, A, &lda, WORK) );
00994   }
00995 
00996 
00997   void LAPACK<int,std::complex<float> >::GESV(const int n, const int nrhs, std::complex<float>* A, const int lda, int* IPIV, std::complex<float>* B, const int ldb, int* info) const
00998   {
00999     CGESV_F77(&n, &nrhs, A, &lda, IPIV, B, &ldb, info);
01000   }
01001 
01002 
01003   void LAPACK<int,std::complex<float> >::GEEQU(const int m, const int n, const std::complex<float>* A, const int lda, float* R, float* C, float* rowcond, float* colcond, float* amax, int* info) const
01004   {
01005     CGEEQU_F77(&m, &n, A, &lda, R, C, rowcond, colcond, amax, info);
01006   }
01007 
01008 
01009   void LAPACK<int,std::complex<float> >::GERFS(const char TRANS, const int n, const int nrhs, const std::complex<float>* A, const int lda, const std::complex<float>* AF, const int ldaf, const int* IPIV, const std::complex<float>* B, const int ldb, std::complex<float>* X, const int ldx, float* FERR, float* BERR, std::complex<float>* WORK, float* RWORK, int* info) const
01010   {
01011     CGERFS_F77(CHAR_MACRO(TRANS), &n, &nrhs, A, &lda, AF, &ldaf, IPIV, B, &ldb, X, &ldx, FERR, BERR, WORK, RWORK, info);
01012   }
01013 
01014 
01015   void LAPACK<int,std::complex<float> >::GBEQU(const int m, const int n, const int kl, const int ku, const std::complex<float>* A, const int lda, float* R, float* C, float* rowcond, float* colcond, float* amax, int* info) const
01016   {
01017     CGBEQU_F77(&m, &n, &kl, &ku, A, &lda, R, C, rowcond, colcond, amax, info);
01018   }
01019 
01020 
01021   void LAPACK<int,std::complex<float> >::GBRFS(const char TRANS, const int n, const int kl, const int ku, const int nrhs, const std::complex<float>* A, const int lda, const std::complex<float>* AF, const int ldaf, const int* IPIV, const std::complex<float>* B, const int ldb, std::complex<float>* X, const int ldx, float* FERR, float* BERR, std::complex<float>* WORK, float* RWORK, int* info) const
01022   {
01023     CGBRFS_F77(CHAR_MACRO(TRANS), &n, &kl, &ku, &nrhs, A, &lda, AF, &ldaf, IPIV, B, &ldb, X, &ldx, FERR, BERR, WORK, RWORK, info);
01024   }
01025 
01026 
01027   void LAPACK<int,std::complex<float> >::GESVX(const char FACT, const char TRANS, const int n, const int nrhs, std::complex<float>* A, const int lda, std::complex<float>* AF, const int ldaf, int* IPIV, char EQUED, float* R, float* C, std::complex<float>* B, const int ldb, std::complex<float>* X, const int ldx, float* rcond, float* FERR, float* BERR, std::complex<float>* WORK, float* RWORK, int* info) const
01028   {
01029     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);
01030   }
01031 
01032 
01033   void LAPACK<int,std::complex<float> >::GEHRD(const int n, const int ilo, const int ihi, std::complex<float>* A, const int lda, std::complex<float>* TAU, std::complex<float>* WORK, const int lwork, int* info) const
01034   {
01035     CGEHRD_F77(&n, &ilo, &ihi, A, &lda, TAU, WORK, &lwork, info);
01036   }
01037 
01038 
01039   void LAPACK<int,std::complex<float> >::TRTRS(const char UPLO, const char TRANS, const char DIAG, const int n, const int nrhs, const std::complex<float>* A, const int lda, std::complex<float>* B, const int ldb, int* info) const
01040   {
01041     CTRTRS_F77(CHAR_MACRO(UPLO), CHAR_MACRO(TRANS), CHAR_MACRO(DIAG), &n, &nrhs, A, &lda, B, &ldb, info);
01042   }
01043 
01044 
01045   void LAPACK<int,std::complex<float> >::TRTRI(const char UPLO, const char DIAG, const int n, const std::complex<float>* A, const int lda, int* info) const
01046   {
01047     CTRTRI_F77(CHAR_MACRO(UPLO), CHAR_MACRO(DIAG), &n, A, &lda, info);
01048   }
01049 
01050 
01051   void LAPACK<int,std::complex<float> >::STEQR(const char COMPZ, const int n, float* D, float* E, std::complex<float>* Z, const int ldz, float* WORK, int* info) const
01052   {
01053     CSTEQR_F77(CHAR_MACRO(COMPZ), &n, D, E, Z, &ldz, WORK, info);
01054   }
01055 
01056 
01057   void LAPACK<int,std::complex<float> >::HEEV(const char JOBZ, const char UPLO, const int n, std::complex<float> * A, const int lda, float * W, std::complex<float> * WORK, const int lwork, float* RWORK, int* info) const
01058   {
01059     CHEEV_F77(CHAR_MACRO(JOBZ), CHAR_MACRO(UPLO), &n, A, &lda, W, WORK, &lwork, RWORK, info);
01060   }
01061 
01062 
01063   void LAPACK<int,std::complex<float> >::HEGV(const int itype, const char JOBZ, const char UPLO, const int n, std::complex<float> * A, const int lda, std::complex<float> * B, const int ldb, float * W, std::complex<float> * WORK, const int lwork, float *RWORK, int* info) const
01064   {
01065     CHEGV_F77(&itype, CHAR_MACRO(JOBZ), CHAR_MACRO(UPLO), &n, A, &lda, B, &ldb, W, WORK, &lwork, RWORK, info);
01066   }
01067 
01068 
01069   void LAPACK<int, std::complex<float> >::HSEQR(const char JOB, const char COMPZ, const int n, const int ilo, const int ihi, std::complex<float>* H, const int ldh, std::complex<float>* W, std::complex<float>* Z, const int ldz, std::complex<float>* WORK, const int lwork, int* info) const
01070   {
01071     CHSEQR_F77(CHAR_MACRO(JOB), CHAR_MACRO(COMPZ), &n, &ilo, &ihi, H, &ldh, W, Z, &ldz, WORK, &lwork, info);
01072   }
01073 
01074 
01075   void LAPACK<int, std::complex<float> >::GEES(const char JOBVS, const char SORT, int (*ptr2func)(std::complex<float>*), const int n, std::complex<float>* A, const int lda, int* sdim, std::complex<float>* W, std::complex<float>* VS, const int ldvs, std::complex<float>* WORK, const int lwork, float* RWORK, int* BWORK, int* info) const
01076   {
01077     CGEES_F77(CHAR_MACRO(JOBVS), CHAR_MACRO(SORT), ptr2func, &n, A, &lda, sdim, W, VS, &ldvs, WORK, &lwork, RWORK, BWORK, info);
01078   }
01079 
01080 
01081   void LAPACK<int, std::complex<float> >::GEES(const char JOBVS, const int n, std::complex<float>* A, const int lda, int* sdim, float* WR, float* WI, std::complex<float>* VS, const int ldvs, std::complex<float>* WORK, const int lwork, float* RWORK, int* BWORK, int* info) const
01082   {
01083     int (*nullfptr)(std::complex<float>*) = NULL;
01084     std::vector< std::complex<float> > W(n);
01085     const char sort = 'N';
01086     CGEES_F77(CHAR_MACRO(JOBVS), CHAR_MACRO(sort), nullfptr, &n, A, &lda, sdim, &W[0], VS, &ldvs, WORK, &lwork, RWORK, BWORK, info);
01087     for (int i=0; i<n; i++) {
01088       WR[i] = W[i].real();
01089       WI[i] = W[i].imag();
01090     }
01091   }
01092 
01093 
01094   void LAPACK<int, std::complex<float> >::GEEV(const char JOBVL, const char JOBVR, const int n, std::complex<float>* A, const int lda, std::complex<float>* W, std::complex<float>* VL, const int ldvl, std::complex<float>* VR, const int ldvr, std::complex<float>* WORK, const int lwork, float* RWORK, int* info) const
01095   {
01096     CGEEV_F77(CHAR_MACRO(JOBVL), CHAR_MACRO(JOBVR), &n, A, &lda, W, VL, &ldvl, VR, &ldvr, WORK, &lwork, RWORK, info);
01097   }
01098 
01099 
01100   void LAPACK<int, std::complex<float> >::GESVD(const char JOBU, const char JOBVT, const int m, const int n, std::complex<float> * A, const int lda, float* S, std::complex<float> * U, const int ldu, std::complex<float> * V, const int ldv, std::complex<float> * WORK, const int lwork, float* RWORK, int* info) const {
01101     CGESVD_F77(CHAR_MACRO(JOBU), CHAR_MACRO(JOBVT), &m, &n, A, &lda, S, U, &ldu, V, &ldv, WORK, &lwork, RWORK, info);
01102   }
01103 
01104 /*
01105   void LAPACK<int, std::complex<float> >::GGEVX(const char BALANC, const char JOBVL, const char JOBVR, const char SENSE, const int n, std::complex<float>* A, const int lda, std::complex<float>* B, const int ldb, float* ALPHAR, float* ALPHAI, std::complex<float>* BETA, std::complex<float>* VL, const int ldvl, std::complex<float>* VR, const int ldvr, int* ilo, int* ihi, float* LSCALE, float* RSCALE, float* abnrm, float* bbnrm, float* RCONDE, float* RCONDV, std::complex<float>* WORK, const int lwork, int* IWORK, int* BWORK, int* info) const
01106   {
01107     std::vector< std::complex<float> > ALPHA(n);
01108     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);
01109     for (int i=0; i<n; i++) {
01110       ALPHAR[i] = ALPHA[i].real();
01111       ALPHAI[i] = ALPHA[i].imag();
01112     }
01113   }
01114 */
01115 
01116 
01117   void LAPACK<int, std::complex<float> >::TREVC(const char SIDE, const char HOWMNY, int* select, const int n, const std::complex<float>* T, const int ldt, std::complex<float>* VL, const int ldvl, std::complex<float>* VR, const int ldvr, const int mm, int* m, std::complex<float>* WORK, float* RWORK, int* info) const
01118   {
01119     CTREVC_F77(CHAR_MACRO(SIDE), CHAR_MACRO(HOWMNY), select, &n, T, &ldt, VL, &ldvl, VR, &ldvr, &mm, m, WORK, RWORK, info);
01120   }
01121 
01122 
01123   void LAPACK<int, std::complex<float> >::TREVC(const char SIDE, const int n, const std::complex<float>* T, const int ldt, std::complex<float>* VL, const int ldvl, std::complex<float>* VR, const int ldvr, const int mm, int* m, std::complex<float>* WORK, float* RWORK, int* info) const
01124   {
01125     std::vector<int> select(1);
01126     const char whch = 'A';
01127     CTREVC_F77(CHAR_MACRO(SIDE), CHAR_MACRO(whch), &select[0], &n, T, &ldt, VL, &ldvl, VR, &ldvr, &mm, m, WORK, RWORK, info);
01128   }
01129 
01130 
01131   void LAPACK<int, std::complex<float> >::TREXC(const char COMPQ, const int n, std::complex<float>* T, const int ldt, std::complex<float>* Q, const int ldq, int ifst, int ilst, std::complex<float>* WORK, int* info) const
01132   {
01133     CTREXC_F77(CHAR_MACRO(COMPQ), &n, T, &ldt, Q, &ldq, &ifst, &ilst, info);
01134   }
01135 
01136 
01137   void LAPACK<int, std::complex<float> >::LARTG( const std::complex<float> f, const std::complex<float> g, float* c, std::complex<float>* s, std::complex<float>* r ) const
01138   {
01139     CLARTG_F77(&f, &g, c, s, r);
01140   }
01141 
01142 
01143   void LAPACK<int, std::complex<float> >::LARFG( const int n, std::complex<float>* alpha, std::complex<float>* x, const int incx, std::complex<float>* tau ) const
01144   {
01145     CLARFG_F77(&n, alpha, x, &incx, tau);
01146   }
01147 
01148 
01149   void LAPACK<int, std::complex<float> >::GEBAL(const char JOBZ, const int n, std::complex<float>* A, const int lda, int ilo, int ihi, float* scale, int* info) const
01150   {
01151     CGEBAL_F77(CHAR_MACRO(JOBZ),&n, A, &lda, &ilo, &ihi, scale, info);
01152   }
01153 
01154 
01155   void LAPACK<int, std::complex<float> >::GEBAK(const char JOBZ, const char SIDE, const int n, const int ilo, const int ihi, const float* scale, const int m, std::complex<float>* V, const int ldv, int* info) const
01156   {
01157     CGEBAK_F77(CHAR_MACRO(JOBZ), CHAR_MACRO(SIDE), &n, &ilo, &ihi, scale, &m, V, &ldv, info);
01158   }
01159 
01160 
01161 #ifdef HAVE_TEUCHOS_LAPACKLARND
01162   std::complex<float> LAPACK<int, std::complex<float> >::LARND( const int idist, int* seed ) const
01163   {
01164     return(CLARND_F77(&idist, seed));
01165   }
01166 #endif
01167 
01168   void LAPACK<int, std::complex<float> >::LARNV( const int idist, int* seed, const int n, std::complex<float>* v ) const
01169   {
01170     CLARNV_F77(&idist, seed, &n, v);
01171   }
01172 
01173 
01174   int LAPACK<int, std::complex<float> >::ILAENV( const int ispec, const std::string& NAME, const std::string& OPTS, const int N1, const int N2, const int N3, const int N4 ) const
01175   {
01176     unsigned int opts_length = OPTS.length();
01177     std::string temp_NAME = "c" + NAME;
01178     unsigned int name_length = temp_NAME.length();
01179 #if defined (INTEL_CXML)
01180     return ILAENV_F77(&ispec, &temp_NAME[0], name_length, &OPTS[0], opts_length, &N1, &N2, &N3, &N4 );
01181 #else
01182     return ILAENV_F77(&ispec, &temp_NAME[0], &OPTS[0], &N1, &N2, &N3, &N4, name_length, opts_length );
01183 #endif
01184   }
01185 
01186   // END INT, COMPLEX<FLOAT> SPECIALIZATION IMPLEMENTATION //
01187 
01188   // BEGIN INT, COMPLEX<DOUBLE> SPECIALIZATION IMPLEMENTATION //
01189 
01190 
01191   void LAPACK<int, std::complex<double> >::PTTRF(const int n, std::complex<double>* d, std::complex<double>* e, int* info) const
01192   {
01193     ZPTTRF_F77(&n,d,e,info);
01194   }
01195 
01196 
01197   void LAPACK<int, std::complex<double> >::PTTRS(const int n, const int nrhs, const std::complex<double>* d, const std::complex<double>* e, std::complex<double>* B, const int ldb, int* info) const
01198   {
01199     ZPTTRS_F77(&n,&nrhs,d,e,B,&ldb,info);
01200   }
01201 
01202 
01203   void LAPACK<int, std::complex<double> >::POTRF(const char UPLO, const int n, std::complex<double>* A, const int lda, int* info) const
01204   {
01205     ZPOTRF_F77(CHAR_MACRO(UPLO), &n, A, &lda, info);
01206   }
01207 
01208 
01209   void LAPACK<int, std::complex<double> >::POTRS(const char UPLO, const int n, const int nrhs, const std::complex<double>* A, const int lda, std::complex<double>* B, const int ldb, int* info) const
01210   {
01211     ZPOTRS_F77(CHAR_MACRO(UPLO), &n, &nrhs, A, &lda, B, &ldb, info);
01212   }
01213 
01214 
01215   void LAPACK<int, std::complex<double> >::POTRI(const char UPLO, const int n, std::complex<double>* A, const int lda, int* info) const
01216   {
01217     ZPOTRI_F77(CHAR_MACRO(UPLO), &n, A, &lda, info);
01218   }
01219 
01220 
01221   void LAPACK<int, std::complex<double> >::POCON(const char UPLO, const int n, const std::complex<double>* A, const int lda, const double anorm, double* rcond, std::complex<double>* WORK, double* RWORK, int* info) const
01222   {
01223     ZPOCON_F77(CHAR_MACRO(UPLO), &n, A, &lda, &anorm, rcond, WORK, RWORK, info);
01224   }
01225 
01226 
01227   void LAPACK<int, std::complex<double> >::POSV(const char UPLO, const int n, const int nrhs, std::complex<double>* A, const int lda, std::complex<double>* B, const int ldb, int* info) const
01228   {
01229     ZPOSV_F77(CHAR_MACRO(UPLO), &n, &nrhs, A, &lda, B, &ldb, info);
01230   }
01231 
01232 
01233   void LAPACK<int, std::complex<double> >::POEQU(const int n, const std::complex<double>* A, const int lda, double* S, double* scond, double* amax, int* info) const
01234   {
01235     ZPOEQU_F77(&n, A, &lda, S, scond, amax, info);
01236   }
01237 
01238 
01239   void LAPACK<int, std::complex<double> >::PORFS(const char UPLO, const int n, const int nrhs, std::complex<double>* A, const int lda, const std::complex<double>* AF, const int ldaf, const std::complex<double>* B, const int ldb, std::complex<double>* X, const int ldx, double* FERR, double* BERR, std::complex<double>* WORK, double* RWORK, int* info) const
01240   {
01241     ZPORFS_F77(CHAR_MACRO(UPLO), &n, &nrhs, A, &lda, AF, &ldaf, B, &ldb, X, &ldx, FERR, BERR, WORK, RWORK, info);
01242   }
01243 
01244 
01245   void LAPACK<int, std::complex<double> >::POSVX(const char FACT, const char UPLO, const int n, const int nrhs, std::complex<double>* A, const int lda, std::complex<double>* AF, const int ldaf, char EQUED, double* S, std::complex<double>* B, const int ldb, std::complex<double>* X, const int ldx, double* rcond, double* FERR, double* BERR, std::complex<double>* WORK, double* RWORK, int* info) const
01246   {
01247     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);
01248   }
01249 
01250 
01251   void LAPACK<int,std::complex<double> >::GELS(const char TRANS, const int m, const int n, const int nrhs, std::complex<double>* A, const int lda, std::complex<double>* B, const int ldb, std::complex<double>* WORK, const int lwork, int* info) const
01252   {
01253     ZGELS_F77(CHAR_MACRO(TRANS), &m, &n, &nrhs, A, &lda, B, &ldb, WORK, &lwork, info);
01254   }
01255 
01256 
01257   void LAPACK<int, std::complex<double> >::GELSS(const int m, const int n, const int nrhs, std::complex<double>* A, const int lda, std::complex<double>* B, const int ldb, double* S, const double rcond, int* rank, std::complex<double>* WORK, const int lwork, double* rwork, int* info) const
01258   {
01259     ZGELSS_F77(&m, &n, &nrhs, A, &lda, B, &ldb, S, &rcond, rank, WORK, &lwork, rwork, info);
01260   }
01261 
01262 
01263   void LAPACK<int,std::complex<double> >::GEQRF( const int m, const int n, std::complex<double>* A, const int lda, std::complex<double>* TAU, std::complex<double>* WORK, const int lwork, int* info) const
01264   {
01265     ZGEQRF_F77(&m, &n, A, &lda, TAU, WORK, &lwork, info);
01266   }
01267 
01268 
01269   void LAPACK<int,std::complex<double> >::UNGQR(const int m, const int n, const int k, std::complex<double>* A, const int lda, const std::complex<double>* TAU, std::complex<double>* WORK, const int lwork, int* info) const
01270   {
01271     ZUNGQR_F77( &m, &n, &k, A, &lda, TAU, WORK, &lwork, info);
01272   }
01273 
01274 
01275   void LAPACK<int,std::complex<double> >::UNMQR(const char SIDE, const char TRANS, const int m, const int n, const int k, std::complex<double>* A, const int lda, const std::complex<double>* TAU, std::complex<double>* C, const int ldc, std::complex<double>* WORK, const int lwork, int* info) const
01276   {
01277     ZUNMQR_F77(CHAR_MACRO(SIDE), CHAR_MACRO(TRANS), &m, &n, &k, A, &lda, TAU, C, &ldc, WORK, &lwork, info);
01278   }
01279 
01280 
01281   void LAPACK<int,std::complex<double> >::GETRF(const int m, const int n, std::complex<double>* A, const int lda, int* IPIV, int* info) const
01282   {
01283     ZGETRF_F77(&m, &n, A, &lda, IPIV, info);
01284   }
01285 
01286 
01287   void LAPACK<int,std::complex<double> >::GETRS(const char TRANS, const int n, const int nrhs, const std::complex<double>* A, const int lda, const int* IPIV, std::complex<double>* B, const int ldb, int* info) const
01288   {
01289     ZGETRS_F77(CHAR_MACRO(TRANS), &n, &nrhs, A, &lda, IPIV, B, &ldb, info);
01290   }
01291 
01292   void LAPACK<int, std::complex<double> >::
01293   LASWP (const int N,
01294          std::complex<double> A[],
01295          const int LDA,
01296          const int K1,
01297          const int K2,
01298          const int IPIV[],
01299          const int INCX) const
01300   {
01301     ZLASWP_F77(&N, A, &LDA, &K1, &K2, IPIV, &INCX);
01302   }
01303 
01304   void LAPACK<int,std::complex<double> >::GBTRF(const int m, const int n, const int kl, const int ku, std::complex<double>* A, const int lda, int* IPIV, int* info) const
01305   {
01306     ZGBTRF_F77(&m, &n, &kl, &ku, A, &lda, IPIV, info);
01307   }
01308 
01309 
01310   void LAPACK<int,std::complex<double> >::GBTRS(const char TRANS, const int n, const int kl, const int ku, const int nrhs, const std::complex<double>* A, const int lda, const int* IPIV, std::complex<double>* B, const int ldb, int* info) const
01311   {
01312     ZGBTRS_F77(CHAR_MACRO(TRANS), &n, &kl, &ku, &nrhs, A, &lda, IPIV, B, &ldb, info);
01313   }
01314 
01315 
01316   void LAPACK<int,std::complex<double> >::GTTRF(const int n, std::complex<double>* dl, std::complex<double>* d, std::complex<double>* du, std::complex<double>* du2, int* IPIV, int* info) const
01317   {
01318     ZGTTRF_F77(&n, dl, d, du, du2, IPIV, info);
01319   }
01320 
01321 
01322   void LAPACK<int,std::complex<double> >::GTTRS(const char TRANS, const int n, const int nrhs, const std::complex<double>* dl, const std::complex<double>* d, const std::complex<double>* du, const std::complex<double>* du2, const int* IPIV, std::complex<double>* B, const int ldb, int* info) const
01323   {
01324     ZGTTRS_F77(CHAR_MACRO(TRANS), &n, &nrhs, dl, d, du, du2, IPIV, B, &ldb, info);
01325   }
01326 
01327 
01328   void LAPACK<int,std::complex<double> >::GETRI(const int n, std::complex<double>* A, const int lda, const int* IPIV, std::complex<double>* WORK, const int lwork, int* info) const
01329   {
01330     ZGETRI_F77(&n, A, &lda, IPIV, WORK, &lwork, info);
01331   }
01332 
01333   void
01334   LAPACK<int, std::complex<double> >::LATRS (const char UPLO,
01335                                              const char TRANS,
01336                                              const char DIAG,
01337                                              const char NORMIN,
01338                                              const int N,
01339                                              std::complex<double>* A,
01340                                              const int LDA,
01341                                              std::complex<double>* X,
01342                                              double* SCALE,
01343                                              double* CNORM,
01344                                              int* INFO) const
01345   {
01346     ZLATRS_F77(CHAR_MACRO(UPLO),
01347                CHAR_MACRO(TRANS),
01348                CHAR_MACRO(DIAG),
01349                CHAR_MACRO(NORMIN),
01350                &N,
01351                A,
01352                &LDA,
01353                X,
01354                SCALE,
01355                CNORM,
01356                INFO);
01357   }
01358 
01359   void LAPACK<int,std::complex<double> >::GECON(const char NORM, const int n, const std::complex<double>* A, const int lda, const double anorm, double* rcond, std::complex<double>* WORK, double* RWORK, int* info) const
01360   {
01361     ZGECON_F77(CHAR_MACRO(NORM), &n, A, &lda, &anorm, rcond, WORK, RWORK, info);
01362   }
01363 
01364 
01365   void LAPACK<int,std::complex<double> >::GBCON(const char NORM, const int n, const int kl, const int ku, const std::complex<double>* A, const int lda, int* IPIV, const double anorm, double* rcond, std::complex<double>* WORK, double* RWORK, int* info) const
01366   {
01367     ZGBCON_F77(CHAR_MACRO(NORM), &n, &kl, &ku, A, &lda, IPIV, &anorm, rcond, WORK, RWORK, info);
01368   }
01369 
01370 
01371   double LAPACK<int,std::complex<double> >::LANGB(const char NORM, const int n, const int kl, const int ku, const std::complex<double>* A, const int lda, double* WORK) const
01372   {
01373     return( ZLANGB_F77(CHAR_MACRO(NORM), &n, &kl, &ku, A, &lda, WORK) );
01374   }
01375 
01376 
01377   void LAPACK<int,std::complex<double> >::GESV(const int n, const int nrhs, std::complex<double>* A, const int lda, int* IPIV, std::complex<double>* B, const int ldb, int* info) const
01378   {
01379     ZGESV_F77(&n, &nrhs, A, &lda, IPIV, B, &ldb, info);
01380   }
01381 
01382 
01383   void LAPACK<int,std::complex<double> >::GEEQU(const int m, const int n, const std::complex<double>* A, const int lda, double* R, double* C, double* rowcond, double* colcond, double* amax, int* info) const
01384   {
01385     ZGEEQU_F77(&m, &n, A, &lda, R, C, rowcond, colcond, amax, info);
01386   }
01387 
01388 
01389   void LAPACK<int,std::complex<double> >::GERFS(const char TRANS, const int n, const int nrhs, const std::complex<double>* A, const int lda, const std::complex<double>* AF, const int ldaf, const int* IPIV, const std::complex<double>* B, const int ldb, std::complex<double>* X, const int ldx, double* FERR, double* BERR, std::complex<double>* WORK, double* RWORK, int* info) const
01390   {
01391     ZGERFS_F77(CHAR_MACRO(TRANS), &n, &nrhs, A, &lda, AF, &ldaf, IPIV, B, &ldb, X, &ldx, FERR, BERR, WORK, RWORK, info);
01392   }
01393 
01394 
01395   void LAPACK<int,std::complex<double> >::GBEQU(const int m, const int n, const int kl, const int ku, const std::complex<double>* A, const int lda, double* R, double* C, double* rowcond, double* colcond, double* amax, int* info) const
01396   {
01397     ZGBEQU_F77(&m, &n, &kl, &ku, A, &lda, R, C, rowcond, colcond, amax, info);
01398   }
01399 
01400 
01401   void LAPACK<int,std::complex<double> >::GBRFS(const char TRANS, const int n, const int kl, const int ku, const int nrhs, const std::complex<double>* A, const int lda, const std::complex<double>* AF, const int ldaf, const int* IPIV, const std::complex<double>* B, const int ldb, std::complex<double>* X, const int ldx, double* FERR, double* BERR, std::complex<double>* WORK, double* RWORK, int* info) const
01402   {
01403     ZGBRFS_F77(CHAR_MACRO(TRANS), &n, &kl, &ku, &nrhs, A, &lda, AF, &ldaf, IPIV, B, &ldb, X, &ldx, FERR, BERR, WORK, RWORK, info);
01404   }
01405 
01406 
01407   void LAPACK<int,std::complex<double> >::GESVX(const char FACT, const char TRANS, const int n, const int nrhs, std::complex<double>* A, const int lda, std::complex<double>* AF, const int ldaf, int* IPIV, char EQUED, double* R, double* C, std::complex<double>* B, const int ldb, std::complex<double>* X, const int ldx, double* rcond, double* FERR, double* BERR, std::complex<double>* WORK, double* RWORK, int* info) const
01408   {
01409     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);
01410   }
01411 
01412 
01413   void LAPACK<int,std::complex<double> >::GEHRD(const int n, const int ilo, const int ihi, std::complex<double>* A, const int lda, std::complex<double>* TAU, std::complex<double>* WORK, const int lwork, int* info) const
01414   {
01415     ZGEHRD_F77(&n, &ilo, &ihi, A, &lda, TAU, WORK, &lwork, info);
01416   }
01417 
01418 
01419   void LAPACK<int,std::complex<double> >::TRTRS(const char UPLO, const char TRANS, const char DIAG, const int n, const int nrhs, const std::complex<double>* A, const int lda, std::complex<double>* B, const int ldb, int* info) const
01420   {
01421     ZTRTRS_F77(CHAR_MACRO(UPLO), CHAR_MACRO(TRANS), CHAR_MACRO(DIAG), &n, &nrhs, A, &lda, B, &ldb, info);
01422   }
01423 
01424 
01425   void LAPACK<int,std::complex<double> >::TRTRI(const char UPLO, const char DIAG, const int n, const std::complex<double>* A, const int lda, int* info) const
01426   {
01427     ZTRTRI_F77(CHAR_MACRO(UPLO), CHAR_MACRO(DIAG), &n, A, &lda, info);
01428   }
01429 
01430 
01431   void LAPACK<int,std::complex<double> >::STEQR(const char COMPZ, const int n, double* D, double* E, std::complex<double>* Z, const int ldz, double* WORK, int* info) const
01432   {
01433     ZSTEQR_F77(CHAR_MACRO(COMPZ), &n, D, E, Z, &ldz, WORK, info);
01434   }
01435 
01436 
01437   void LAPACK<int,std::complex<double> >::HEEV(const char JOBZ, const char UPLO, const int n, std::complex<double> * A, const int lda, double * W, std::complex<double> * WORK, const int lwork, double* RWORK, int* info) const
01438   {
01439     ZHEEV_F77(CHAR_MACRO(JOBZ), CHAR_MACRO(UPLO), &n, A, &lda, W, WORK, &lwork, RWORK, info);
01440   }
01441 
01442 
01443   void LAPACK<int,std::complex<double> >::HEGV(const int itype, const char JOBZ, const char UPLO, const int n, std::complex<double> * A, const int lda, std::complex<double> * B, const int ldb, double * W, std::complex<double> * WORK, const int lwork, double *RWORK, int* info) const
01444   {
01445     ZHEGV_F77(&itype, CHAR_MACRO(JOBZ), CHAR_MACRO(UPLO), &n, A, &lda, B, &ldb, W, WORK, &lwork, RWORK, info);
01446   }
01447 
01448 
01449   void LAPACK<int, std::complex<double> >::HSEQR(const char JOB, const char COMPZ, const int n, const int ilo, const int ihi, std::complex<double>* H, const int ldh, std::complex<double>* W, std::complex<double>* Z, const int ldz, std::complex<double>* WORK, const int lwork, int* info) const
01450   {
01451     ZHSEQR_F77(CHAR_MACRO(JOB), CHAR_MACRO(COMPZ), &n, &ilo, &ihi, H, &ldh, W, Z, &ldz, WORK, &lwork, info);
01452   }
01453 
01454 
01455   void LAPACK<int, std::complex<double> >::GEES(const char JOBVS, const char SORT, int (*ptr2func)(std::complex<double>*), const int n, std::complex<double>* A, const int lda, int* sdim, std::complex<double>* W, std::complex<double>* VS, const int ldvs, std::complex<double>* WORK, const int lwork, double* RWORK, int* BWORK, int* info) const
01456   {
01457     ZGEES_F77(CHAR_MACRO(JOBVS), CHAR_MACRO(SORT), ptr2func, &n, A, &lda, sdim, W, VS, &ldvs, WORK, &lwork, RWORK, BWORK, info);
01458   }
01459 
01460 
01461   void LAPACK<int, std::complex<double> >::GEES(const char JOBVS, const int n, std::complex<double>* A, const int lda, int* sdim, double* WR, double* WI, std::complex<double>* VS, const int ldvs, std::complex<double>* WORK, const int lwork, double* RWORK, int* BWORK, int* info) const
01462   {
01463     int (*nullfptr)(std::complex<double>*) = NULL;
01464     std::vector< std::complex<double> > W(n);
01465     const char sort = 'N';
01466     ZGEES_F77(CHAR_MACRO(JOBVS), CHAR_MACRO(sort), nullfptr, &n, A, &lda, sdim, &W[0], VS, &ldvs, WORK, &lwork, RWORK, BWORK, info);
01467     for (int i=0; i<n; i++) {
01468       WR[i] = W[i].real();
01469       WI[i] = W[i].imag();
01470     }
01471   }
01472 
01473 
01474   void LAPACK<int, std::complex<double> >::GEEV(const char JOBVL, const char JOBVR, const int n, std::complex<double>* A, const int lda, std::complex<double>* W, std::complex<double>* VL, const int ldvl, std::complex<double>* VR, const int ldvr, std::complex<double>* WORK, const int lwork, double* RWORK, int* info) const
01475   {
01476     ZGEEV_F77(CHAR_MACRO(JOBVL), CHAR_MACRO(JOBVR), &n, A, &lda, W, VL, &ldvl, VR, &ldvr, WORK, &lwork, RWORK, info);
01477   }
01478 
01479 
01480   void LAPACK<int, std::complex<double> >::GESVD(const char JOBU, const char JOBVT, const int m, const int n, std::complex<double> * A, const int lda, double* S, std::complex<double> * U, const int ldu, std::complex<double> * V, const int ldv, std::complex<double> * WORK, const int lwork, double* RWORK, int* info) const {
01481     ZGESVD_F77(CHAR_MACRO(JOBU), CHAR_MACRO(JOBVT), &m, &n, A, &lda, S, U, &ldu, V, &ldv, WORK, &lwork, RWORK, info);
01482   }
01483 
01484 /*
01485   void LAPACK<int, std::complex<double> >::GGEVX(const char BALANC, const char JOBVL, const char JOBVR, const char SENSE, const int n, std::complex<double>* A, const int lda, std::complex<double>* B, const int ldb, double* ALPHAR, double* ALPHAI, std::complex<double>* BETA, std::complex<double>* VL, const int ldvl, std::complex<double>* VR, const int ldvr, int* ilo, int* ihi, double* LSCALE, double* RSCALE, double* abnrm, double* bbnrm, double* RCONDE, double* RCONDV, std::complex<double>* WORK, const int lwork, int* IWORK, int* BWORK, int* info) const
01486   {
01487     std::vector< std::complex<double> > ALPHA(n);
01488     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);
01489     for (int i=0; i<n; i++) {
01490       ALPHAR[i] = ALPHA[i].real();
01491       ALPHAI[i] = ALPHA[i].imag();
01492     }
01493   }
01494 */
01495 
01496 
01497   void LAPACK<int, std::complex<double> >::TREVC(const char SIDE, const char HOWMNY, int* select, const int n, const std::complex<double>* T, const int ldt, std::complex<double>* VL, const int ldvl, std::complex<double>* VR, const int ldvr, const int mm, int* m, std::complex<double>* WORK, double* RWORK, int* info) const
01498   {
01499     ZTREVC_F77(CHAR_MACRO(SIDE), CHAR_MACRO(HOWMNY), select, &n, T, &ldt, VL, &ldvl, VR, &ldvr, &mm, m, WORK, RWORK, info);
01500   }
01501 
01502 
01503   void LAPACK<int, std::complex<double> >::TREVC(const char SIDE, const int n, const std::complex<double>* T, const int ldt, std::complex<double>* VL, const int ldvl, std::complex<double>* VR, const int ldvr, const int mm, int* m, std::complex<double>* WORK, double* RWORK, int* info) const
01504   {
01505     std::vector<int> select(1);
01506     const char whch = 'A';
01507     ZTREVC_F77(CHAR_MACRO(SIDE), CHAR_MACRO(whch), &select[0], &n, T, &ldt, VL, &ldvl, VR, &ldvr, &mm, m, WORK, RWORK, info);
01508   }
01509 
01510 
01511   void LAPACK<int, std::complex<double> >::TREXC(const char COMPQ, const int n, std::complex<double>* T, const int ldt, std::complex<double>* Q, const int ldq, int ifst, int ilst, std::complex<double>* WORK, int* info) const
01512   {
01513     ZTREXC_F77(CHAR_MACRO(COMPQ), &n, T, &ldt, Q, &ldq, &ifst, &ilst, info);
01514   }
01515 
01516 
01517   void LAPACK<int, std::complex<double> >::LARTG( const std::complex<double> f, const std::complex<double> g, double* c, std::complex<double>* s, std::complex<double>* r ) const
01518   {
01519     ZLARTG_F77(&f, &g, c, s, r);
01520   }
01521 
01522 
01523   void LAPACK<int, std::complex<double> >::LARFG( const int n, std::complex<double>* alpha, std::complex<double>* x, const int incx, std::complex<double>* tau ) const
01524   {
01525     ZLARFG_F77(&n, alpha, x, &incx, tau);
01526   }
01527 
01528 
01529   void LAPACK<int, std::complex<double> >::GEBAL(const char JOBZ, const int n, std::complex<double>* A, const int lda, int ilo, int ihi, double* scale, int* info) const
01530   {
01531     ZGEBAL_F77(CHAR_MACRO(JOBZ),&n, A, &lda, &ilo, &ihi, scale, info);
01532   }
01533 
01534 
01535   void LAPACK<int, std::complex<double> >::GEBAK(const char JOBZ, const char SIDE, const int n, const int ilo, const int ihi, const double* scale, const int m, std::complex<double>* V, const int ldv, int* info) const
01536   {
01537     ZGEBAK_F77(CHAR_MACRO(JOBZ), CHAR_MACRO(SIDE), &n, &ilo, &ihi, scale, &m, V, &ldv, info);
01538   }
01539 
01540 
01541 #ifdef HAVE_TEUCHOS_LAPACKLARND
01542   std::complex<double> LAPACK<int, std::complex<double> >::LARND( const int idist, int* seed ) const
01543   {
01544     return(ZLARND_F77(&idist, seed));
01545   }
01546 #endif
01547 
01548   void LAPACK<int, std::complex<double> >::LARNV( const int idist, int* seed, const int n, std::complex<double>* v ) const
01549   {
01550     ZLARNV_F77(&idist, seed, &n, v);
01551   }
01552 
01553 
01554   int LAPACK<int, std::complex<double> >::ILAENV( const int ispec, const std::string& NAME, const std::string& OPTS, const int N1, const int N2, const int N3, const int N4 ) const
01555   {
01556     unsigned int opts_length = OPTS.length();
01557     std::string temp_NAME = "z" + NAME;
01558     unsigned int name_length = temp_NAME.length();
01559 #if defined (INTEL_CXML)
01560     return ILAENV_F77(&ispec, &temp_NAME[0], name_length, &OPTS[0], opts_length, &N1, &N2, &N3, &N4 );
01561 #else
01562     return ::ILAENV_F77(&ispec, &temp_NAME[0], &OPTS[0], &N1, &N2, &N3, &N4, name_length, opts_length );
01563 #endif
01564   }
01565 
01566   // END INT, COMPLEX<DOUBLE> SPECIALIZATION IMPLEMENTATION //
01567 
01568 #endif // HAVE_TEUCHOS_COMPLEX
01569 
01570 } // namespace Teuchos
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines