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::GEQRF( const int M, const int N,  float * A, const int LDA,  float * TAU,  float * WORK, const int LWORK, int * INFO) const {
00150   SGEQRF_F77(&M, &N, A, &LDA, TAU, WORK, &LWORK, INFO);
00151 }
00152 //=============================================================================
00153 void Epetra_LAPACK::GEQRF( const int M, const int N, double * A, const int LDA, double * TAU, double * WORK, const int LWORK, int * INFO) const {
00154   DGEQRF_F77(&M, &N, A, &LDA, TAU, WORK, &LWORK, INFO);
00155 }
00156 //=============================================================================
00157 void Epetra_LAPACK::GESVD(const char JOBU, const char JOBVT, const int M, const int N, float * A, 
00158         const int LDA, float * S, float * U,
00159         const int LDU, float * VT, const int LDVT, float * WORK, 
00160         const int * LWORK, int * INFO) const {
00161   SGESVD_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::GESVD(const char JOBU, const char JOBVT, const int M, const int N, double * A, 
00166         const int LDA, double * S, double * U,
00167         const int LDU, double * VT, const int LDVT, double * WORK, 
00168         const int * LWORK, int * INFO) const {
00169   DGESVD_F77(CHAR_MACRO(JOBU), CHAR_MACRO(JOBVT), &M, &N, A, &LDA, S, U, &LDU,
00170        VT, &LDVT, WORK, LWORK, INFO);
00171 }
00172 //=============================================================================
00173 void Epetra_LAPACK::GETRS( const char TRANS, const int N, const int NRHS, const float * A, const int LDA, 
00174         const int * IPIV, float * X, const int LDX, int * INFO) const {
00175   SGETRS_F77(CHAR_MACRO(TRANS), &N, &NRHS, A, &LDA, IPIV, X, &LDX, INFO);
00176 }
00177 //=============================================================================
00178 void Epetra_LAPACK::GETRS( const char TRANS, const int N, const int NRHS, const double * A, const int LDA, 
00179         const int * IPIV, double * X, const int LDX, int * INFO) const {
00180   DGETRS_F77(CHAR_MACRO(TRANS), &N, &NRHS, A, &LDA, IPIV, X, &LDX, INFO);
00181 }
00182 //=============================================================================
00183 void Epetra_LAPACK::GETRI( const int N, float * A, const int LDA, int * IPIV, 
00184         float * WORK, const int * LWORK, int * INFO) const {
00185   SGETRI_F77(&N, A, &LDA, IPIV, WORK, LWORK, INFO);
00186 }
00187 //=============================================================================
00188 void Epetra_LAPACK::GETRI( const int N, double * A, const int LDA, int * IPIV, 
00189         double * WORK, const int * LWORK, int * INFO) const {
00190   DGETRI_F77(&N, A, &LDA, IPIV, WORK, LWORK, INFO);
00191 }
00192 //=============================================================================
00193 void Epetra_LAPACK::GECON( const char NORM, const int N, const float  * A, const int LDA, const float ANORM, 
00194         float * RCOND, float * WORK, int * IWORK, 
00195         int * INFO) const {
00196   SGECON_F77(CHAR_MACRO(NORM), &N, A, &LDA, &ANORM, RCOND, WORK, IWORK, INFO);
00197 }
00198 //=============================================================================
00199 void Epetra_LAPACK::GECON( const char NORM, const int N, const double * A, const int LDA, const double ANORM, 
00200         double * RCOND, double * WORK, int * IWORK, 
00201         int * INFO) const {
00202   DGECON_F77(CHAR_MACRO(NORM), &N, A, &LDA, &ANORM, RCOND, WORK, IWORK, INFO);
00203 }
00204 //=============================================================================
00205 void Epetra_LAPACK::GESV( const int N, const int NRHS, float * A, const int LDA, int * IPIV, 
00206         float * X, const int LDX, int * INFO) const {
00207   SGESV_F77(&N, &NRHS, A, &LDA, IPIV, X, &LDX, INFO);
00208 }
00209 //=============================================================================
00210 void Epetra_LAPACK::GESV( const int N, const int NRHS, double * A, const int LDA, int * IPIV, 
00211         double * X, const int LDX, int * INFO) const {
00212   DGESV_F77(&N, &NRHS, A, &LDA, IPIV, X, &LDX, INFO);
00213 }
00214 //=============================================================================
00215 void Epetra_LAPACK::GEEQU(const int M, const int N, const float * A, const int LDA, float * R, float * C, 
00216        float * ROWCND, float * COLCND, float * AMAX, int * INFO) const {
00217   SGEEQU_F77(&M, &N, A, &LDA, R, C, ROWCND, COLCND, AMAX, INFO);
00218 }
00219 //=============================================================================
00220 void Epetra_LAPACK::GEEQU(const int M, const int N, const double * A, const int LDA, double * R, double * C,  
00221        double * ROWCND, double * COLCND, double * AMAX, int * INFO) const {
00222   DGEEQU_F77(&M, &N, A, &LDA, R, C, ROWCND, COLCND, AMAX, INFO);
00223 }
00224 //=============================================================================
00225 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, 
00226         const int * IPIV, const float * B, const int LDB, float * X, const int LDX,
00227        float * FERR, float * BERR, float * WORK, int * IWORK, int * INFO) const {
00228   SGERFS_F77(CHAR_MACRO(TRANS), &N, &NRHS, A, &LDA, AF, &LDAF, IPIV, B, &LDB, X, &LDX,
00229     FERR, BERR, WORK, IWORK, INFO);
00230 }
00231 //=============================================================================
00232 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, 
00233        const int * IPIV, const double * B, const int LDB, double * X, const int LDX,
00234        double * FERR, double * BERR, double * WORK, int * IWORK, int * INFO) const {
00235   DGERFS_F77( CHAR_MACRO(TRANS), &N, &NRHS, A, &LDA, AF, &LDAF, IPIV, B, &LDB, X, &LDX,
00236     FERR, BERR, WORK, IWORK, INFO);
00237 }
00238 //=============================================================================
00239 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, 
00240        int * IPIV, const char EQUED, float * R, float * C, float * B, const int LDB, float * X, const int LDX, float * RCOND, 
00241        float * FERR, float * BERR, float * WORK, int * IWORK, int * INFO) const {
00242   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, 
00243     FERR, BERR, WORK, IWORK, INFO);
00244 }
00245 //=============================================================================
00246 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, 
00247        int * IPIV, const char EQUED, double * R, double * C, double * B, const int LDB, double * X, const int LDX, double * RCOND, 
00248        double * FERR, double * BERR, double * WORK, int * IWORK, int * INFO) const {
00249  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, 
00250     FERR, BERR, WORK, IWORK, INFO);
00251 }
00252 
00253 
00254 
00255 
00256 //=============================================================================
00257 void Epetra_LAPACK::GEHRD(const int N, const int ILO, const int IHI, float * A, const int LDA, float * TAU, 
00258        float * WORK, const int LWORK, int * INFO) const {
00259   SGEHRD_F77(&N, &ILO, &IHI, A, &LDA, TAU, WORK, &LWORK, INFO);
00260 }
00261 //=============================================================================
00262 void Epetra_LAPACK::GEHRD(const int N, const int ILO, const int IHI, double * A, const int LDA, double * TAU, 
00263        double * WORK, const int LWORK, int * INFO) const {
00264   DGEHRD_F77(&N, &ILO, &IHI, A, &LDA, TAU, WORK, &LWORK, INFO);
00265 }
00266 //=============================================================================
00267 void Epetra_LAPACK::HSEQR( const char JOB, const char COMPZ, const int N, const int ILO, const int IHI, float * H, const int LDH, 
00268         float * WR, float * WI, float * Z, const int LDZ, float * WORK, const int LWORK, 
00269         int * INFO) const {
00270   SHSEQR_F77(CHAR_MACRO(JOB), CHAR_MACRO(COMPZ), &N, &ILO, &IHI, H, &LDH, WR, WI, Z, &LDZ, WORK, &LWORK, INFO);
00271 }
00272 //=============================================================================
00273 void Epetra_LAPACK::HSEQR( const char JOB, const char COMPZ, const int N, const int ILO, const int IHI, double * H, const int LDH, 
00274         double * WR, double * WI, double * Z, const int LDZ, double * WORK, const int LWORK, 
00275         int * INFO) const {
00276   DHSEQR_F77(CHAR_MACRO(JOB), CHAR_MACRO(COMPZ), &N, &ILO, &IHI, H, &LDH, WR, WI, Z, &LDZ, WORK, &LWORK, INFO);
00277 }
00278 //=============================================================================
00279 void Epetra_LAPACK::ORGQR( const int M, const int N, const int K, float * A, const int LDA, float * TAU, 
00280         float * WORK, const int LWORK, int * INFO) const {
00281   SORGQR_F77( &M, &N, &K, A, &LDA, TAU, WORK, &LWORK, INFO);
00282 }
00283 //=============================================================================
00284 void Epetra_LAPACK::ORGQR( const int M, const int N, const int K, double * A, const int LDA, double * TAU, 
00285         double * WORK, const int LWORK, int * INFO) const {
00286   DORGQR_F77( &M, &N, &K, A, &LDA, TAU, WORK, &LWORK, INFO);
00287 }
00288 //=============================================================================
00289 void Epetra_LAPACK::ORGHR( const int N, const int ILO, const int IHI, float * A, const int LDA, float * TAU, 
00290         float * WORK, const int LWORK, int * INFO) const {
00291   SORGHR_F77( &N, &ILO, &IHI, A, &LDA, TAU, WORK, &LWORK, INFO);
00292 }
00293 //=============================================================================
00294 void Epetra_LAPACK::ORGHR( const int N, const int ILO, const int IHI, double * A, const int LDA, double * TAU, 
00295         double * WORK, const int LWORK, int * INFO) const {
00296   DORGHR_F77( &N, &ILO, &IHI, A, &LDA, TAU, WORK, &LWORK, INFO);
00297 }
00298 //=============================================================================
00299 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, 
00300         const float * TAU, float * C, const int LDC, float * WORK, const int LWORK, int * INFO) const {
00301   SORMHR_F77(CHAR_MACRO(SIDE), CHAR_MACRO(TRANS), &M, &N, &ILO, &IHI, A, &LDA, TAU, C, &LDC, WORK, &LWORK, INFO);
00302 }
00303 //=============================================================================
00304 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, 
00305         const double * TAU, double * C, const int LDC, double * WORK, const int LWORK, int * INFO) const {
00306   DORMHR_F77(CHAR_MACRO(SIDE), CHAR_MACRO(TRANS), &M, &N, &ILO, &IHI, A, &LDA, TAU, C, &LDC, WORK, &LWORK, INFO);
00307 }
00308 //=============================================================================
00309 void Epetra_LAPACK::LARFT( const char DIRECT, const char STOREV, const int N, const int K, float * V, const int LDV, float * TAU, float * T, const int LDT) const {
00310   SLARFT_F77(CHAR_MACRO(DIRECT), CHAR_MACRO(STOREV), &N, &K, V, &LDV, TAU, T, &LDT);
00311 }
00312 //=============================================================================
00313 void Epetra_LAPACK::LARFT( const char DIRECT, const char STOREV, const int N, const int K, double * V, const int LDV, double * TAU, double * T, const int LDT) const {
00314   DLARFT_F77(CHAR_MACRO(DIRECT), CHAR_MACRO(STOREV), &N, &K, V, &LDV, TAU, T, &LDT);
00315 }
00316 //=============================================================================
00317 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,
00318         float * VR, const int LDVR, const int MM, int * M, float * WORK, int * INFO) const {
00319 
00320   if (HOWMNY=='S') *INFO = -3; // We do not support 'S' since it requires a logical array (yuck!)
00321 
00322   else  STREVC_F77(CHAR_MACRO(SIDE), CHAR_MACRO(HOWMNY), SELECT, &N, T, &LDT, VL, &LDVL, VR, &LDVR, &MM, M, WORK, INFO);
00323 }
00324 //=============================================================================
00325 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,
00326         double * VR, const int LDVR, const int MM, int * M, double * WORK, int * INFO) const {
00327 
00328   if (HOWMNY=='S') *INFO = -3; // We do not support 'S' since it requires a logical array (yuck!)
00329 
00330   else  DTREVC_F77(CHAR_MACRO(SIDE), CHAR_MACRO(HOWMNY), SELECT, &N, T, &LDT, VL, &LDVL, VR, &LDVR, &MM, M, WORK, INFO);
00331 }
00332 //=============================================================================
00333 void Epetra_LAPACK::TREXC( const char COMPQ, const int N, float * T, const int LDT, float * Q, const int LDQ, int IFST, int ILST, 
00334         float * WORK, int * INFO) const {
00335   STREXC_F77( CHAR_MACRO(COMPQ), &N, T, &LDT, Q, &LDQ, &IFST, &ILST, WORK, INFO);
00336 }
00337 //=============================================================================
00338 void Epetra_LAPACK::TREXC( const char COMPQ, const int N, double * T, const int LDT, double * Q, const int LDQ, int IFST, int ILST, 
00339         double * WORK, int * INFO) const {
00340   DTREXC_F77( CHAR_MACRO(COMPQ), &N, T, &LDT, Q, &LDQ, &IFST, &ILST, WORK, INFO);
00341 }
00342 //=============================================================================
00343 void Epetra_LAPACK::LAMCH( const char CMACH, float & T) const {
00344   T = SLAMCH_F77( CHAR_MACRO(CMACH));
00345 }
00346 //=============================================================================
00347 void Epetra_LAPACK::LAMCH( const char CMACH, double & T) const {
00348   T = DLAMCH_F77( CHAR_MACRO(CMACH));
00349 }
00350 //=============================================================================
00351 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,  
00352         double* A,  const int LDA,  double* B,  const int LDB,
00353                           double* ALPHA,  double* BETA,  double* U,  const int LDU, double* V, const int LDV, double* Q, const int LDQ, double* WORK, int* IWORK,
00354                           int* INFO) const {
00355   DGGSVD_F77(CHAR_MACRO(JOBU), CHAR_MACRO(JOBV), CHAR_MACRO(JOBQ), &M, &N, &P, K, L,  A,  &LDA,  B,  &LDB,
00356        ALPHA,  BETA,  U,  &LDU, V, &LDV, Q, &LDQ, WORK, IWORK, INFO);
00357 }
00358   
00359 //=============================================================================
00360 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,  
00361         float* A,  const int LDA,  float* B,  const int LDB,
00362                           float* ALPHA,  float* BETA,  float* U,  const int LDU, float* V, const int LDV, float* Q, const int LDQ, float* WORK, int* IWORK,
00363                           int* INFO) const {
00364   SGGSVD_F77(CHAR_MACRO(JOBU), CHAR_MACRO(JOBV), CHAR_MACRO(JOBQ), &M, &N, &P, K, L,  A,  &LDA,  B,  &LDB,
00365        ALPHA,  BETA,  U,  &LDU, V, &LDV, Q, &LDQ, WORK, IWORK, INFO);
00366 }
00367   
00368 //=============================================================================
00369 void Epetra_LAPACK::GEEV(const char JOBVL, const char JOBVR, const int N, double* A, const int LDA, double* WR, double* WI, 
00370        double* VL, const int LDVL, double* VR, const int LDVR, double* WORK, const int LWORK, int* INFO) const {
00371 
00372   DGEEV_F77(CHAR_MACRO(JOBVL), CHAR_MACRO(JOBVR), &N, A, &LDA, WR, WI, VL, &LDVL, VR,  &LDVR,
00373       WORK, &LWORK, INFO);
00374 }
00375 //=============================================================================
00376 void Epetra_LAPACK::GEEV(const char JOBVL, const char JOBVR, const int N, float* A, const int LDA, float* WR, float* WI, 
00377        float* VL, const int LDVL, float* VR, const int LDVR, float* WORK, const int LWORK, int* INFO) const {
00378 
00379   SGEEV_F77(CHAR_MACRO(JOBVL), CHAR_MACRO(JOBVR), &N, A, &LDA, WR, WI, VL, &LDVL, VR,  &LDVR,
00380       WORK, &LWORK, INFO);
00381 }
00382 //=============================================================================
00383 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 {
00384 
00385   DSPEV_F77(CHAR_MACRO(JOBZ), CHAR_MACRO(UPLO), &N, AP, W, Z, &LDZ, WORK, INFO);
00386 }
00387 //=============================================================================
00388 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 {
00389 
00390   SSPEV_F77(CHAR_MACRO(JOBZ), CHAR_MACRO(UPLO), &N, AP, W, Z, &LDZ, WORK, INFO);
00391 }
00392 //=============================================================================
00393 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 {
00394 
00395   DSPGV_F77(&ITYPE, CHAR_MACRO(JOBZ), CHAR_MACRO(UPLO), &N, AP, BP, W, Z, &LDZ, WORK, INFO);
00396 }
00397 //=============================================================================
00398 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 {
00399 
00400   SSPGV_F77(&ITYPE, CHAR_MACRO(JOBZ), CHAR_MACRO(UPLO), &N, AP, BP, W, Z, &LDZ, WORK, INFO);
00401 }
00402 //=============================================================================
00403 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{
00404 
00405   DSYEV_F77(CHAR_MACRO(JOBZ), CHAR_MACRO(UPLO), &N, A, &LDA, W, WORK, &LWORK, INFO);
00406 
00407 }
00408 //=============================================================================
00409 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{
00410 
00411   SSYEV_F77(CHAR_MACRO(JOBZ), CHAR_MACRO(UPLO), &N, A, &LDA, W, WORK, &LWORK, INFO);
00412 
00413 }
00414 //=============================================================================
00415 void Epetra_LAPACK::SYEVD(const char JOBZ, const char UPLO,  const int N,  double* A,  const int LDA,  double* W,  double* WORK,  
00416         const int LWORK,  int* IWORK, const int LIWORK, int* INFO) const {
00417 
00418   DSYEVD_F77(CHAR_MACRO(JOBZ), CHAR_MACRO(UPLO), &N, A, &LDA, W, WORK, &LWORK, IWORK, &LIWORK, INFO);
00419 }
00420 //=============================================================================
00421 void Epetra_LAPACK::SYEVD(const char JOBZ, const char UPLO,  const int N,  float* A,  const int LDA,  float* W,  float* WORK,  
00422         const int LWORK,  int* IWORK, const int LIWORK, int* INFO) const {
00423 
00424   SSYEVD_F77(CHAR_MACRO(JOBZ), CHAR_MACRO(UPLO), &N, A, &LDA, W, WORK, &LWORK, IWORK, &LIWORK, INFO);
00425 }
00426 //=============================================================================
00427 void Epetra_LAPACK::SYEVX(const char JOBZ, const char RANGE, const char UPLO,  const int N,  double* A,  const int LDA,  
00428          const double* VL,  const double* VU,  const int* IL,  const int* IU,
00429          const double ABSTOL,  int * M,  double* W,  double* Z,  const int LDZ, double* WORK, 
00430         const int LWORK, int* IWORK, int* IFAIL,
00431         int* INFO) const {
00432 
00433   DSYEVX_F77(CHAR_MACRO(JOBZ), CHAR_MACRO(RANGE), CHAR_MACRO(UPLO), &N,  A,  &LDA,  VL,  VU,  IL,  IU,
00434    &ABSTOL,  M,  W,  Z,  &LDZ, WORK, &LWORK, IWORK, IFAIL, INFO);
00435 }
00436 //=============================================================================
00437 void Epetra_LAPACK::SYEVX(const char JOBZ, const char RANGE, const char UPLO,  const int N,  float* A,  const int LDA,  
00438          const float* VL,  const float* VU,  const int* IL,  const int* IU,
00439          const float ABSTOL,  int * M,  float* W,  float* Z,  const int LDZ, float* WORK, 
00440         const int LWORK, int* IWORK, int* IFAIL,
00441         int* INFO) const {
00442 
00443   SSYEVX_F77(CHAR_MACRO(JOBZ), CHAR_MACRO(RANGE), CHAR_MACRO(UPLO), &N,  A,  &LDA,  VL,  VU,  IL,  IU,
00444    &ABSTOL,  M,  W,  Z,  &LDZ, WORK, &LWORK, IWORK, IFAIL, INFO);
00445 }
00446 //=============================================================================
00447 void Epetra_LAPACK::SYGV(const int ITYPE, const char JOBZ, const char UPLO, const int N, double* A, 
00448        const int LDA, double* B, const int LDB, double* W, double* WORK, const int LWORK, int* INFO) const{
00449 
00450   DSYGV_F77(&ITYPE, CHAR_MACRO(JOBZ), CHAR_MACRO(UPLO), &N, A, &LDA, B, &LDB, W, WORK, &LWORK, INFO);
00451 }
00452 //=============================================================================
00453 void Epetra_LAPACK::SYGV(const int ITYPE, const char JOBZ, const char UPLO, const int N, float* A, 
00454        const int LDA, float* B, const int LDB, float* W, float* WORK, const int LWORK, int* INFO) const{
00455 
00456   SSYGV_F77(&ITYPE, CHAR_MACRO(JOBZ), CHAR_MACRO(UPLO), &N, A, &LDA, B, &LDB, W, WORK, &LWORK, INFO);
00457 }
00458 //=============================================================================
00459 void Epetra_LAPACK::SYGVX(const int ITYPE, const char JOBZ, const char RANGE, const char UPLO, const int N, 
00460        double* A, const int LDA, double* B, const int LDB, const double* VL, const double* VU,
00461        const int* IL, const int* IU, const double ABSTOL, int* M, double* W, double* Z, 
00462        const int LDZ,  double* WORK,  const int LWORK,  int* IWORK,
00463         int* IFAIL, int* INFO) const {
00464 
00465 #ifdef EPETRA_LAPACK3
00466   DSYGVX_F77(&ITYPE, CHAR_MACRO(JOBZ), CHAR_MACRO(RANGE), CHAR_MACRO(UPLO), &N,  A,  &LDA, B, &LDB, VL, VU,
00467        IL, IU, &ABSTOL, M, W, Z, &LDZ,  WORK,  &LWORK,  IWORK,
00468        IFAIL, INFO);
00469 #else
00470 
00471   Epetra_Object obj;
00472   obj.ReportError("SYGVX requires LAPACK Version 3.  Compile Epetra with -DEPETRA_LAPACK3 and link with LAPACK 3 library", -1);
00473 #endif
00474 }
00475 //=============================================================================
00476 void Epetra_LAPACK::SYGVX(const int ITYPE, const char JOBZ, const char RANGE, const char UPLO, const int N, 
00477        float* A, const int LDA, float* B, const int LDB, const float* VL, const float* VU,
00478        const int* IL, const int* IU, const float ABSTOL, int* M, float* W, float* Z, 
00479        const int LDZ,  float* WORK,  const int LWORK,  int* IWORK,
00480         int* IFAIL, int* INFO) const {
00481 
00482 #ifdef EPETRA_LAPACK3
00483   SSYGVX_F77(&ITYPE, CHAR_MACRO(JOBZ), CHAR_MACRO(RANGE), CHAR_MACRO(UPLO), &N,  A,  &LDA, B, &LDB, VL, VU,
00484                           IL, IU, &ABSTOL, M, W, Z, &LDZ,  WORK,  &LWORK,  IWORK,
00485        IFAIL, INFO);
00486 #else
00487 
00488   Epetra_Object obj;
00489   obj.ReportError("SYGVX requires LAPACK Version 3.  Compile Epetra with -DEPETRA_LAPACK3 and link with LAPACK 3 library", -1);
00490 #endif
00491 }
00492 //=============================================================================
00493 void Epetra_LAPACK::SYEVR(const char JOBZ, const char RANGE, const char UPLO,  const int N,  double* A,  const int LDA,  
00494         const double* VL,  const double* VU,  const int *IL,  const int *IU,
00495                           const double ABSTOL,  int* M,  double* W,  double* Z, const int LDZ, int* ISUPPZ, double* WORK, const int LWORK, int* IWORK,
00496                           const int LIWORK, int* INFO) const { 
00497 
00498 #ifdef EPETRA_LAPACK3
00499   DSYEVR_F77(CHAR_MACRO(JOBZ), CHAR_MACRO(RANGE), CHAR_MACRO(UPLO), &N,  A,  &LDA, VL,  VU,  IL,  IU,
00500        &ABSTOL,  M,  W,  Z, &LDZ, ISUPPZ, WORK, &LWORK, IWORK,
00501        &LIWORK, INFO);
00502 #else
00503   Epetra_Object obj;
00504   obj.ReportError("SYEVR requires LAPACK Version 3.  Compile Epetra with -DEPETRA_LAPACK3 and link with LAPACK 3 library", -1);
00505 #endif
00506 }
00507 //=============================================================================
00508 void Epetra_LAPACK::SYEVR(const char JOBZ, const char RANGE, const char UPLO,  const int N,  float* A,  const int LDA,  
00509         const float* VL,  const float* VU,  const int *IL,  const int *IU,
00510                           const float ABSTOL,  int* M,  float* W,  float* Z, const int LDZ, int* ISUPPZ, float* WORK, const int LWORK, int* IWORK,
00511                           const int LIWORK, int* INFO) const { 
00512 
00513 #ifdef EPETRA_LAPACK3
00514   SSYEVR_F77(CHAR_MACRO(JOBZ), CHAR_MACRO(RANGE), CHAR_MACRO(UPLO), &N,  A,  &LDA, VL,  VU,  IL,  IU,
00515        &ABSTOL,  M,  W,  Z, &LDZ, ISUPPZ, WORK, &LWORK, IWORK,
00516        &LIWORK, INFO);
00517 #else
00518   Epetra_Object obj;
00519   obj.ReportError("SYEVR requires LAPACK Version 3.  Compile Epetra with -DEPETRA_LAPACK3 and link with LAPACK 3 library", -1);
00520 #endif
00521 }
00522 //=============================================================================
00523 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,
00524        const int LDVL,  double* VR,  const int LDVR,  int* ILO,  int* IHI,  double* SCALE, double* ABNRM, double* RCONDE,
00525         double* RCONDV, double* WORK, const int LWORK, int* IWORK, int* INFO) const{
00526 
00527   DGEEVX_F77(CHAR_MACRO(BALANC), CHAR_MACRO(JOBVL), CHAR_MACRO(JOBVR), CHAR_MACRO(SENSE), &N, A, &LDA, WR, WI,  VL,
00528        &LDVL,  VR,  &LDVR,  ILO,  IHI,  SCALE, ABNRM, RCONDE,
00529        RCONDV, WORK, &LWORK, IWORK, INFO);
00530 }
00531 //=============================================================================
00532 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,
00533        const int LDVL,  float* VR,  const int LDVR,  int* ILO,  int* IHI,  float* SCALE, float* ABNRM, float* RCONDE,
00534         float* RCONDV, float* WORK, const int LWORK, int* IWORK, int* INFO) const{
00535 
00536   SGEEVX_F77(CHAR_MACRO(BALANC), CHAR_MACRO(JOBVL), CHAR_MACRO(JOBVR), CHAR_MACRO(SENSE), &N, A, &LDA, WR, WI,  VL,
00537        &LDVL,  VR,  &LDVR,  ILO,  IHI,  SCALE, ABNRM, RCONDE,
00538        RCONDV, WORK, &LWORK, IWORK, INFO);
00539 }
00540 //=============================================================================
00541 void Epetra_LAPACK::GESDD(const char JOBZ, const int M, const int N, double* A, const int LDA,  double* S,  
00542         double* U,  const int LDU,  double* VT,  const int LDVT,  double* WORK,
00543         const int LWORK, int* IWORK, int* INFO) const{
00544 
00545 #ifdef EPETRA_LAPACK3
00546   DGESDD_F77(CHAR_MACRO(JOBZ), &M, &N, A, &LDA,  S,  U,  &LDU,  VT,  &LDVT,  WORK,
00547        &LWORK, IWORK, INFO);
00548 #else
00549   Epetra_Object obj;
00550   obj.ReportError("GESDD requires LAPACK Version 3.  Compile Epetra with -DEPETRA_LAPACK3 and link with LAPACK 3 library", -1);
00551 #endif
00552 }
00553 //=============================================================================
00554 void Epetra_LAPACK::GESDD(const char JOBZ, const int M, const int N, float* A, const int LDA,  float* S,  
00555         float* U,  const int LDU,  float* VT,  const int LDVT,  float* WORK,
00556         const int LWORK, int* IWORK, int* INFO) const{
00557 
00558 #ifdef EPETRA_LAPACK3
00559   SGESDD_F77(CHAR_MACRO(JOBZ), &M, &N, A, &LDA,  S,  U,  &LDU,  VT,  &LDVT,  WORK,
00560        &LWORK, IWORK, INFO);
00561 #else
00562   Epetra_Object obj;
00563   obj.ReportError("GESDD requires LAPACK Version 3.  Compile Epetra with -DEPETRA_LAPACK3 and link with LAPACK 3 library", -1);
00564 #endif
00565 }
00566 //=============================================================================
00567 void Epetra_LAPACK::GGEV(const char JOBVL,  const char JOBVR,  const int N,  double* A,  
00568        const int LDA,  double* B, const int LDB, double* ALPHAR, double* ALPHAI,
00569        double* BETA, double* VL, const int LDVL, double* VR, const int 
00570        LDVR, double* WORK, const int LWORK, int* INFO) const{
00571 
00572 #ifdef EPETRA_LAPACK3
00573   DGGEV_F77(CHAR_MACRO(JOBVL), CHAR_MACRO(JOBVR), &N,  A,  &LDA,  B, &LDB, ALPHAR, ALPHAI,
00574       BETA, VL, &LDVL, VR, &LDVR, WORK, &LWORK, INFO);
00575 #else
00576   Epetra_Object obj;
00577   obj.ReportError("GGEV requires LAPACK Version 3.  Compile Epetra with -DEPETRA_LAPACK3 and link with LAPACK 3 library", -1);
00578 #endif
00579 }
00580 //=============================================================================
00581 void Epetra_LAPACK::GGEV(const char JOBVL,  const char JOBVR,  const int N,  float* A,  
00582        const int LDA,  float* B, const int LDB, float* ALPHAR, float* ALPHAI,
00583        float* BETA, float* VL, const int LDVL, float* VR, const int 
00584        LDVR, float* WORK, const int LWORK, int* INFO) const {
00585 
00586 #ifdef EPETRA_LAPACK3
00587   SGGEV_F77(CHAR_MACRO(JOBVL), CHAR_MACRO(JOBVR), &N,  A,  &LDA,  B, &LDB, ALPHAR, ALPHAI,
00588       BETA, VL, &LDVL, VR, &LDVR, WORK, &LWORK, INFO);
00589 #else
00590   Epetra_Object obj;
00591   obj.ReportError("GGEV requires LAPACK Version 3.  Compile Epetra with -DEPETRA_LAPACK3 and link with LAPACK 3 library", -1);
00592 #endif
00593 }
00594 //=============================================================================
00595 void Epetra_LAPACK::GGLSE(const int M, const int N, const int P, double* A, const int LDA, double* B, const int LDB, 
00596         double* C, double* D, double* X, double* WORK, const int LWORK, int* INFO) const{
00597   DGGLSE_F77(&M, &N, &P, A, &LDA, B, &LDB, C, D, X, WORK, &LWORK,  INFO);
00598 }
00599 //=============================================================================
00600 void Epetra_LAPACK::GGLSE(const int M, const int N, const int P, float* A, const int LDA, float* B, const int LDB, 
00601         float* C, float* D, float* X, float* WORK, const int LWORK, int* INFO) const{
00602   SGGLSE_F77(&M, &N, &P, A, &LDA, B, &LDB, C, D, X, WORK, &LWORK,  INFO);
00603 }
00604 
00605 

Generated on Wed May 12 21:41:05 2010 for Epetra Package Browser (Single Doxygen Collection) by  doxygen 1.4.7