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