Epetra_LAPACK.cpp

Go to the documentation of this file.
00001 
00002 //@HEADER
00003 // ************************************************************************
00004 // 
00005 //               Epetra: Linear Algebra Services Package 
00006 //                 Copyright (2001) Sandia Corporation
00007 // 
00008 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
00009 // license for use of this work by or on behalf of the U.S. Government.
00010 // 
00011 // This library is free software; you can redistribute it and/or modify
00012 // it under the terms of the GNU Lesser General Public License as
00013 // published by the Free Software Foundation; either version 2.1 of the
00014 // License, or (at your option) any later version.
00015 //  
00016 // This library is distributed in the hope that it will be useful, but
00017 // WITHOUT ANY WARRANTY; without even the implied warranty of
00018 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00019 // Lesser General Public License for more details.
00020 //  
00021 // You should have received a copy of the GNU Lesser General Public
00022 // License along with this library; if not, write to the Free Software
00023 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00024 // USA
00025 // Questions? Contact Michael A. Heroux (maherou@sandia.gov) 
00026 // 
00027 // ************************************************************************
00028 //@HEADER
00029 
00030 #ifdef CHAR_MACRO
00031 #undef CHAR_MACRO
00032 #endif
00033 #if defined (INTEL_CXML)
00034 #define CHAR_MACRO(char_var) &char_var, 1
00035 #else
00036 #define CHAR_MACRO(char_var) &char_var
00037 #endif
00038 
00039 #include "Epetra_LAPACK.h"
00040 #include "Epetra_LAPACK_wrappers.h"
00041 
00042 
00043 // Symmetric positive definite linear systems
00044 
00045 //=============================================================================
00046 void Epetra_LAPACK::POTRF( const char UPLO, const int N, float * A, const int LDA, int * INFO) const {
00047   SPOTRF_F77(CHAR_MACRO(UPLO), &N, A, &LDA, INFO);
00048 }
00049 //=============================================================================
00050 void Epetra_LAPACK::POTRF( const char UPLO, const int N, double * A, const int LDA, int * INFO) const {
00051   DPOTRF_F77(CHAR_MACRO(UPLO), &N, A, &LDA, INFO);
00052 }
00053 //=============================================================================
00054 void Epetra_LAPACK::POTRS( const char UPLO, const int N, const int NRHS, const float * A, const int LDA, 
00055         float * X, const int LDX, int * INFO) const {
00056   SPOTRS_F77(CHAR_MACRO(UPLO), &N, &NRHS, A, &LDA, X, &LDX, INFO);
00057 }
00058 //=============================================================================
00059 void Epetra_LAPACK::POTRS( const char UPLO, const int N, const int NRHS, const double * A, const int LDA, 
00060         double * X, const int LDX, int * INFO) const {
00061   DPOTRS_F77(CHAR_MACRO(UPLO), &N, &NRHS, A, &LDA, X, &LDX, INFO);
00062 }
00063 //=============================================================================
00064 void Epetra_LAPACK::POTRI( const char UPLO, const int N, float * A, const int LDA, int * INFO) const {
00065   SPOTRI_F77(CHAR_MACRO(UPLO), &N, A, &LDA, INFO);
00066 }
00067 //=============================================================================
00068 void Epetra_LAPACK::POTRI( const char UPLO, const int N, double * A, const int LDA, int * INFO) const {
00069   DPOTRI_F77(CHAR_MACRO(UPLO), &N, A, &LDA, INFO);
00070 }
00071 //=============================================================================
00072 void Epetra_LAPACK::POCON( const char UPLO, const int N, const float * A, const int LDA, const float ANORM, 
00073         float * RCOND, float * WORK, int * IWORK, 
00074         int * INFO) const {
00075   SPOCON_F77(CHAR_MACRO(UPLO), &N, A, &LDA, &ANORM, RCOND, WORK, IWORK, INFO);
00076 }
00077 //=============================================================================
00078 void Epetra_LAPACK::POCON( const char UPLO, const int N, const double * A, const int LDA, const double ANORM, 
00079         double * RCOND, double * WORK, int * IWORK, 
00080         int * INFO) const {
00081   DPOCON_F77(CHAR_MACRO(UPLO), &N, A, &LDA, &ANORM, RCOND, WORK, IWORK, INFO);
00082 }
00083 //=============================================================================
00084 void Epetra_LAPACK::POSV( const char UPLO, const int N, const int NRHS, float * A, const int LDA, 
00085         float * X, const int LDX, int * INFO) const {
00086   SPOSV_F77(CHAR_MACRO(UPLO), &N, &NRHS, A, &LDA, X, &LDX, INFO);
00087 }
00088 //=============================================================================
00089 void Epetra_LAPACK::POSV( const char UPLO, const int N, const int NRHS, double * A, const int LDA, 
00090         double * X, const int LDX, int * INFO) const {
00091   DPOSV_F77(CHAR_MACRO(UPLO), &N, &NRHS, A, &LDA, X, &LDX, INFO);
00092 }
00093 //=============================================================================
00094 void Epetra_LAPACK::POEQU(const int N, const float * A, const int LDA, float * S, float * SCOND, 
00095        float * AMAX, int * INFO) const {
00096   SPOEQU_F77(&N, A, &LDA, S, SCOND, AMAX, INFO);
00097 }
00098 //=============================================================================
00099 void Epetra_LAPACK::POEQU(const int N, const double * A, const int LDA, double * S, double * SCOND,
00100       double * AMAX, int * INFO) const {     
00101   DPOEQU_F77(&N, A, &LDA, S, SCOND, AMAX, INFO);
00102 }
00103 //=============================================================================
00104 void Epetra_LAPACK::PORFS(const char UPLO, const int N, const int NRHS, const float * A, const int LDA, const float * AF, const int LDAF, 
00105        const float * B, const int LDB, float * X, const int LDX,
00106        float * FERR, float * BERR, float * WORK, int * IWORK, int * INFO) const {
00107   SPORFS_F77(CHAR_MACRO(UPLO), &N, &NRHS, A, &LDA, AF, &LDAF, B, &LDB, X, &LDX,
00108     FERR, BERR, WORK, IWORK, INFO);
00109 }
00110 //=============================================================================
00111 void Epetra_LAPACK::PORFS(const char UPLO, const int N, const int NRHS, const double * A, const int LDA, const double * AF, const int LDAF, 
00112        const double * B, const int LDB, double * X, const int LDX,
00113        double * FERR, double * BERR, double * WORK, int * IWORK, int * INFO) const {
00114   DPORFS_F77( CHAR_MACRO(UPLO), &N, &NRHS, A, &LDA, AF, &LDAF,B, &LDB, X, &LDX,
00115     FERR, BERR, WORK, IWORK, INFO);
00116 }
00117 //=============================================================================
00118 void Epetra_LAPACK::POSVX(const char FACT, const char UPLO, const int N, const int NRHS, float * A, const int LDA, float * AF, const int LDAF, 
00119        const char EQUED, float * S, float * B, const int LDB, float * X, const int LDX, float * RCOND, 
00120        float * FERR, float * BERR, float * WORK, int * IWORK, int * INFO) const {
00121   SPOSVX_F77(CHAR_MACRO(FACT), CHAR_MACRO(UPLO), &N, &NRHS, A, &LDA, AF, &LDAF, CHAR_MACRO(EQUED), S, B, &LDB, X, &LDX, 
00122     RCOND, FERR, BERR, WORK, IWORK, INFO);
00123 }
00124 //=============================================================================
00125 void Epetra_LAPACK::POSVX(const char FACT, const char UPLO, const int N, const int NRHS, double * A, const int LDA, double * AF, const int LDAF, 
00126        const char EQUED, double * S, double * B, const int LDB, double * X, const int LDX, double * RCOND, 
00127        double * FERR, double * BERR, double * WORK, int * IWORK, int * INFO) const {
00128   DPOSVX_F77(CHAR_MACRO(FACT), CHAR_MACRO(UPLO), &N, &NRHS, A, &LDA, AF, &LDAF, CHAR_MACRO(EQUED), S, B, &LDB, X, &LDX, RCOND, 
00129     FERR, BERR, WORK, IWORK, INFO);
00130 }
00131 
00132 // General linear systems
00133 //=============================================================================
00134 void Epetra_LAPACK::GELS( const char TRANS, const int M, const int N, const int NRHS,
00135         double* A, const int LDA, double* B, const int LDB, double* WORK, const int LWORK, 
00136         int * INFO) const {
00137   DGELS_F77 (CHAR_MACRO(TRANS), &M, &N, &NRHS, A, &LDA, B, &LDB, WORK, &LWORK, INFO );
00138         
00139 }
00140 //=============================================================================
00141 void Epetra_LAPACK::GETRF( const int M, const int N, float * A, const int LDA, int * IPIV, int * INFO) const {
00142   SGETRF_F77(&M, &N, A, &LDA, IPIV, INFO);
00143 }
00144 //=============================================================================
00145 void Epetra_LAPACK::GETRF( const int M, const int N, double * A, const int LDA, int * IPIV, int * INFO) const {
00146   DGETRF_F77(&M, &N, A, &LDA, IPIV, INFO);
00147 }
00148 //=============================================================================
00149 void Epetra_LAPACK::GESVD(const char JOBU, const char JOBVT, const int M, const int N, float * A, 
00150         const int LDA, float * S, float * U,
00151         const int LDU, float * VT, const int LDVT, float * WORK, 
00152         const int * LWORK, int * INFO) const {
00153   SGESVD_F77(CHAR_MACRO(JOBU), CHAR_MACRO(JOBVT), &M, &N, A, &LDA, S, U, &LDU,
00154        VT, &LDVT, WORK, LWORK, INFO);
00155 }
00156 //=============================================================================
00157 void Epetra_LAPACK::GESVD(const char JOBU, const char JOBVT, const int M, const int N, double * A, 
00158         const int LDA, double * S, double * U,
00159         const int LDU, double * VT, const int LDVT, double * WORK, 
00160         const int * LWORK, int * INFO) const {
00161   DGESVD_F77(CHAR_MACRO(JOBU), CHAR_MACRO(JOBVT), &M, &N, A, &LDA, S, U, &LDU,
00162        VT, &LDVT, WORK, LWORK, INFO);
00163 }
00164 //=============================================================================
00165 void Epetra_LAPACK::GETRS( const char TRANS, const int N, const int NRHS, const float * A, const int LDA, 
00166         const int * IPIV, float * X, const int LDX, int * INFO) const {
00167   SGETRS_F77(CHAR_MACRO(TRANS), &N, &NRHS, A, &LDA, IPIV, X, &LDX, INFO);
00168 }
00169 //=============================================================================
00170 void Epetra_LAPACK::GETRS( const char TRANS, const int N, const int NRHS, const double * A, const int LDA, 
00171         const int * IPIV, double * X, const int LDX, int * INFO) const {
00172   DGETRS_F77(CHAR_MACRO(TRANS), &N, &NRHS, A, &LDA, IPIV, X, &LDX, INFO);
00173 }
00174 //=============================================================================
00175 void Epetra_LAPACK::GETRI( const int N, float * A, const int LDA, int * IPIV, 
00176         float * WORK, const int * LWORK, int * INFO) const {
00177   SGETRI_F77(&N, A, &LDA, IPIV, WORK, LWORK, INFO);
00178 }
00179 //=============================================================================
00180 void Epetra_LAPACK::GETRI( const int N, double * A, const int LDA, int * IPIV, 
00181         double * WORK, const int * LWORK, int * INFO) const {
00182   DGETRI_F77(&N, A, &LDA, IPIV, WORK, LWORK, INFO);
00183 }
00184 //=============================================================================
00185 void Epetra_LAPACK::GECON( const char NORM, const int N, const float  * A, const int LDA, const float ANORM, 
00186         float * RCOND, float * WORK, int * IWORK, 
00187         int * INFO) const {
00188   SGECON_F77(CHAR_MACRO(NORM), &N, A, &LDA, &ANORM, RCOND, WORK, IWORK, INFO);
00189 }
00190 //=============================================================================
00191 void Epetra_LAPACK::GECON( const char NORM, const int N, const double * A, const int LDA, const double ANORM, 
00192         double * RCOND, double * WORK, int * IWORK, 
00193         int * INFO) const {
00194   DGECON_F77(CHAR_MACRO(NORM), &N, A, &LDA, &ANORM, RCOND, WORK, IWORK, INFO);
00195 }
00196 //=============================================================================
00197 void Epetra_LAPACK::GESV( const int N, const int NRHS, float * A, const int LDA, int * IPIV, 
00198         float * X, const int LDX, int * INFO) const {
00199   SGESV_F77(&N, &NRHS, A, &LDA, IPIV, X, &LDX, INFO);
00200 }
00201 //=============================================================================
00202 void Epetra_LAPACK::GESV( const int N, const int NRHS, double * A, const int LDA, int * IPIV, 
00203         double * X, const int LDX, int * INFO) const {
00204   DGESV_F77(&N, &NRHS, A, &LDA, IPIV, X, &LDX, INFO);
00205 }
00206 //=============================================================================
00207 void Epetra_LAPACK::GEEQU(const int M, const int N, const float * A, const int LDA, float * R, float * C, 
00208        float * ROWCND, float * COLCND, float * AMAX, int * INFO) const {
00209   SGEEQU_F77(&M, &N, A, &LDA, R, C, ROWCND, COLCND, AMAX, INFO);
00210 }
00211 //=============================================================================
00212 void Epetra_LAPACK::GEEQU(const int M, const int N, const double * A, const int LDA, double * R, double * C,  
00213        double * ROWCND, double * COLCND, double * AMAX, int * INFO) const {
00214   DGEEQU_F77(&M, &N, A, &LDA, R, C, ROWCND, COLCND, AMAX, INFO);
00215 }
00216 //=============================================================================
00217 void Epetra_LAPACK::GERFS(const char TRANS, const int N, const int NRHS, const float * A, const int LDA, const float * AF, const int LDAF, 
00218         const int * IPIV, const float * B, const int LDB, float * X, const int LDX,
00219        float * FERR, float * BERR, float * WORK, int * IWORK, int * INFO) const {
00220   SGERFS_F77(CHAR_MACRO(TRANS), &N, &NRHS, A, &LDA, AF, &LDAF, IPIV, B, &LDB, X, &LDX,
00221     FERR, BERR, WORK, IWORK, INFO);
00222 }
00223 //=============================================================================
00224 void Epetra_LAPACK::GERFS(const char TRANS, const int N, const int NRHS, const double * A, const int LDA, const double * AF, const int LDAF, 
00225        const int * IPIV, const double * B, const int LDB, double * X, const int LDX,
00226        double * FERR, double * BERR, double * WORK, int * IWORK, int * INFO) const {
00227   DGERFS_F77( CHAR_MACRO(TRANS), &N, &NRHS, A, &LDA, AF, &LDAF, IPIV, B, &LDB, X, &LDX,
00228     FERR, BERR, WORK, IWORK, INFO);
00229 }
00230 //=============================================================================
00231 void Epetra_LAPACK::GESVX(const char FACT, const char TRANS, const int N, const int NRHS, float * A, const int LDA, float * AF, const int LDAF, 
00232        int * IPIV, const char EQUED, float * R, float * C, float * B, const int LDB, float * X, const int LDX, float * RCOND, 
00233        float * FERR, float * BERR, float * WORK, int * IWORK, int * INFO) const {
00234   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, 
00235     FERR, BERR, WORK, IWORK, INFO);
00236 }
00237 //=============================================================================
00238 void Epetra_LAPACK::GESVX(const char FACT, const char TRANS, const int N, const int NRHS, double * A, const int LDA, double * AF, const int LDAF, 
00239        int * IPIV, const char EQUED, double * R, double * C, double * B, const int LDB, double * X, const int LDX, double * RCOND, 
00240        double * FERR, double * BERR, double * WORK, int * IWORK, int * INFO) const {
00241  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, 
00242     FERR, BERR, WORK, IWORK, INFO);
00243 }
00244 
00245 
00246 
00247 
00248 //=============================================================================
00249 void Epetra_LAPACK::GEHRD(const int N, const int ILO, const int IHI, float * A, const int LDA, float * TAU, 
00250        float * WORK, const int LWORK, int * INFO) const {
00251   SGEHRD_F77(&N, &ILO, &IHI, A, &LDA, TAU, WORK, &LWORK, INFO);
00252 }
00253 //=============================================================================
00254 void Epetra_LAPACK::GEHRD(const int N, const int ILO, const int IHI, double * A, const int LDA, double * TAU, 
00255        double * WORK, const int LWORK, int * INFO) const {
00256   DGEHRD_F77(&N, &ILO, &IHI, A, &LDA, TAU, WORK, &LWORK, INFO);
00257 }
00258 //=============================================================================
00259 void Epetra_LAPACK::HSEQR( const char JOB, const char COMPZ, const int N, const int ILO, const int IHI, float * H, const int LDH, 
00260         float * WR, float * WI, float * Z, const int LDZ, float * WORK, const int LWORK, 
00261         int * INFO) const {
00262   SHSEQR_F77(CHAR_MACRO(JOB), CHAR_MACRO(COMPZ), &N, &ILO, &IHI, H, &LDH, WR, WI, Z, &LDZ, WORK, &LWORK, INFO);
00263 }
00264 //=============================================================================
00265 void Epetra_LAPACK::HSEQR( const char JOB, const char COMPZ, const int N, const int ILO, const int IHI, double * H, const int LDH, 
00266         double * WR, double * WI, double * Z, const int LDZ, double * WORK, const int LWORK, 
00267         int * INFO) const {
00268   DHSEQR_F77(CHAR_MACRO(JOB), CHAR_MACRO(COMPZ), &N, &ILO, &IHI, H, &LDH, WR, WI, Z, &LDZ, WORK, &LWORK, INFO);
00269 }
00270 //=============================================================================
00271 void Epetra_LAPACK::ORGHR( const int N, const int ILO, const int IHI, float * A, const int LDA, float * TAU, 
00272         float * WORK, const int LWORK, int * INFO) const {
00273   SORGHR_F77( &N, &ILO, &IHI, A, &LDA, TAU, WORK, &LWORK, INFO);
00274 }
00275 //=============================================================================
00276 void Epetra_LAPACK::ORGHR( const int N, const int ILO, const int IHI, double * A, const int LDA, double * TAU, 
00277         double * WORK, const int LWORK, int * INFO) const {
00278   DORGHR_F77( &N, &ILO, &IHI, A, &LDA, TAU, WORK, &LWORK, INFO);
00279 }
00280 //=============================================================================
00281 void Epetra_LAPACK::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, 
00282         const float * TAU, float * C, const int LDC, float * WORK, const int LWORK, int * INFO) const {
00283   SORMHR_F77(CHAR_MACRO(SIDE), CHAR_MACRO(TRANS), &M, &N, &ILO, &IHI, A, &LDA, TAU, C, &LDC, WORK, &LWORK, INFO);
00284 }
00285 //=============================================================================
00286 void Epetra_LAPACK::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, 
00287         const double * TAU, double * C, const int LDC, double * WORK, const int LWORK, int * INFO) const {
00288   DORMHR_F77(CHAR_MACRO(SIDE), CHAR_MACRO(TRANS), &M, &N, &ILO, &IHI, A, &LDA, TAU, C, &LDC, WORK, &LWORK, INFO);
00289 }
00290 //=============================================================================
00291 void Epetra_LAPACK::TREVC( const char SIDE, const char HOWMNY, int * SELECT, const int N, const float * T, const int LDT, float *VL, const int LDVL,
00292         float * VR, const int LDVR, const int MM, int * M, float * WORK, int * INFO) const {
00293 
00294   if (HOWMNY=='S') *INFO = -3; // We do not support 'S' since it requires a logical array (yuck!)
00295 
00296   else  STREVC_F77(CHAR_MACRO(SIDE), CHAR_MACRO(HOWMNY), SELECT, &N, T, &LDT, VL, &LDVL, VR, &LDVR, &MM, M, WORK, INFO);
00297 }
00298 //=============================================================================
00299 void Epetra_LAPACK::TREVC( const char SIDE, const char HOWMNY, int * SELECT, const int N, const double * T, const int LDT, double *VL, const int LDVL,
00300         double * VR, const int LDVR, const int MM, int * M, double * WORK, int * INFO) const {
00301 
00302   if (HOWMNY=='S') *INFO = -3; // We do not support 'S' since it requires a logical array (yuck!)
00303 
00304   else  DTREVC_F77(CHAR_MACRO(SIDE), CHAR_MACRO(HOWMNY), SELECT, &N, T, &LDT, VL, &LDVL, VR, &LDVR, &MM, M, WORK, INFO);
00305 }
00306 //=============================================================================
00307 void Epetra_LAPACK::TREXC( const char COMPQ, const int N, float * T, const int LDT, float * Q, const int LDQ, int IFST, int ILST, 
00308         float * WORK, int * INFO) const {
00309   STREXC_F77( CHAR_MACRO(COMPQ), &N, T, &LDT, Q, &LDQ, &IFST, &ILST, WORK, INFO);
00310 }
00311 //=============================================================================
00312 void Epetra_LAPACK::TREXC( const char COMPQ, const int N, double * T, const int LDT, double * Q, const int LDQ, int IFST, int ILST, 
00313         double * WORK, int * INFO) const {
00314   DTREXC_F77( CHAR_MACRO(COMPQ), &N, T, &LDT, Q, &LDQ, &IFST, &ILST, WORK, INFO);
00315 }
00316 //=============================================================================
00317 void Epetra_LAPACK::LAMCH( const char CMACH, float & T) const {
00318   T = SLAMCH_F77( CHAR_MACRO(CMACH));
00319 }
00320 //=============================================================================
00321 void Epetra_LAPACK::LAMCH( const char CMACH, double & T) const {
00322   T = DLAMCH_F77( CHAR_MACRO(CMACH));
00323 }
00324 //=============================================================================
00325 void Epetra_LAPACK::GGSVD(const char JOBU, const char JOBV, const char JOBQ, const int M, const int N, const int P, int * K, int * L,  
00326         double* A,  const int LDA,  double* B,  const int LDB,
00327                           double* ALPHA,  double* BETA,  double* U,  const int LDU, double* V, const int LDV, double* Q, const int LDQ, double* WORK, int* IWORK,
00328                           int* INFO) const {
00329   DGGSVD_F77(CHAR_MACRO(JOBU), CHAR_MACRO(JOBV), CHAR_MACRO(JOBQ), &M, &N, &P, K, L,  A,  &LDA,  B,  &LDB,
00330        ALPHA,  BETA,  U,  &LDU, V, &LDV, Q, &LDQ, WORK, IWORK, INFO);
00331 }
00332   
00333 //=============================================================================
00334 void Epetra_LAPACK::GGSVD(const char JOBU, const char JOBV, const char JOBQ, const int M, const int N, const int P, int * K, int * L,  
00335         float* A,  const int LDA,  float* B,  const int LDB,
00336                           float* ALPHA,  float* BETA,  float* U,  const int LDU, float* V, const int LDV, float* Q, const int LDQ, float* WORK, int* IWORK,
00337                           int* INFO) const {
00338   SGGSVD_F77(CHAR_MACRO(JOBU), CHAR_MACRO(JOBV), CHAR_MACRO(JOBQ), &M, &N, &P, K, L,  A,  &LDA,  B,  &LDB,
00339        ALPHA,  BETA,  U,  &LDU, V, &LDV, Q, &LDQ, WORK, IWORK, INFO);
00340 }
00341   
00342 //=============================================================================
00343 void Epetra_LAPACK::GEEV(const char JOBVL, const char JOBVR, const int N, double* A, const int LDA, double* WR, double* WI, 
00344        double* VL, const int LDVL, double* VR, const int LDVR, double* WORK, const int LWORK, int* INFO) const {
00345 
00346   DGEEV_F77(CHAR_MACRO(JOBVL), CHAR_MACRO(JOBVR), &N, A, &LDA, WR, WI, VL, &LDVL, VR,  &LDVR,
00347       WORK, &LWORK, INFO);
00348 }
00349 //=============================================================================
00350 void Epetra_LAPACK::GEEV(const char JOBVL, const char JOBVR, const int N, float* A, const int LDA, float* WR, float* WI, 
00351        float* VL, const int LDVL, float* VR, const int LDVR, float* WORK, const int LWORK, int* INFO) const {
00352 
00353   SGEEV_F77(CHAR_MACRO(JOBVL), CHAR_MACRO(JOBVR), &N, A, &LDA, WR, WI, VL, &LDVL, VR,  &LDVR,
00354       WORK, &LWORK, INFO);
00355 }
00356 //=============================================================================
00357 void Epetra_LAPACK::SPEV(const char JOBZ, const char UPLO, const int N, double* AP, double* W, double* Z, int LDZ, double* WORK, int* INFO) const {
00358 
00359   DSPEV_F77(CHAR_MACRO(JOBZ), CHAR_MACRO(UPLO), &N, AP, W, Z, &LDZ, WORK, INFO);
00360 }
00361 //=============================================================================
00362 void Epetra_LAPACK::SPEV(const char JOBZ, const char UPLO, const int N, float* AP, float* W, float* Z, int LDZ, float* WORK, int* INFO) const {
00363 
00364   SSPEV_F77(CHAR_MACRO(JOBZ), CHAR_MACRO(UPLO), &N, AP, W, Z, &LDZ, WORK, INFO);
00365 }
00366 //=============================================================================
00367 void Epetra_LAPACK::SPGV(const int ITYPE, const char JOBZ, const char UPLO, const int N, double* AP, double* BP, double* W, double* Z, const int LDZ, double* WORK, int* INFO) const {
00368 
00369   DSPGV_F77(&ITYPE, CHAR_MACRO(JOBZ), CHAR_MACRO(UPLO), &N, AP, BP, W, Z, &LDZ, WORK, INFO);
00370 }
00371 //=============================================================================
00372 void Epetra_LAPACK::SPGV(const int ITYPE, const char JOBZ, const char UPLO, const int N, float* AP, float* BP, float* W, float* Z, const int LDZ, float* WORK, int* INFO) const {
00373 
00374   SSPGV_F77(&ITYPE, CHAR_MACRO(JOBZ), CHAR_MACRO(UPLO), &N, AP, BP, W, Z, &LDZ, WORK, INFO);
00375 }
00376 //=============================================================================
00377 void Epetra_LAPACK::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{
00378 
00379   DSYEV_F77(CHAR_MACRO(JOBZ), CHAR_MACRO(UPLO), &N, A, &LDA, W, WORK, &LWORK, INFO);
00380 
00381 }
00382 //=============================================================================
00383 void Epetra_LAPACK::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{
00384 
00385   SSYEV_F77(CHAR_MACRO(JOBZ), CHAR_MACRO(UPLO), &N, A, &LDA, W, WORK, &LWORK, INFO);
00386 
00387 }
00388 //=============================================================================
00389 void Epetra_LAPACK::SYEVD(const char JOBZ, const char UPLO,  const int N,  double* A,  const int LDA,  double* W,  double* WORK,  
00390         const int LWORK,  int* IWORK, const int LIWORK, int* INFO) const {
00391 
00392   DSYEVD_F77(CHAR_MACRO(JOBZ), CHAR_MACRO(UPLO), &N, A, &LDA, W, WORK, &LWORK, IWORK, &LIWORK, INFO);
00393 }
00394 //=============================================================================
00395 void Epetra_LAPACK::SYEVD(const char JOBZ, const char UPLO,  const int N,  float* A,  const int LDA,  float* W,  float* WORK,  
00396         const int LWORK,  int* IWORK, const int LIWORK, int* INFO) const {
00397 
00398   SSYEVD_F77(CHAR_MACRO(JOBZ), CHAR_MACRO(UPLO), &N, A, &LDA, W, WORK, &LWORK, IWORK, &LIWORK, INFO);
00399 }
00400 //=============================================================================
00401 void Epetra_LAPACK::SYEVX(const char JOBZ, const char RANGE, const char UPLO,  const int N,  double* A,  const int LDA,  
00402          const double* VL,  const double* VU,  const int* IL,  const int* IU,
00403          const double ABSTOL,  int * M,  double* W,  double* Z,  const int LDZ, double* WORK, 
00404         const int LWORK, int* IWORK, int* IFAIL,
00405         int* INFO) const {
00406 
00407   DSYEVX_F77(CHAR_MACRO(JOBZ), CHAR_MACRO(RANGE), CHAR_MACRO(UPLO), &N,  A,  &LDA,  VL,  VU,  IL,  IU,
00408    &ABSTOL,  M,  W,  Z,  &LDZ, WORK, &LWORK, IWORK, IFAIL, INFO);
00409 }
00410 //=============================================================================
00411 void Epetra_LAPACK::SYEVX(const char JOBZ, const char RANGE, const char UPLO,  const int N,  float* A,  const int LDA,  
00412          const float* VL,  const float* VU,  const int* IL,  const int* IU,
00413          const float ABSTOL,  int * M,  float* W,  float* Z,  const int LDZ, float* WORK, 
00414         const int LWORK, int* IWORK, int* IFAIL,
00415         int* INFO) const {
00416 
00417   SSYEVX_F77(CHAR_MACRO(JOBZ), CHAR_MACRO(RANGE), CHAR_MACRO(UPLO), &N,  A,  &LDA,  VL,  VU,  IL,  IU,
00418    &ABSTOL,  M,  W,  Z,  &LDZ, WORK, &LWORK, IWORK, IFAIL, INFO);
00419 }
00420 //=============================================================================
00421 void Epetra_LAPACK::SYGV(const int ITYPE, const char JOBZ, const char UPLO, const int N, double* A, 
00422        const int LDA, double* B, const int LDB, double* W, double* WORK, const int LWORK, int* INFO) const{
00423 
00424   DSYGV_F77(&ITYPE, CHAR_MACRO(JOBZ), CHAR_MACRO(UPLO), &N, A, &LDA, B, &LDB, W, WORK, &LWORK, INFO);
00425 }
00426 //=============================================================================
00427 void Epetra_LAPACK::SYGV(const int ITYPE, const char JOBZ, const char UPLO, const int N, float* A, 
00428        const int LDA, float* B, const int LDB, float* W, float* WORK, const int LWORK, int* INFO) const{
00429 
00430   SSYGV_F77(&ITYPE, CHAR_MACRO(JOBZ), CHAR_MACRO(UPLO), &N, A, &LDA, B, &LDB, W, WORK, &LWORK, INFO);
00431 }
00432 //=============================================================================
00433 void Epetra_LAPACK::SYGVX(const int ITYPE, const char JOBZ, const char RANGE, const char UPLO, const int N, 
00434        double* A, const int LDA, double* B, const int LDB, const double* VL, const double* VU,
00435        const int* IL, const int* IU, const double ABSTOL, int* M, double* W, double* Z, 
00436        const int LDZ,  double* WORK,  const int LWORK,  int* IWORK,
00437         int* IFAIL, int* INFO) const {
00438 
00439 #ifdef EPETRA_LAPACK3
00440   DSYGVX_F77(&ITYPE, CHAR_MACRO(JOBZ), CHAR_MACRO(RANGE), CHAR_MACRO(UPLO), &N,  A,  &LDA, B, &LDB, VL, VU,
00441        IL, IU, &ABSTOL, M, W, Z, &LDZ,  WORK,  &LWORK,  IWORK,
00442        IFAIL, INFO);
00443 #else
00444 
00445   Epetra_Object obj;
00446   obj.ReportError("SYGVX requires LAPACK Version 3.  Compile Epetra with -DEPETRA_LAPACK3 and link with LAPACK 3 library", -1);
00447 #endif
00448 }
00449 //=============================================================================
00450 void Epetra_LAPACK::SYGVX(const int ITYPE, const char JOBZ, const char RANGE, const char UPLO, const int N, 
00451        float* A, const int LDA, float* B, const int LDB, const float* VL, const float* VU,
00452        const int* IL, const int* IU, const float ABSTOL, int* M, float* W, float* Z, 
00453        const int LDZ,  float* WORK,  const int LWORK,  int* IWORK,
00454         int* IFAIL, int* INFO) const {
00455 
00456 #ifdef EPETRA_LAPACK3
00457   SSYGVX_F77(&ITYPE, CHAR_MACRO(JOBZ), CHAR_MACRO(RANGE), CHAR_MACRO(UPLO), &N,  A,  &LDA, B, &LDB, VL, VU,
00458                           IL, IU, &ABSTOL, M, W, Z, &LDZ,  WORK,  &LWORK,  IWORK,
00459        IFAIL, INFO);
00460 #else
00461 
00462   Epetra_Object obj;
00463   obj.ReportError("SYGVX requires LAPACK Version 3.  Compile Epetra with -DEPETRA_LAPACK3 and link with LAPACK 3 library", -1);
00464 #endif
00465 }
00466 //=============================================================================
00467 void Epetra_LAPACK::SYEVR(const char JOBZ, const char RANGE, const char UPLO,  const int N,  double* A,  const int LDA,  
00468         const double* VL,  const double* VU,  const int *IL,  const int *IU,
00469                           const double ABSTOL,  int* M,  double* W,  double* Z, const int LDZ, int* ISUPPZ, double* WORK, const int LWORK, int* IWORK,
00470                           const int LIWORK, int* INFO) const { 
00471 
00472 #ifdef EPETRA_LAPACK3
00473   DSYEVR_F77(CHAR_MACRO(JOBZ), CHAR_MACRO(RANGE), CHAR_MACRO(UPLO), &N,  A,  &LDA, VL,  VU,  IL,  IU,
00474        &ABSTOL,  M,  W,  Z, &LDZ, ISUPPZ, WORK, &LWORK, IWORK,
00475        &LIWORK, INFO);
00476 #else
00477   Epetra_Object obj;
00478   obj.ReportError("SYEVR requires LAPACK Version 3.  Compile Epetra with -DEPETRA_LAPACK3 and link with LAPACK 3 library", -1);
00479 #endif
00480 }
00481 //=============================================================================
00482 void Epetra_LAPACK::SYEVR(const char JOBZ, const char RANGE, const char UPLO,  const int N,  float* A,  const int LDA,  
00483         const float* VL,  const float* VU,  const int *IL,  const int *IU,
00484                           const float ABSTOL,  int* M,  float* W,  float* Z, const int LDZ, int* ISUPPZ, float* WORK, const int LWORK, int* IWORK,
00485                           const int LIWORK, int* INFO) const { 
00486 
00487 #ifdef EPETRA_LAPACK3
00488   SSYEVR_F77(CHAR_MACRO(JOBZ), CHAR_MACRO(RANGE), CHAR_MACRO(UPLO), &N,  A,  &LDA, VL,  VU,  IL,  IU,
00489        &ABSTOL,  M,  W,  Z, &LDZ, ISUPPZ, WORK, &LWORK, IWORK,
00490        &LIWORK, INFO);
00491 #else
00492   Epetra_Object obj;
00493   obj.ReportError("SYEVR requires LAPACK Version 3.  Compile Epetra with -DEPETRA_LAPACK3 and link with LAPACK 3 library", -1);
00494 #endif
00495 }
00496 //=============================================================================
00497 void Epetra_LAPACK::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,
00498        const int LDVL,  double* VR,  const int LDVR,  int* ILO,  int* IHI,  double* SCALE, double* ABNRM, double* RCONDE,
00499         double* RCONDV, double* WORK, const int LWORK, int* IWORK, int* INFO) const{
00500 
00501   DGEEVX_F77(CHAR_MACRO(BALANC), CHAR_MACRO(JOBVL), CHAR_MACRO(JOBVR), CHAR_MACRO(SENSE), &N, A, &LDA, WR, WI,  VL,
00502        &LDVL,  VR,  &LDVR,  ILO,  IHI,  SCALE, ABNRM, RCONDE,
00503        RCONDV, WORK, &LWORK, IWORK, INFO);
00504 }
00505 //=============================================================================
00506 void Epetra_LAPACK::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,
00507        const int LDVL,  float* VR,  const int LDVR,  int* ILO,  int* IHI,  float* SCALE, float* ABNRM, float* RCONDE,
00508         float* RCONDV, float* WORK, const int LWORK, int* IWORK, int* INFO) const{
00509 
00510   SGEEVX_F77(CHAR_MACRO(BALANC), CHAR_MACRO(JOBVL), CHAR_MACRO(JOBVR), CHAR_MACRO(SENSE), &N, A, &LDA, WR, WI,  VL,
00511        &LDVL,  VR,  &LDVR,  ILO,  IHI,  SCALE, ABNRM, RCONDE,
00512        RCONDV, WORK, &LWORK, IWORK, INFO);
00513 }
00514 //=============================================================================
00515 void Epetra_LAPACK::GESDD(const char JOBZ, const int M, const int N, double* A, const int LDA,  double* S,  
00516         double* U,  const int LDU,  double* VT,  const int LDVT,  double* WORK,
00517         const int LWORK, int* IWORK, int* INFO) const{
00518 
00519 #ifdef EPETRA_LAPACK3
00520   DGESDD_F77(CHAR_MACRO(JOBZ), &M, &N, A, &LDA,  S,  U,  &LDU,  VT,  &LDVT,  WORK,
00521        &LWORK, IWORK, INFO);
00522 #else
00523   Epetra_Object obj;
00524   obj.ReportError("GESDD requires LAPACK Version 3.  Compile Epetra with -DEPETRA_LAPACK3 and link with LAPACK 3 library", -1);
00525 #endif
00526 }
00527 //=============================================================================
00528 void Epetra_LAPACK::GESDD(const char JOBZ, const int M, const int N, float* A, const int LDA,  float* S,  
00529         float* U,  const int LDU,  float* VT,  const int LDVT,  float* WORK,
00530         const int LWORK, int* IWORK, int* INFO) const{
00531 
00532 #ifdef EPETRA_LAPACK3
00533   SGESDD_F77(CHAR_MACRO(JOBZ), &M, &N, A, &LDA,  S,  U,  &LDU,  VT,  &LDVT,  WORK,
00534        &LWORK, IWORK, INFO);
00535 #else
00536   Epetra_Object obj;
00537   obj.ReportError("GESDD requires LAPACK Version 3.  Compile Epetra with -DEPETRA_LAPACK3 and link with LAPACK 3 library", -1);
00538 #endif
00539 }
00540 //=============================================================================
00541 void Epetra_LAPACK::GGEV(const char JOBVL,  const char JOBVR,  const int N,  double* A,  
00542        const int LDA,  double* B, const int LDB, double* ALPHAR, double* ALPHAI,
00543        double* BETA, double* VL, const int LDVL, double* VR, const int 
00544        LDVR, double* WORK, const int LWORK, int* INFO) const{
00545 
00546 #ifdef EPETRA_LAPACK3
00547   DGGEV_F77(CHAR_MACRO(JOBVL), CHAR_MACRO(JOBVR), &N,  A,  &LDA,  B, &LDB, ALPHAR, ALPHAI,
00548       BETA, VL, &LDVL, VR, &LDVR, WORK, &LWORK, INFO);
00549 #else
00550   Epetra_Object obj;
00551   obj.ReportError("GGEV requires LAPACK Version 3.  Compile Epetra with -DEPETRA_LAPACK3 and link with LAPACK 3 library", -1);
00552 #endif
00553 }
00554 //=============================================================================
00555 void Epetra_LAPACK::GGEV(const char JOBVL,  const char JOBVR,  const int N,  float* A,  
00556        const int LDA,  float* B, const int LDB, float* ALPHAR, float* ALPHAI,
00557        float* BETA, float* VL, const int LDVL, float* VR, const int 
00558        LDVR, float* WORK, const int LWORK, int* INFO) const {
00559 
00560 #ifdef EPETRA_LAPACK3
00561   SGGEV_F77(CHAR_MACRO(JOBVL), CHAR_MACRO(JOBVR), &N,  A,  &LDA,  B, &LDB, ALPHAR, ALPHAI,
00562       BETA, VL, &LDVL, VR, &LDVR, WORK, &LWORK, INFO);
00563 #else
00564   Epetra_Object obj;
00565   obj.ReportError("GGEV requires LAPACK Version 3.  Compile Epetra with -DEPETRA_LAPACK3 and link with LAPACK 3 library", -1);
00566 #endif
00567 }
00568 //=============================================================================
00569 void Epetra_LAPACK::GGLSE(const int M, const int N, const int P, double* A, const int LDA, double* B, const int LDB, 
00570         double* C, double* D, double* X, double* WORK, const int LWORK, int* INFO) const{
00571   DGGLSE_F77(&M, &N, &P, A, &LDA, B, &LDB, C, D, X, WORK, &LWORK,  INFO);
00572 }
00573 //=============================================================================
00574 void Epetra_LAPACK::GGLSE(const int M, const int N, const int P, float* A, const int LDA, float* B, const int LDB, 
00575         float* C, float* D, float* X, float* WORK, const int LWORK, int* INFO) const{
00576   SGGLSE_F77(&M, &N, &P, A, &LDA, B, &LDB, C, D, X, WORK, &LWORK,  INFO);
00577 }
00578 
00579 

Generated on Thu Sep 18 12:37:57 2008 for Epetra Package Browser (Single Doxygen Collection) by doxygen 1.3.9.1