1 // @HEADER 2 // *********************************************************************** 3 // 4 // Teuchos: Common Tools Package 5 // Copyright (2004) Sandia Corporation 6 // 7 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive 8 // license for use of this work by or on behalf of the U.S. Government. 9 // 10 // Redistribution and use in source and binary forms, with or without 11 // modification, are permitted provided that the following conditions are 12 // met: 13 // 14 // 1. Redistributions of source code must retain the above copyright 15 // notice, this list of conditions and the following disclaimer. 16 // 17 // 2. Redistributions in binary form must reproduce the above copyright 18 // notice, this list of conditions and the following disclaimer in the 19 // documentation and/or other materials provided with the distribution. 20 // 21 // 3. Neither the name of the Corporation nor the names of the 22 // contributors may be used to endorse or promote products derived from 23 // this software without specific prior written permission. 24 // 25 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY 26 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 27 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 28 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE 29 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 30 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 31 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 32 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 33 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 34 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 35 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 36 // 37 // Questions? Contact Michael A. Heroux (maherou@sandia.gov) 38 // 39 // *********************************************************************** 40 // @HEADER 41 42 #ifndef _TEUCHOS_LAPACK_HPP_ 43 #define _TEUCHOS_LAPACK_HPP_ 44 45 /*! \file Teuchos_LAPACK.hpp 46 \brief Templated interface class to LAPACK routines. 47 */ 48 /** \example LAPACK/cxx_main.cpp 49 This is an example of how to use the Teuchos::LAPACK class. 50 */ 51 52 #include "Teuchos_ConfigDefs.hpp" 53 #include "Teuchos_ScalarTraits.hpp" 54 55 /*! \class Teuchos::LAPACK 56 \brief The Templated LAPACK Wrapper Class. 57 58 The Teuchos::LAPACK class is a wrapper that encapsulates LAPACK 59 (Linear Algebra Package). LAPACK provides portable, high- 60 performance implementations of linear, eigen, SVD, etc solvers. 61 62 The standard LAPACK interface is Fortran-specific. Unfortunately, the 63 interface between C++ and Fortran is not standard across all computer 64 platforms. The Teuchos::LAPACK class provides C++ wrappers for the LAPACK 65 kernels in order to insulate the rest of Teuchos from the details of C++ to Fortran 66 translation. A Teuchos::LAPACK object is essentially nothing, but allows access to 67 the LAPACK wrapper functions. 68 69 Teuchos::LAPACK is a serial interface only. This is appropriate since the standard 70 LAPACK are only specified for serial execution (or shared memory parallel). 71 72 \note 73 <ol> 74 <li>These templates are specialized to use the Fortran LAPACK routines for 75 scalar types \c float and \c double. 76 77 <li>If Teuchos is configured with \c -DTeuchos_ENABLE_COMPLEX:BOOL=ON then these templates 78 are specialized for scalar types \c std::complex<float> and \c std::complex<double> also. 79 80 <li>A short description is given for each method. For more detailed documentation, see the 81 LAPACK website (\c http://www.netlib.org/lapack/ ). 82 </ol> 83 */ 84 85 namespace Teuchos 86 { 87 88 template<class T> 89 struct UndefinedLAPACKRoutine 90 { 91 // This function should not compile if there is an attempt to instantiate! notDefinedTeuchos::UndefinedLAPACKRoutine92 static inline T notDefined() { return T::LAPACK_routine_not_defined_for_this_type(); } 93 }; 94 95 template<typename OrdinalType, typename ScalarType> 96 class LAPACK 97 { 98 public: 99 100 typedef typename Teuchos::ScalarTraits<ScalarType>::magnitudeType MagnitudeType; 101 102 //! @name Constructors/Destructors. 103 //@{ 104 105 //! Default Constructor. LAPACK(void)106 inline LAPACK(void) {} 107 108 //! Copy Constructor. LAPACK(const LAPACK<OrdinalType,ScalarType> & lapack)109 inline LAPACK(const LAPACK<OrdinalType, ScalarType>& lapack) {} 110 111 //! Destructor. ~LAPACK(void)112 inline virtual ~LAPACK(void) {} 113 //@} 114 115 //! @name Symmetric Positive Definite Linear System Routines. 116 //@{ 117 118 //! Computes the \c L*D*L' factorization of a Hermitian/symmetric positive definite tridiagonal matrix \c A. 119 void PTTRF(const OrdinalType& n, ScalarType* d, ScalarType* e, OrdinalType* info) const; 120 121 //! Solves a tridiagonal system \c A*X=B using the \L*D*L' factorization of \c A computed by PTTRF. 122 void PTTRS(const OrdinalType& n, const OrdinalType& nrhs, const ScalarType* d, const ScalarType* e, ScalarType* B, const OrdinalType& ldb, OrdinalType* info) const; 123 124 //! Computes Cholesky factorization of a real symmetric positive definite matrix \c A. 125 void POTRF(const char& UPLO, const OrdinalType& n, ScalarType* A, const OrdinalType& lda, OrdinalType* info) const; 126 127 //! Solves a system of linear equations \c A*X=B, where \c A is a symmetric positive definite matrix factored by POTRF and the \c nrhs solutions are returned in \c B. 128 void POTRS(const char& UPLO, const OrdinalType& n, const OrdinalType& nrhs, const ScalarType* A, const OrdinalType& lda, ScalarType* B, const OrdinalType& ldb, OrdinalType* info) const; 129 130 //! Computes the inverse of a real symmetric positive definite matrix \c A using the Cholesky factorization \c A from POTRF. 131 void POTRI(const char& UPLO, const OrdinalType& n, ScalarType* A, const OrdinalType& lda, OrdinalType* info) const; 132 133 //! Estimates the reciprocal of the condition number (1-norm) of a real symmetric positive definite matrix \c A using the Cholesky factorization from POTRF. 134 135 void POCON(const char& UPLO, const OrdinalType& n, const ScalarType* A, const OrdinalType& lda, const ScalarType& anorm, ScalarType* rcond, ScalarType* WORK, OrdinalType* IWORK, OrdinalType* info) const; 136 137 //! Computes the solution to a real system of linear equations \c A*X=B, where \c A is a symmetric positive definite matrix and the \c nrhs solutions are returned in \c B. 138 void POSV(const char& UPLO, const OrdinalType& n, const OrdinalType& nrhs, ScalarType* A, const OrdinalType& lda, ScalarType* B, const OrdinalType& ldb, OrdinalType* info) const; 139 140 //! Computes row and column scalings intended to equilibrate a symmetric positive definite matrix \c A and reduce its condition number (w.r.t. 2-norm). 141 void POEQU(const OrdinalType& n, const ScalarType* A, const OrdinalType& lda, MagnitudeType* S, MagnitudeType* scond, MagnitudeType* amax, OrdinalType* info) const; 142 143 //! Improves the computed solution to a system of linear equations when the coefficient matrix is symmetric positive definite, and provides error bounds and backward error estimates for the solution. 144 void PORFS(const char& UPLO, const OrdinalType& n, const OrdinalType& nrhs, const ScalarType* A, const OrdinalType& lda, const ScalarType* AF, const OrdinalType& ldaf, const ScalarType* B, const OrdinalType& ldb, ScalarType* X, const OrdinalType& ldx, ScalarType* FERR, ScalarType* BERR, ScalarType* WORK, OrdinalType* IWORK, OrdinalType* info) const; 145 146 //! Uses the Cholesky factorization to compute the solution to a real system of linear equations \c A*X=B, where \c A is symmetric positive definite. System can be equilibrated by POEQU and iteratively refined by PORFS, if requested. 147 void POSVX(const char& FACT, const char& UPLO, const OrdinalType& n, const OrdinalType& nrhs, ScalarType* A, const OrdinalType& lda, ScalarType* AF, const OrdinalType& ldaf, char* EQUED, ScalarType* S, ScalarType* B, const OrdinalType& ldb, ScalarType* X, const OrdinalType& ldx, ScalarType* rcond, ScalarType* FERR, ScalarType* BERR, ScalarType* WORK, OrdinalType* IWORK, OrdinalType* info) const; 148 //@} 149 150 //! @name General Linear System Routines. 151 //@{ 152 153 //! Solves an over/underdetermined real \c m by \c n linear system \c A using QR or LQ factorization of A. 154 void GELS(const char& TRANS, const OrdinalType& m, const OrdinalType& n, const OrdinalType& nrhs, ScalarType* A, const OrdinalType& lda, ScalarType* B, const OrdinalType& ldb, ScalarType* WORK, const OrdinalType& lwork, OrdinalType* info) const; 155 156 /// \brief Use the SVD to solve a possibly rank-deficient linear least-squares problem. 157 /// 158 /// GELSS uses the singular value decomposition (SVD) to compute 159 /// the minimum-norm solution to a possibly rank-deficient linear 160 /// least-squares problem. The problem may be under- or 161 /// overdetermined. 162 /// 163 /// LAPACK's _GELSS routines take different arguments, depending 164 /// on whether they are for real or complex arithmetic. This is 165 /// because _GELSS imitates the interface of LAPACK's SVD routine. 166 /// LAPACK's SVD routine takes an additional RWORK workspace array 167 /// argument for COMPLEX*8 (CGELSS) and COMPLEX*16 (ZGELSS). 168 /// LAPACK's real SVD routines (SGELSS and DGELSS) do not take the 169 /// RWORK argument. 170 /// 171 /// This class had already exposed GELSS for ScalarType = float 172 /// and double that does <i>not</i> include an RWORK argument. 173 /// Backwards compatibility requirements prevent us from simply 174 /// changing that interface. We could provide a different 175 /// interface for LAPACK specializations with ScalarType = 176 /// std::complex<T>, but that would make the GELSS interface not 177 /// generic at compile time. This would make using GELSS in 178 /// generic code harder (for example, you would need to specialize 179 /// code that <i>uses</i> GELSS on a Boolean, which specifies 180 /// whether ScalarType is complex). 181 /// 182 /// We fix this problem by providing an overloaded generic GELSS 183 /// interface that does take an RWORK argument. This does not 184 /// change the existing interface, but provides the additional 185 /// capability to solve complex-valued least-squares problems. 186 /// The RWORK argument is ignored when ScalarType is real, and may 187 /// therefore be set to NULL in that case. 188 /// 189 void GELSS(const OrdinalType& m, const OrdinalType& n, const OrdinalType& nrhs, ScalarType* A, const OrdinalType& lda, ScalarType* B, const OrdinalType& ldb, MagnitudeType* S, const MagnitudeType rcond, OrdinalType* rank, ScalarType* WORK, const OrdinalType& lwork, MagnitudeType* RWORK, OrdinalType* info) const; 190 191 //! Legacy GELSS interface for real-valued ScalarType. 192 void GELSS(const OrdinalType& m, const OrdinalType& n, const OrdinalType& nrhs, ScalarType* A, const OrdinalType& lda, ScalarType* B, const OrdinalType& ldb, ScalarType* S, const ScalarType& rcond, OrdinalType* rank, ScalarType* WORK, const OrdinalType& lwork, OrdinalType* info) const; 193 194 //! Solves the linear equality-constrained least squares (LSE) problem where \c A is an \c m by \c n matrix,\c B is a \c p by \c n matrix \c C is a given \c m-vector, and D is a given \c p-vector. 195 void GGLSE(const OrdinalType& m, const OrdinalType& n, const OrdinalType& p, ScalarType* A, const OrdinalType& lda, ScalarType* B, const OrdinalType& ldb, ScalarType* C, ScalarType* D, ScalarType* X, ScalarType* WORK, const OrdinalType& lwork, OrdinalType* info) const; 196 197 //! Computes a QR factorization of a general \c m by \c n matrix \c A. 198 void GEQRF (const OrdinalType& m, const OrdinalType& n, ScalarType* A, const OrdinalType& lda, ScalarType* TAU, ScalarType* WORK, const OrdinalType& lwork, OrdinalType* info) const; 199 200 //! BLAS 2 version of GEQRF, with known workspace size. 201 void GEQR2 (const OrdinalType& m, const OrdinalType& n, ScalarType A[], const OrdinalType& lda, ScalarType TAU[], ScalarType WORK[], OrdinalType* const info) const; 202 203 //! Computes an LU factorization of a general \c m by \c n matrix \c A using partial pivoting with row interchanges. 204 void GETRF(const OrdinalType& m, const OrdinalType& n, ScalarType* A, const OrdinalType& lda, OrdinalType* IPIV, OrdinalType* info) const; 205 206 //! Solves a system of linear equations \c A*X=B or \c A'*X=B with a general \c n by \c n matrix \c A using the LU factorization computed by GETRF. 207 void GETRS(const char& TRANS, const OrdinalType& n, const OrdinalType& nrhs, const ScalarType* A, const OrdinalType& lda, const OrdinalType* IPIV, ScalarType* B, const OrdinalType& ldb, OrdinalType* info) const; 208 209 //! Multiplies the \c m by \c n matrix \c A by the real scalar \c cto/cfrom. 210 void LASCL(const char& TYPE, const OrdinalType& kl, const OrdinalType& ku, const MagnitudeType cfrom, const MagnitudeType cto, const OrdinalType& m, const OrdinalType& n, ScalarType* A, const OrdinalType& lda, OrdinalType* info) const; 211 212 //! Computes a QR factorization with column pivoting of a matrix \c A: A*P = Q*R using Level 3 BLAS 213 void 214 GEQP3(const OrdinalType& m, 215 const OrdinalType& n, ScalarType* A, 216 const OrdinalType& lda, 217 OrdinalType* jpvt, 218 ScalarType* TAU, 219 ScalarType* WORK, 220 const OrdinalType& lwork, 221 MagnitudeType* RWORK, 222 OrdinalType* info ) const; 223 224 //! Apply a series of row interchanges to the matrix A. 225 void 226 LASWP (const OrdinalType& N, 227 ScalarType A[], 228 const OrdinalType& LDA, 229 const OrdinalType& K1, 230 const OrdinalType& K2, 231 const OrdinalType IPIV[], 232 const OrdinalType& INCX) const; 233 234 //! Computes an LU factorization of a general banded \c m by \c n matrix \c A using partial pivoting with row interchanges. 235 void GBTRF(const OrdinalType& m, const OrdinalType& n, const OrdinalType& kl, const OrdinalType& ku, ScalarType* A, const OrdinalType& lda, OrdinalType* IPIV, OrdinalType* info) const; 236 237 //! Solves a system of linear equations \c A*X=B or \c A'*X=B with a general banded \c n by \c n matrix \c A using the LU factorization computed by GBTRF. 238 void GBTRS(const char& TRANS, const OrdinalType& n, const OrdinalType& kl, const OrdinalType& ku, const OrdinalType& nrhs, const ScalarType* A, const OrdinalType& lda, const OrdinalType* IPIV, ScalarType* B, const OrdinalType& ldb, OrdinalType* info) const; 239 240 //! Computes an LU factorization of a \c n by \c n tridiagonal matrix \c A using partial pivoting with row interchanges. 241 void GTTRF(const OrdinalType& n, ScalarType* dl, ScalarType* d, ScalarType* du, ScalarType* du2, OrdinalType* IPIV, OrdinalType* info) const; 242 243 //! Solves a system of linear equations \c A*X=B or \c A'*X=B or \c A^H*X=B with a tridiagonal matrix \c A using the LU factorization computed by GTTRF. 244 void GTTRS(const char& TRANS, const OrdinalType& n, const OrdinalType& nrhs, const ScalarType* dl, const ScalarType* d, const ScalarType* du, const ScalarType* du2, const OrdinalType* IPIV, ScalarType* B, const OrdinalType& ldb, OrdinalType* info) const; 245 246 //! Computes the inverse of a matrix \c A using the LU factorization computed by GETRF. 247 void GETRI(const OrdinalType& n, ScalarType* A, const OrdinalType& lda, const OrdinalType* IPIV, ScalarType* WORK, const OrdinalType& lwork, OrdinalType* info) const; 248 249 /// \brief Robustly solve a possibly singular triangular linear system. 250 /// 251 /// \note This routine is slower than the BLAS' TRSM, but can 252 /// detect possible singularity of A. 253 void 254 LATRS (const char& UPLO, 255 const char& TRANS, 256 const char& DIAG, 257 const char& NORMIN, 258 const OrdinalType& N, 259 ScalarType* A, 260 const OrdinalType& LDA, 261 ScalarType* X, 262 MagnitudeType* SCALE, 263 MagnitudeType* CNORM, 264 OrdinalType* INFO) const; 265 266 //! Estimates the reciprocal of the condition number of a general real matrix \c A, in either the 1-norm or the infinity-norm, using the LU factorization computed by GETRF. 267 void GECON(const char& NORM, const OrdinalType& n, const ScalarType* A, const OrdinalType& lda, const ScalarType& anorm, ScalarType* rcond, ScalarType* WORK, OrdinalType* IWORK, OrdinalType* info) const; 268 269 //! Estimates the reciprocal of the condition number of a general banded real matrix \c A, in either the 1-norm or the infinity-norm, using the LU factorization computed by GETRF. 270 void GBCON(const char& NORM, const OrdinalType& n, const OrdinalType& kl, const OrdinalType& ku, const ScalarType* A, const OrdinalType& lda, OrdinalType* IPIV, const ScalarType& anorm, ScalarType* rcond, ScalarType* WORK, OrdinalType* IWORK, OrdinalType* info) const; 271 272 //! Returns the value of the one norm, or the Frobenius norm, or the infinity norm, or the element of largest absolute value of an \c n by \c n band matrix \c A, with \c kl sub-diagonals and \c ku super-diagonals. 273 typename ScalarTraits<ScalarType>::magnitudeType LANGB(const char& NORM, const OrdinalType& n, const OrdinalType& kl, const OrdinalType& ku, const ScalarType* A, const OrdinalType& lda, MagnitudeType* WORK) const; 274 275 //! Computes the solution to a real system of linear equations \c A*X=B, where \c A is factored through GETRF and the \c nrhs solutions are computed through GETRS. 276 void GESV(const OrdinalType& n, const OrdinalType& nrhs, ScalarType* A, const OrdinalType& lda, OrdinalType* IPIV, ScalarType* B, const OrdinalType& ldb, OrdinalType* info) const; 277 278 //! Computes row and column scalings intended to equilibrate an \c m by \c n matrix \c A and reduce its condition number. 279 void GEEQU(const OrdinalType& m, const OrdinalType& n, const ScalarType* A, const OrdinalType& lda, ScalarType* R, ScalarType* C, ScalarType* rowcond, ScalarType* colcond, ScalarType* amax, OrdinalType* info) const; 280 281 //! Improves the computed solution to a system of linear equations and provides error bounds and backward error estimates for the solution. Use after GETRF/GETRS. 282 void GERFS(const char& TRANS, const OrdinalType& n, const OrdinalType& nrhs, const ScalarType* A, const OrdinalType& lda, const ScalarType* AF, const OrdinalType& ldaf, const OrdinalType* IPIV, const ScalarType* B, const OrdinalType& ldb, ScalarType* X, const OrdinalType& ldx, ScalarType* FERR, ScalarType* BERR, ScalarType* WORK, OrdinalType* IWORK, OrdinalType* info) const; 283 284 //! Computes row and column scalings intended to equilibrate an \c m by \c n banded matrix \c A and reduce its condition number. 285 void GBEQU(const OrdinalType& m, const OrdinalType& n, const OrdinalType& kl, const OrdinalType& ku, const ScalarType* A, const OrdinalType& lda, MagnitudeType* R, MagnitudeType* C, MagnitudeType* rowcond, MagnitudeType* colcond, MagnitudeType* amax, OrdinalType* info) const; 286 287 //! Improves the computed solution to a banded system of linear equations and provides error bounds and backward error estimates for the solution. Use after GBTRF/GBTRS. 288 void GBRFS(const char& TRANS, const OrdinalType& n, const OrdinalType& kl, const OrdinalType& ku, const OrdinalType& nrhs, const ScalarType* A, const OrdinalType& lda, const ScalarType* AF, const OrdinalType& ldaf, const OrdinalType* IPIV, const ScalarType* B, const OrdinalType& ldb, ScalarType* X, const OrdinalType& ldx, ScalarType* FERR, ScalarType* BERR, ScalarType* WORK, OrdinalType* IWORK, OrdinalType* info) const; 289 290 //! Uses the LU factorization to compute the solution to a real system of linear equations \c A*X=B, returning error bounds on the solution and a condition estimate. 291 292 void GESVX(const char& FACT, const char& TRANS, const OrdinalType& n, const OrdinalType& nrhs, ScalarType* A, const OrdinalType& lda, ScalarType* AF, const OrdinalType& ldaf, OrdinalType* IPIV, char* EQUED, ScalarType* R, ScalarType* C, ScalarType* B, const OrdinalType& ldb, ScalarType* X, const OrdinalType& ldx, ScalarType* rcond, ScalarType* FERR, ScalarType* BERR, ScalarType* WORK, OrdinalType* IWORK, OrdinalType* info) const; 293 294 /*! \brief Reduces a real symmetric matrix \c A to tridiagonal form by orthogonal similarity transformations. 295 \note This method is not defined when the ScalarType is \c std::complex<float> or \c std::complex<double>. 296 */ 297 void SYTRD(const char& UPLO, const OrdinalType& n, ScalarType* A, const OrdinalType& lda, ScalarType* D, ScalarType* E, ScalarType* TAU, ScalarType* WORK, const OrdinalType& lwork, OrdinalType* info) const; 298 299 //! Reduces a real general matrix \c A to upper Hessenberg form by orthogonal similarity transformations. 300 void GEHRD(const OrdinalType& n, const OrdinalType& ilo, const OrdinalType& ihi, ScalarType* A, const OrdinalType& lda, ScalarType* TAU, ScalarType* WORK, const OrdinalType& lwork, OrdinalType* info) const; 301 302 //! Solves a triangular linear system of the form \c A*X=B or \c A**T*X=B, where \c A is a triangular matrix. 303 void TRTRS(const char& UPLO, const char& TRANS, const char& DIAG, const OrdinalType& n, const OrdinalType& nrhs, const ScalarType* A, const OrdinalType& lda, ScalarType* B, const OrdinalType& ldb, OrdinalType* info) const; 304 305 //! Computes the inverse of an upper or lower triangular matrix \c A. 306 void TRTRI(const char& UPLO, const char& DIAG, const OrdinalType& n, const ScalarType* A, const OrdinalType& lda, OrdinalType* info) const; 307 //@} 308 309 //! @name Symmetric Eigenproblem Routines 310 //@{ 311 /*! \brief Computes the eigenvalues and, optionally, eigenvectors of a symmetric \c n by \c n matrix \c A in packed storage. 312 \note This method is not defined when the ScalarType is \c std::complex<float> or \c std::complex<double>. 313 */ 314 void SPEV(const char& JOBZ, const char& UPLO, const OrdinalType& n, ScalarType* AP, ScalarType* W, ScalarType* Z, const OrdinalType& ldz, ScalarType* WORK, OrdinalType* info) const; 315 316 /*! \brief Computes all the eigenvalues and, optionally, eigenvectors of a symmetric \c n by \c n matrix A. 317 \note This method is not defined when the ScalarType is \c std::complex<float> or \c std::complex<double>. 318 */ 319 void SYEV(const char& JOBZ, const char& UPLO, const OrdinalType& n, ScalarType* A, const OrdinalType& lda, ScalarType* W, ScalarType* WORK, const OrdinalType& lwork, OrdinalType* info) const; 320 321 /*! \brief Computes all the eigenvalues and, optionally, eigenvectors of a symmetric \c n by \c n matrix pencil \c {A,B}, where \c A is symmetric and \c B is symmetric positive-definite. 322 \note This method is not defined when the ScalarType& is \c std::complex<float> or \c std::complex<double>. 323 */ 324 void SYGV(const OrdinalType& itype, const char& JOBZ, const char& UPLO, const OrdinalType& n, ScalarType* A, const OrdinalType& lda, ScalarType* B, const OrdinalType& ldb, ScalarType* W, ScalarType* WORK, const OrdinalType& lwork, OrdinalType* info) const; 325 326 /*! \brief Computes all the eigenvalues and, optionally, eigenvectors of a Hermitian \c n by \c n matrix A. 327 \note This method will call SYEV when ScalarType is \c float or \c double. 328 */ 329 void HEEV(const char& JOBZ, const char& UPLO, const OrdinalType& n, ScalarType* A, const OrdinalType& lda, MagnitudeType* W, ScalarType* WORK, const OrdinalType& lwork, MagnitudeType* RWORK, OrdinalType* info) const; 330 331 /*! \brief Computes all the eigenvalues and, optionally, eigenvectors of a generalized Hermitian-definite \c n by \c n matrix pencil \c {A,B}, where \c A is Hermitian and \c B is Hermitian positive-definite. 332 \note This method will call SYGV when ScalarType& is \c float or \c double. 333 */ 334 void HEGV(const OrdinalType& itype, const char& JOBZ, const char& UPLO, const OrdinalType& n, ScalarType* A, const OrdinalType& lda, ScalarType* B, const OrdinalType& ldb, MagnitudeType* W, ScalarType* WORK, const OrdinalType& lwork, MagnitudeType *RWORK, OrdinalType* info) const; 335 336 //! Computes the eigenvalues and, optionally, eigenvectors of a symmetric tridiagonal \c n by \c n matrix \c A using implicit QL/QR. The eigenvectors can only be computed if \c A was reduced to tridiagonal form by SYTRD. 337 void STEQR(const char& COMPZ, const OrdinalType& n, MagnitudeType* D, MagnitudeType* E, ScalarType* Z, const OrdinalType& ldz, MagnitudeType* WORK, OrdinalType* info) const; 338 339 //! Computes the eigenvalues and, optionally, eigenvectors of a symmetric positive-definite tridiagonal \c n by \c n matrix \c A using BDSQR, after factoring the matrix with PTTRF. 340 void PTEQR(const char& COMPZ, const OrdinalType& n, MagnitudeType* D, MagnitudeType* E, ScalarType* Z, const OrdinalType& ldz, MagnitudeType* WORK, OrdinalType* info) const; 341 //@} 342 343 //! @name Non-Hermitian Eigenproblem Routines 344 //@{ 345 //! Computes the eigenvalues of a real upper Hessenberg matrix \c H and, optionally, the matrices \c T and \c Z from the Schur decomposition, where T is an upper quasi-triangular matrix and Z contains the Schur vectors. 346 void HSEQR(const char& JOB, const char& COMPZ, const OrdinalType& n, const OrdinalType& ilo, const OrdinalType& ihi, ScalarType* H, const OrdinalType& ldh, ScalarType* WR, ScalarType* WI, ScalarType* Z, const OrdinalType& ldz, ScalarType* WORK, const OrdinalType& lwork, OrdinalType* info) const; 347 348 /*! Computes for an \c n by \c n nonsymmetric matrix \c A, the eigenvalues, the Schur form \c T, and, optionally, the matrix of Schur vectors \c Z. When \c ScalarType is \c float or \c double, the real Schur form is computed. 349 \note (This is the version used for \c float& and \c double, where \c select requires two arguments to represent a complex eigenvalue.) 350 */ 351 void GEES(const char& JOBVS, const char& SORT, OrdinalType& (*ptr2func)(ScalarType*, ScalarType*), const OrdinalType& n, ScalarType* A, const OrdinalType& lda, OrdinalType* sdim, ScalarType* WR, ScalarType* WI, ScalarType* VS, const OrdinalType& ldvs, ScalarType* WORK, const OrdinalType& lwork, OrdinalType* BWORK, OrdinalType* info) const; 352 353 /*! Computes for an \c n by \c n nonsymmetric matrix \c A, the eigenvalues, the Schur form \c T, and, optionally, the matrix of Schur vectors \c Z. When \c ScalarType is \c float or \c double, the real Schur form is computed. 354 \note (This is the version used for \c std::complex<float> and \c std::complex<double>, where \c select requires one arguments to represent a complex eigenvalue.) 355 */ 356 void GEES(const char& JOBVS, const char& SORT, OrdinalType& (*ptr2func)(ScalarType*), const OrdinalType& n, ScalarType* A, const OrdinalType& lda, OrdinalType* sdim, ScalarType* W, ScalarType* VS, const OrdinalType& ldvs, ScalarType* WORK, const OrdinalType& lwork, MagnitudeType* RWORK, OrdinalType* BWORK, OrdinalType* info) const; 357 358 /*! Computes for an \c n by \c n nonsymmetric matrix \c A, the eigenvalues, the Schur form \c T, and, optionally, the matrix of Schur vectors \c Z. When \c ScalarType is \c float or \c double, the real Schur form is computed. 359 \note (This is the version used for any \c ScalarType, when the user doesn't want to enable the sorting functionality.) 360 */ 361 void GEES(const char& JOBVS, const OrdinalType& n, ScalarType* A, const OrdinalType& lda, OrdinalType* sdim, MagnitudeType* WR, MagnitudeType* WI, ScalarType* VS, const OrdinalType& ldvs, ScalarType* WORK, const OrdinalType& lwork, MagnitudeType* RWORK, OrdinalType* BWORK, OrdinalType* info) const; 362 363 /// \brief Computes for an \c n by \c n real nonsymmetric matrix \c A, the eigenvalues and, optionally, the left and/or right eigenvectors. 364 /// 365 /// Real and imaginary parts of the eigenvalues are returned in 366 /// separate arrays, WR for real and WI for complex. The RWORK 367 /// array is only referenced if ScalarType is complex. 368 void GEEV(const char& JOBVL, const char& JOBVR, const OrdinalType& n, ScalarType* A, const OrdinalType& lda, MagnitudeType* WR, MagnitudeType* WI, ScalarType* VL, const OrdinalType& ldvl, ScalarType* VR, const OrdinalType& ldvr, ScalarType* WORK, const OrdinalType& lwork, MagnitudeType* RWORK, OrdinalType* info) const; 369 370 /*! Computes for an \c n by \c n real nonsymmetric matrix \c A, the eigenvalues and, optionally, the left and/or right eigenvectors. 371 Optionally, it can compute a balancing transformation to improve the conditioning of the eigenvalues and eigenvectors. 372 \note (This is the function is only defined for \c ScalarType& = \c float& or \c double.) 373 */ 374 void GEEVX(const char& BALANC, const char& JOBVL, const char& JOBVR, const char& SENSE, const OrdinalType& n, ScalarType* A, const OrdinalType& lda, ScalarType* WR, ScalarType* WI, ScalarType* VL, const OrdinalType& ldvl, ScalarType* VR, const OrdinalType& ldvr, OrdinalType* ilo, OrdinalType* ihi, MagnitudeType* SCALE, MagnitudeType* abnrm, MagnitudeType* RCONDE, MagnitudeType* RCONDV, ScalarType* WORK, const OrdinalType& lwork, OrdinalType* IWORK, OrdinalType* info) const; 375 376 /*! Computes for a pair of \c n by \c n nonsymmetric matrices (\c A,\c B) the generalized eigenvalues, and optionally, the left and/or right generalized eigenvectors. 377 Optionally, it can compute a balancing transformation to improve the conditioning of the eigenvalues and eigenvectors. 378 \note (This is the function is only defined for \c ScalarType = \c float or \c double.) 379 */ 380 void GGEVX(const char& BALANC, const char& JOBVL, const char& JOBVR, const char& SENSE, const OrdinalType& n, ScalarType* A, const OrdinalType& lda, ScalarType* B, const OrdinalType& ldb, MagnitudeType* ALPHAR, MagnitudeType* ALPHAI, ScalarType* BETA, ScalarType* VL, const OrdinalType& ldvl, ScalarType* VR, const OrdinalType& ldvr, OrdinalType* ilo, OrdinalType* ihi, MagnitudeType* lscale, MagnitudeType* rscale, MagnitudeType* abnrm, MagnitudeType* bbnrm, MagnitudeType* RCONDE, MagnitudeType* RCONDV, ScalarType* WORK, const OrdinalType& lwork, OrdinalType* IWORK, OrdinalType* BWORK, OrdinalType* info) const; 381 382 /*! Computes for a pair of \c n by \c n nonsymmetric matrices (\c A,\c B) the generalized eigenvalues, and optionally, the left and/or right generalized eigenvectors. 383 \note (This is the function is only defined for \c ScalarType = \c float or \c double.) 384 */ 385 void GGEV(const char& JOBVL, const char& JOBVR, const OrdinalType& n, ScalarType* A, const OrdinalType& lda, ScalarType* B, const OrdinalType& ldb, MagnitudeType *ALPHAR, MagnitudeType *ALPHAI, ScalarType* BETA, ScalarType* VL, const OrdinalType& ldvl, ScalarType* VR, const OrdinalType& ldvr, ScalarType* WORK, const OrdinalType& lwork, OrdinalType* info) const; 386 387 388 /*! Reorders the real Schur factorization of a real matrix so that a selected cluster of eigenvalues appears in the leading diagonal blocks of the upper quasi-triangular matrix \c T, and the leading columns of \c Q form an orthonormal basis of the corresponding right invariant subspace. 389 \note (This function is only defined for \c ScalarType = \c float or \c double.) 390 */ 391 void TRSEN(const char& JOB, const char& COMPQ, const OrdinalType* SELECT, const OrdinalType& n, ScalarType* T, const OrdinalType& ldt, ScalarType* Q, const OrdinalType& ldq, MagnitudeType *WR, MagnitudeType *WI, OrdinalType* M, ScalarType* S, MagnitudeType *SEP, ScalarType* WORK, const OrdinalType& lwork, OrdinalType* IWORK, const OrdinalType& liwork, OrdinalType* info ) const; 392 393 394 /*! Reorders the generalized real Schur decomposition of a real matrix pair (\c A, \c B), so that a selected cluster of eigenvalues appears in the leading diagonal blocks of the upper quasi-triangular matrix \c A and the upper triangular \c B. 395 \note (This function is only defined for \c ScalarType = \c float or \c double.) 396 */ 397 void TGSEN(const OrdinalType& ijob, const OrdinalType& wantq, const OrdinalType& wantz, const OrdinalType* SELECT, const OrdinalType& n, ScalarType* A, const OrdinalType& lda, ScalarType* B, const OrdinalType& ldb, MagnitudeType *ALPHAR, MagnitudeType *ALPHAI, MagnitudeType *BETA, ScalarType* Q, const OrdinalType& ldq, ScalarType* Z, const OrdinalType& ldz, OrdinalType* M, MagnitudeType *PL, MagnitudeType *PR, MagnitudeType *DIF, ScalarType* WORK, const OrdinalType& lwork, OrdinalType* IWORK, const OrdinalType& liwork, OrdinalType* info ) const; 398 399 400 /*! Computes for a pair of \c n by \c n nonsymmetric matrices (\c A,\c B) the generalized eigenvalues, the generalized real Schur form (\c S,\c T), optionally, the left and/or right matrices of Schur vectors. 401 \note (This is the function is only defined for \c ScalarType = \c float or \c double.) 402 */ 403 void GGES(const char& JOBVL, const char& JOBVR, const char& SORT, OrdinalType& (*ptr2func)(ScalarType* , ScalarType* , ScalarType* ), const OrdinalType& n, ScalarType* A, const OrdinalType& lda, ScalarType* B, const OrdinalType& ldb, OrdinalType* sdim, MagnitudeType *ALPHAR, MagnitudeType *ALPHAI, MagnitudeType *BETA, ScalarType* VL, const OrdinalType& ldvl, ScalarType* VR, const OrdinalType& ldvr, ScalarType* WORK, const OrdinalType& lwork, OrdinalType* BWORK, OrdinalType* info ) const; 404 405 //@} 406 407 408 //! @name Singular Value Decompositon Routines 409 //@{ 410 //! Computes the singular values (and optionally, vectors) of a real matrix \c A. 411 void GESVD(const char& JOBU, const char& JOBVT, const OrdinalType& m, const OrdinalType& n, ScalarType* A, const OrdinalType& lda, MagnitudeType* S, ScalarType* U, const OrdinalType& ldu, ScalarType* V, const OrdinalType& ldv, ScalarType* WORK, const OrdinalType& lwork, MagnitudeType* RWORK, OrdinalType* info) const; 412 //@} 413 414 415 //! @name Orthogonal matrix routines 416 //@{ 417 418 /// Apply Householder reflectors (real case). 419 /// 420 /// Overwrite the general real \c m by \c n matrix \c C with the 421 /// product of \c Q and \c C, whiere Q is the product of \c k 422 /// elementary (Householder) reflectors as returned by GEQRF. 423 /// 424 /// \note This method is not defined when ScalarType is complex. 425 /// Call UNMQR in that case. ("OR" stands for "orthogonal"; 426 /// "UN" stands for "unitary.") 427 void ORMQR(const char& SIDE, const char& TRANS, const OrdinalType& m, const OrdinalType& n, const OrdinalType& k, ScalarType* A, const OrdinalType& lda, const ScalarType* TAU, ScalarType* C, const OrdinalType& ldc, ScalarType* WORK, const OrdinalType& lwork, OrdinalType* info) const; 428 429 /// \brief BLAS 2 version of ORMQR; known workspace size. 430 /// 431 /// \note This method is not defined when ScalarType is complex. 432 /// Call UNM2R in that case. ("OR" stands for "orthogonal"; "UN" 433 /// stands for "unitary.") 434 void ORM2R(const char& SIDE, const char& TRANS, const OrdinalType& m, const OrdinalType& n, const OrdinalType& k, const ScalarType A[], const OrdinalType& lda, const ScalarType TAU[], ScalarType C[], const OrdinalType& ldc, ScalarType WORK[], OrdinalType* const info) const; 435 436 /// \brief Apply Householder reflectors (complex case). 437 /// 438 /// Overwrite the general complex \c m by \c n matrix \c C with 439 /// the product of \c Q and \c C, where Q is the product of \c k 440 /// elementary (Householder) reflectors as returned by GEQRF. 441 /// 442 /// \note This method will call ORMQR when ScalarType is real. 443 /// (Unitary real matrices are orthogonal.) 444 void UNMQR(const char& SIDE, const char& TRANS, const OrdinalType& m, const OrdinalType& n, const OrdinalType& k, ScalarType* A, const OrdinalType& lda, const ScalarType* TAU, ScalarType* C, const OrdinalType& ldc, ScalarType* WORK, const OrdinalType& lwork, OrdinalType* info) const; 445 446 /// \brief BLAS 2 version of UNMQR; known workspace size. 447 /// 448 /// \note This method will call ORM2R when ScalarType is real. 449 /// (Unitary real matrices are orthogonal.) 450 void UNM2R(const char& SIDE, const char& TRANS, const OrdinalType& M, const OrdinalType& N, const OrdinalType& K, const ScalarType A[], const OrdinalType& LDA, const ScalarType TAU[], ScalarType C[], const OrdinalType& LDC, ScalarType WORK[], OrdinalType* const INFO) const; 451 452 /// \brief Compute explicit Q factor from QR factorization (GEQRF) (real case). 453 /// 454 /// Generate the \c m by \c n matrix Q with orthonormal columns 455 /// corresponding to the first \c n columns of a product of \c k 456 /// elementary reflectors of order \c m, as returned by \c GEQRF. 457 /// 458 /// \note This method is not defined when ScalarType is complex. 459 /// Call \c UNGQR in that case. ("OR" stands for "orthogonal"; 460 /// "UN" stands for "unitary.") 461 void ORGQR(const OrdinalType& m, const OrdinalType& n, const OrdinalType& k, ScalarType* A, const OrdinalType& lda, const ScalarType* TAU, ScalarType* WORK, const OrdinalType& lwork, OrdinalType* info) const; 462 463 /// \brief Compute explicit QR factor from QR factorization (GEQRF) (complex case). 464 /// 465 /// Generate the \c m by \c n matrix Q with orthonormal columns 466 /// corresponding tothe first \c n columns of a product of \c k 467 /// elementary reflectors of order \c m, as returned by \c GEQRF. 468 /// 469 /// \note This method will call \c ORGQR when ScalarType is real. 470 /// (Unitary real matrices are orthogonal.) 471 void UNGQR(const OrdinalType& m, const OrdinalType& n, const OrdinalType& k, ScalarType* A, const OrdinalType& lda, const ScalarType* TAU, ScalarType* WORK, const OrdinalType& lwork, OrdinalType* info) const; 472 473 /*! \brief Generates a real orthogonal matrix \c Q which is the product of \c ihi-ilo elementary reflectors of order \c n, as returned by GEHRD. On return \c Q is stored in \c A. 474 \note This method is not defined when ScalarType is complex. 475 */ 476 void ORGHR(const OrdinalType& n, const OrdinalType& ilo, const OrdinalType& ihi, ScalarType* A, const OrdinalType& lda, const ScalarType* TAU, ScalarType* WORK, const OrdinalType& lwork, OrdinalType* info) const; 477 478 /*! \brief Overwrites the general real \c m by \c n matrix \c C with the product of \c C and \c Q, which is a product of \c ihi-ilo elementary reflectors, as returned by GEHRD. 479 \note This method is not defined when ScalarType is complex. 480 */ 481 void ORMHR(const char& SIDE, const char& TRANS, const OrdinalType& m, const OrdinalType& n, const OrdinalType& ilo, const OrdinalType& ihi, const ScalarType* A, const OrdinalType& lda, const ScalarType* TAU, ScalarType* C, const OrdinalType& ldc, ScalarType* WORK, const OrdinalType& lwork, OrdinalType* info) const; 482 //@} 483 484 //! @name Triangular Matrix Routines 485 //@{ 486 487 /*! Computes some or all of the right and/or left eigenvectors of an upper triangular matrix \c T. If ScalarType is \c float or \c double, then the matrix is quasi-triangular and arugments \c RWORK is ignored. 488 */ 489 void TREVC(const char& SIDE, const char& HOWMNY, OrdinalType* select, const OrdinalType& n, const ScalarType* T, const OrdinalType& ldt, ScalarType* VL, const OrdinalType& ldvl, ScalarType* VR, const OrdinalType& ldvr, const OrdinalType& mm, OrdinalType* m, ScalarType* WORK, OrdinalType* info) const; 490 491 /*! Computes some or all of the right and/or left eigenvectors of an upper triangular matrix \c T. If ScalarType& is \c float or \c double, then the matrix is quasi-triangular and arugments \c RWORK is ignored. 492 \note (This is the version used for any \c ScalarType, when the user doesn't want to enable the selecting functionality, with HOWMNY='A'.) 493 */ 494 void TREVC(const char& SIDE, const OrdinalType& n, const ScalarType* T, const OrdinalType& ldt, ScalarType* VL, const OrdinalType& ldvl, ScalarType* VR, const OrdinalType& ldvr, const OrdinalType& mm, OrdinalType* m, ScalarType* WORK, MagnitudeType* RWORK, OrdinalType* info) const; 495 496 /*! Reorders the Schur factorization of a matrix \c T via unitary similarity transformations so that the diagonal element of \c T with row index \c ifst is moved to row \c ilst. If \c ScalarType is \c float or \c double, then \c T should be in real Schur form and the operation affects the diagonal block referenced by \c ifst. 497 \note This method will ignore the WORK vector when ScalarType is \c std::complex<float> or \c std::complex<double>. 498 */ 499 void TREXC(const char& COMPQ, const OrdinalType& n, ScalarType* T, const OrdinalType& ldt, ScalarType* Q, const OrdinalType& ldq, OrdinalType* ifst, OrdinalType* ilst, ScalarType* WORK, OrdinalType* info) const; 500 501 /*! Computes some or all of the right and/or left eigenvectors of a pair of real matrices ( \c S, \c P ), where \c S is a quasi-triangular matrix and \c P is upper triangular. 502 \note This method is only defined for \c ScalarType = \c float or \c double. 503 */ 504 void TGEVC(const char& SIDE, const char& HOWMNY, const OrdinalType* SELECT, const OrdinalType& n, ScalarType* S, const OrdinalType& lds, ScalarType* P, const OrdinalType& ldp, ScalarType* VL, const OrdinalType& ldvl, ScalarType* VR, const OrdinalType& ldvr, const OrdinalType& mm, OrdinalType* M, ScalarType* WORK, OrdinalType* info) const; 505 506 507 //@} 508 509 //! @name Rotation/Reflection generators 510 //@{ 511 512 //! Gnerates a plane rotation that zeros out the second component of the input vector. 513 void LARTG( const ScalarType& f, const ScalarType& g, MagnitudeType* c, ScalarType* s, ScalarType* r ) const; 514 515 //! Generates an elementary reflector of order \c n that zeros out the last \c n-1 components of the input vector. 516 void LARFG( const OrdinalType& n, ScalarType* alpha, ScalarType* x, const OrdinalType& incx, ScalarType* tau ) const; 517 518 //@} 519 520 //! @name Matrix Balancing Routines 521 //@{ 522 523 //! Balances a general matrix A, through similarity transformations to make the rows and columns as close in norm as possible. 524 525 void GEBAL(const char& JOBZ, const OrdinalType& n, ScalarType* A, const OrdinalType& lda, OrdinalType* ilo, OrdinalType* ihi, MagnitudeType* scale, OrdinalType* info) const; 526 527 //! Forms the left or right eigenvectors of a general matrix that has been balanced by GEBAL by backward transformation of the computed eigenvectors \c V. 528 void GEBAK(const char& JOBZ, const char& SIDE, const OrdinalType& n, const OrdinalType& ilo, const OrdinalType& ihi, const MagnitudeType* scale , const OrdinalType& m, ScalarType* V, const OrdinalType& ldv, OrdinalType* info) const; 529 530 //@} 531 532 //! @name Random number generators 533 //@{ 534 //! Returns a random number from a uniform or normal distribution. 535 ScalarType LARND( const OrdinalType& idist, OrdinalType* seed ) const; 536 537 //! Returns a vector of random numbers from a chosen distribution. 538 void LARNV( const OrdinalType& idist, OrdinalType* seed, const OrdinalType& n, ScalarType* v ) const; 539 //@} 540 541 //! @name Machine Characteristics Routines. 542 //@{ 543 /*! \brief Determines machine parameters for floating point characteristics. 544 \note This method is not defined when the ScalarType is \c std::complex<float> or \c std::complex<double>. 545 */ 546 ScalarType LAMCH(const char& CMACH) const; 547 548 /*! \brief Chooses problem-dependent parameters for the local environment. 549 \note This method should give parameters for good, but not optimal, performance on many currently 550 available computers. 551 */ 552 OrdinalType ILAENV( const OrdinalType& ispec, const std::string& NAME, const std::string& OPTS, const OrdinalType& N1 = -1, const OrdinalType& N2 = -1, const OrdinalType& N3 = -1, const OrdinalType& N4 = -1 ) const; 553 //@} 554 555 //! @name Miscellaneous Utilities. 556 //@{ 557 /*! \brief Computes x^2 + y^2 safely, to avoid overflow. 558 \note This method is not defined when the ScalarType is \c std::complex<float> or \c std::complex<double>. 559 */ 560 ScalarType LAPY2(const ScalarType& x, const ScalarType& y) const; 561 //@} 562 }; 563 564 // END GENERAL TEMPLATE DECLARATION // 565 566 // BEGIN GENERAL TEMPLATE IMPLEMENTATION // 567 568 569 template<typename OrdinalType, typename ScalarType> PTTRF(const OrdinalType & n,ScalarType * d,ScalarType * e,OrdinalType * info) const570 void LAPACK<OrdinalType, ScalarType>::PTTRF(const OrdinalType& n, ScalarType* d, ScalarType* e, OrdinalType* info) const 571 { 572 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 573 } 574 575 template<typename OrdinalType, typename ScalarType> PTTRS(const OrdinalType & n,const OrdinalType & nrhs,const ScalarType * d,const ScalarType * e,ScalarType * B,const OrdinalType & ldb,OrdinalType * info) const576 void LAPACK<OrdinalType, ScalarType>::PTTRS(const OrdinalType& n, const OrdinalType& nrhs, const ScalarType* d, const ScalarType* e, ScalarType* B, const OrdinalType& ldb, OrdinalType* info) const 577 { 578 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 579 } 580 581 template<typename OrdinalType, typename ScalarType> POTRF(const char & UPLO,const OrdinalType & n,ScalarType * A,const OrdinalType & lda,OrdinalType * info) const582 void LAPACK<OrdinalType, ScalarType>::POTRF(const char& UPLO, const OrdinalType& n, ScalarType* A, const OrdinalType& lda, OrdinalType* info) const 583 { 584 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 585 } 586 587 template<typename OrdinalType, typename ScalarType> POTRS(const char & UPLO,const OrdinalType & n,const OrdinalType & nrhs,const ScalarType * A,const OrdinalType & lda,ScalarType * B,const OrdinalType & ldb,OrdinalType * info) const588 void LAPACK<OrdinalType, ScalarType>::POTRS(const char& UPLO, const OrdinalType& n, const OrdinalType& nrhs, const ScalarType* A, const OrdinalType& lda, ScalarType* B, const OrdinalType& ldb, OrdinalType* info) const 589 { 590 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 591 } 592 593 template<typename OrdinalType, typename ScalarType> POTRI(const char & UPLO,const OrdinalType & n,ScalarType * A,const OrdinalType & lda,OrdinalType * info) const594 void LAPACK<OrdinalType, ScalarType>::POTRI(const char& UPLO, const OrdinalType& n, ScalarType* A, const OrdinalType& lda, OrdinalType* info) const 595 { 596 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 597 } 598 599 template<typename OrdinalType, typename ScalarType> POCON(const char & UPLO,const OrdinalType & n,const ScalarType * A,const OrdinalType & lda,const ScalarType & anorm,ScalarType * rcond,ScalarType * WORK,OrdinalType * IWORK,OrdinalType * info) const600 void LAPACK<OrdinalType, ScalarType>::POCON(const char& UPLO, const OrdinalType& n, const ScalarType* A, const OrdinalType& lda, const ScalarType& anorm, ScalarType* rcond, ScalarType* WORK, OrdinalType* IWORK, OrdinalType* info) const 601 { 602 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 603 } 604 605 template<typename OrdinalType, typename ScalarType> POSV(const char & UPLO,const OrdinalType & n,const OrdinalType & nrhs,ScalarType * A,const OrdinalType & lda,ScalarType * B,const OrdinalType & ldb,OrdinalType * info) const606 void LAPACK<OrdinalType, ScalarType>::POSV(const char& UPLO, const OrdinalType& n, const OrdinalType& nrhs, ScalarType* A, const OrdinalType& lda, ScalarType* B, const OrdinalType& ldb, OrdinalType* info) const 607 { 608 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 609 } 610 611 template<typename OrdinalType, typename ScalarType> POEQU(const OrdinalType & n,const ScalarType * A,const OrdinalType & lda,MagnitudeType * S,MagnitudeType * scond,MagnitudeType * amax,OrdinalType * info) const612 void LAPACK<OrdinalType, ScalarType>::POEQU(const OrdinalType& n, const ScalarType* A, const OrdinalType& lda, MagnitudeType* S, MagnitudeType* scond, MagnitudeType* amax, OrdinalType* info) const 613 { 614 // Test the input parameters 615 *info = 0; 616 if (n < 0) { 617 *info = -1; 618 } else if (lda < TEUCHOS_MAX(1, n)) { 619 *info = -3; 620 } 621 if (*info != 0) { 622 return; 623 } 624 625 ScalarType sZero = ScalarTraits<ScalarType>::zero(); 626 ScalarType sOne = ScalarTraits<ScalarType>::one(); 627 MagnitudeType mZero = ScalarTraits<ScalarType>::magnitude(sZero); 628 MagnitudeType mOne = ScalarTraits<ScalarType>::magnitude(sOne); 629 630 // Quick return 631 if (n == 0) { 632 *scond = mOne; 633 *amax = mZero; 634 return; 635 } 636 637 // Find the minimum and maximum diagonal elements 638 S[0] = ScalarTraits<ScalarType>::magnitude( A[0] ); 639 MagnitudeType smin = S[0]; 640 *amax = S[0]; 641 for (OrdinalType i=0; i<n; ++i) { 642 S[i] = ScalarTraits<ScalarType>::magnitude( A[i*lda + i] ); 643 smin = TEUCHOS_MIN( smin, S[i] ); 644 *amax = TEUCHOS_MAX( *amax, S[i] ); 645 } 646 647 if (smin < mZero) { 648 // Find the first non-positve diagonal element and return an error code 649 for (OrdinalType i=0; i<n; ++i) { 650 if (S[i] < mZero) 651 *info = i; 652 } 653 } else { 654 // Set the scale factors to the reciprocals of the diagonal elements 655 for (OrdinalType i=0; i<n; ++i) { 656 S[i] = mOne / ScalarTraits<ScalarType>::squareroot( S[i] ); 657 } 658 // Compute scond = min(S(i)) / max(S(i)) 659 *scond = ScalarTraits<ScalarType>::squareroot( smin ) / ScalarTraits<ScalarType>::squareroot( *amax ); 660 } 661 } 662 663 template<typename OrdinalType, typename ScalarType> PORFS(const char & UPLO,const OrdinalType & n,const OrdinalType & nrhs,const ScalarType * A,const OrdinalType & lda,const ScalarType * AF,const OrdinalType & ldaf,const ScalarType * B,const OrdinalType & ldb,ScalarType * X,const OrdinalType & ldx,ScalarType * FERR,ScalarType * BERR,ScalarType * WORK,OrdinalType * IWORK,OrdinalType * info) const664 void LAPACK<OrdinalType, ScalarType>::PORFS(const char& UPLO, const OrdinalType& n, const OrdinalType& nrhs, const ScalarType* A, const OrdinalType& lda, const ScalarType* AF, const OrdinalType& ldaf, const ScalarType* B, const OrdinalType& ldb, ScalarType* X, const OrdinalType& ldx, ScalarType* FERR, ScalarType* BERR, ScalarType* WORK, OrdinalType* IWORK, OrdinalType* info) const 665 { 666 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 667 } 668 669 template<typename OrdinalType, typename ScalarType> POSVX(const char & FACT,const char & UPLO,const OrdinalType & n,const OrdinalType & nrhs,ScalarType * A,const OrdinalType & lda,ScalarType * AF,const OrdinalType & ldaf,char * EQUED,ScalarType * S,ScalarType * B,const OrdinalType & ldb,ScalarType * X,const OrdinalType & ldx,ScalarType * rcond,ScalarType * FERR,ScalarType * BERR,ScalarType * WORK,OrdinalType * IWORK,OrdinalType * info) const670 void LAPACK<OrdinalType, ScalarType>::POSVX(const char& FACT, const char& UPLO, const OrdinalType& n, const OrdinalType& nrhs, ScalarType* A, const OrdinalType& lda, ScalarType* AF, const OrdinalType& ldaf, char* EQUED, ScalarType* S, ScalarType* B, const OrdinalType& ldb, ScalarType* X, const OrdinalType& ldx, ScalarType* rcond, ScalarType* FERR, ScalarType* BERR, ScalarType* WORK, OrdinalType* IWORK, OrdinalType* info) const 671 { 672 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 673 } 674 675 template<typename OrdinalType, typename ScalarType> GELS(const char & TRANS,const OrdinalType & m,const OrdinalType & n,const OrdinalType & nrhs,ScalarType * A,const OrdinalType & lda,ScalarType * B,const OrdinalType & ldb,ScalarType * WORK,const OrdinalType & lwork,OrdinalType * info) const676 void LAPACK<OrdinalType,ScalarType>::GELS(const char& TRANS, const OrdinalType& m, const OrdinalType& n, const OrdinalType& nrhs, ScalarType* A, const OrdinalType& lda, ScalarType* B, const OrdinalType& ldb, ScalarType* WORK, const OrdinalType& lwork, OrdinalType* info) const 677 { 678 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 679 } 680 681 template<typename OrdinalType, typename ScalarType> GELSS(const OrdinalType & m,const OrdinalType & n,const OrdinalType & nrhs,ScalarType * A,const OrdinalType & lda,ScalarType * B,const OrdinalType & ldb,MagnitudeType * S,const MagnitudeType rcond,OrdinalType * rank,ScalarType * WORK,const OrdinalType & lwork,MagnitudeType * RWORK,OrdinalType * info) const682 void LAPACK<OrdinalType, ScalarType>::GELSS(const OrdinalType& m, const OrdinalType& n, const OrdinalType& nrhs, ScalarType* A, const OrdinalType& lda, ScalarType* B, const OrdinalType& ldb, MagnitudeType* S, const MagnitudeType rcond, OrdinalType* rank, ScalarType* WORK, const OrdinalType& lwork, MagnitudeType* RWORK, OrdinalType* info) const 683 { 684 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 685 } 686 687 template<typename OrdinalType, typename ScalarType> GELSS(const OrdinalType & m,const OrdinalType & n,const OrdinalType & nrhs,ScalarType * A,const OrdinalType & lda,ScalarType * B,const OrdinalType & ldb,ScalarType * S,const ScalarType & rcond,OrdinalType * rank,ScalarType * WORK,const OrdinalType & lwork,OrdinalType * info) const688 void LAPACK<OrdinalType,ScalarType>::GELSS(const OrdinalType& m, const OrdinalType& n, const OrdinalType& nrhs, ScalarType* A, const OrdinalType& lda, ScalarType* B, const OrdinalType& ldb, ScalarType* S, const ScalarType& rcond, OrdinalType* rank, ScalarType* WORK, const OrdinalType& lwork, OrdinalType* info) const 689 { 690 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 691 } 692 693 template<typename OrdinalType, typename ScalarType> GGLSE(const OrdinalType & m,const OrdinalType & n,const OrdinalType & p,ScalarType * A,const OrdinalType & lda,ScalarType * B,const OrdinalType & ldb,ScalarType * C,ScalarType * D,ScalarType * X,ScalarType * WORK,const OrdinalType & lwork,OrdinalType * info) const694 void LAPACK<OrdinalType,ScalarType>::GGLSE(const OrdinalType& m, const OrdinalType& n, const OrdinalType& p, ScalarType* A, const OrdinalType& lda, ScalarType* B, const OrdinalType& ldb, ScalarType* C, ScalarType* D, ScalarType* X, ScalarType* WORK, const OrdinalType& lwork, OrdinalType* info) const 695 { 696 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 697 } 698 699 template<typename OrdinalType, typename ScalarType> GEQRF(const OrdinalType & m,const OrdinalType & n,ScalarType * A,const OrdinalType & lda,ScalarType * TAU,ScalarType * WORK,const OrdinalType & lwork,OrdinalType * info) const700 void LAPACK<OrdinalType,ScalarType>::GEQRF( const OrdinalType& m, const OrdinalType& n, ScalarType* A, const OrdinalType& lda, ScalarType* TAU, ScalarType* WORK, const OrdinalType& lwork, OrdinalType* info) const 701 { 702 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 703 } 704 705 template<typename OrdinalType, typename ScalarType> GEQR2(const OrdinalType & m,const OrdinalType & n,ScalarType A[],const OrdinalType & lda,ScalarType TAU[],ScalarType WORK[],OrdinalType * const info) const706 void LAPACK<OrdinalType,ScalarType>::GEQR2 (const OrdinalType& m, const OrdinalType& n, ScalarType A[], const OrdinalType& lda, ScalarType TAU[], ScalarType WORK[], OrdinalType* const info) const 707 { 708 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 709 } 710 711 template<typename OrdinalType, typename ScalarType> GETRF(const OrdinalType & m,const OrdinalType & n,ScalarType * A,const OrdinalType & lda,OrdinalType * IPIV,OrdinalType * info) const712 void LAPACK<OrdinalType,ScalarType>::GETRF(const OrdinalType& m, const OrdinalType& n, ScalarType* A, const OrdinalType& lda, OrdinalType* IPIV, OrdinalType* info) const 713 { 714 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 715 } 716 717 template<typename OrdinalType, typename ScalarType> GETRS(const char & TRANS,const OrdinalType & n,const OrdinalType & nrhs,const ScalarType * A,const OrdinalType & lda,const OrdinalType * IPIV,ScalarType * B,const OrdinalType & ldb,OrdinalType * info) const718 void LAPACK<OrdinalType,ScalarType>::GETRS(const char& TRANS, const OrdinalType& n, const OrdinalType& nrhs, const ScalarType* A, const OrdinalType& lda, const OrdinalType* IPIV, ScalarType* B, const OrdinalType& ldb, OrdinalType* info) const 719 { 720 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 721 } 722 723 template<typename OrdinalType, typename ScalarType> LASCL(const char & TYPE,const OrdinalType & kl,const OrdinalType & ku,const MagnitudeType cfrom,const MagnitudeType cto,const OrdinalType & m,const OrdinalType & n,ScalarType * A,const OrdinalType & lda,OrdinalType * info) const724 void LAPACK<OrdinalType,ScalarType>::LASCL(const char& TYPE, const OrdinalType& kl, const OrdinalType& ku, const MagnitudeType cfrom, const MagnitudeType cto, const OrdinalType& m, const OrdinalType& n, ScalarType* A, const OrdinalType& lda, OrdinalType* info) const 725 { 726 MagnitudeType safeMin = ScalarTraits<ScalarType>::sfmin(); 727 ScalarType sZero = ScalarTraits<ScalarType>::zero(); 728 ScalarType sOne = ScalarTraits<ScalarType>::one(); 729 MagnitudeType mZero = ScalarTraits<ScalarType>::magnitude(sZero); 730 MagnitudeType mOne = ScalarTraits<ScalarType>::magnitude(sOne); 731 732 MagnitudeType smlnum = ScalarTraits<ScalarType>::magnitude(safeMin); 733 MagnitudeType bignum = ScalarTraits<ScalarType>::magnitude(sOne/smlnum); 734 735 OrdinalType i, j; 736 ScalarType* ptr; 737 MagnitudeType mul; 738 bool done = false; 739 740 MagnitudeType cfromc = cfrom; 741 MagnitudeType ctoc = cto; 742 MagnitudeType cfrom1; 743 MagnitudeType cto1; 744 745 while (!done) { 746 747 cfrom1 = cfromc*smlnum; 748 if (cfrom1 == cfromc) { 749 // cfromc is an inf. Multiply by a correctly signed zero for finite ctoc, or a NaN if ctoc is infinite. 750 mul = ctoc / cfromc; 751 done = true; 752 cto1 = ctoc; 753 } else { 754 cto1 = ctoc / bignum; 755 if (cto1 == ctoc) { 756 // ctoc is either 0 or an inf. In both cases, ctoc itself serves as the correct multiplication factor. 757 mul = ctoc; 758 done = true; 759 cfromc = mOne; 760 } else if (ScalarTraits<ScalarType>::magnitude(cfrom1) > ScalarTraits<ScalarType>::magnitude(ctoc) && ctoc != mZero) { 761 mul = smlnum; 762 done = false; 763 cfromc = cfrom1; 764 } else if (ScalarTraits<ScalarType>::magnitude(cto1) > ScalarTraits<ScalarType>::magnitude(cfromc)) { 765 mul = bignum; 766 done = false; 767 ctoc = cto1; 768 } else { 769 mul = ctoc / cfromc; 770 done = true; 771 } 772 } 773 774 for (j=0; j<n; j++) { 775 ptr = A + j*lda; 776 for (i=0; i<m; i++) { *ptr = mul * (*ptr); ptr++; } 777 } 778 } 779 780 } 781 782 template<typename OrdinalType, typename ScalarType> 783 void 784 LAPACK<OrdinalType,ScalarType>:: GEQP3(const OrdinalType & m,const OrdinalType & n,ScalarType * A,const OrdinalType & lda,OrdinalType * jpvt,ScalarType * TAU,ScalarType * WORK,const OrdinalType & lwork,MagnitudeType * RWORK,OrdinalType * info) const785 GEQP3 (const OrdinalType& m, 786 const OrdinalType& n, 787 ScalarType* A, 788 const OrdinalType& lda, 789 OrdinalType* jpvt, 790 ScalarType* TAU, 791 ScalarType* WORK, 792 const OrdinalType& lwork, 793 MagnitudeType* RWORK, 794 OrdinalType* info) const 795 { 796 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 797 } 798 799 template<typename OrdinalType, typename ScalarType> 800 void 801 LAPACK<OrdinalType, ScalarType>:: LASWP(const OrdinalType & N,ScalarType A[],const OrdinalType & LDA,const OrdinalType & K1,const OrdinalType & K2,const OrdinalType IPIV[],const OrdinalType & INCX) const802 LASWP (const OrdinalType& N, 803 ScalarType A[], 804 const OrdinalType& LDA, 805 const OrdinalType& K1, 806 const OrdinalType& K2, 807 const OrdinalType IPIV[], 808 const OrdinalType& INCX) const 809 { 810 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 811 } 812 813 template<typename OrdinalType, typename ScalarType> GBTRF(const OrdinalType & m,const OrdinalType & n,const OrdinalType & kl,const OrdinalType & ku,ScalarType * A,const OrdinalType & lda,OrdinalType * IPIV,OrdinalType * info) const814 void LAPACK<OrdinalType,ScalarType>::GBTRF(const OrdinalType& m, const OrdinalType& n, const OrdinalType& kl, const OrdinalType& ku, ScalarType* A, const OrdinalType& lda, OrdinalType* IPIV, OrdinalType* info) const 815 { 816 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 817 } 818 819 template<typename OrdinalType, typename ScalarType> GBTRS(const char & TRANS,const OrdinalType & n,const OrdinalType & kl,const OrdinalType & ku,const OrdinalType & nrhs,const ScalarType * A,const OrdinalType & lda,const OrdinalType * IPIV,ScalarType * B,const OrdinalType & ldb,OrdinalType * info) const820 void LAPACK<OrdinalType,ScalarType>::GBTRS(const char& TRANS, const OrdinalType& n, const OrdinalType& kl, const OrdinalType& ku, const OrdinalType& nrhs, const ScalarType* A, const OrdinalType& lda, const OrdinalType* IPIV, ScalarType* B, const OrdinalType& ldb, OrdinalType* info) const 821 { 822 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 823 } 824 825 template<typename OrdinalType, typename ScalarType> GTTRF(const OrdinalType & n,ScalarType * dl,ScalarType * d,ScalarType * du,ScalarType * du2,OrdinalType * IPIV,OrdinalType * info) const826 void LAPACK<OrdinalType,ScalarType>::GTTRF(const OrdinalType& n, ScalarType* dl, ScalarType* d, ScalarType* du, ScalarType* du2, OrdinalType* IPIV, OrdinalType* info) const 827 { 828 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 829 } 830 831 template<typename OrdinalType, typename ScalarType> GTTRS(const char & TRANS,const OrdinalType & n,const OrdinalType & nrhs,const ScalarType * dl,const ScalarType * d,const ScalarType * du,const ScalarType * du2,const OrdinalType * IPIV,ScalarType * B,const OrdinalType & ldb,OrdinalType * info) const832 void LAPACK<OrdinalType,ScalarType>::GTTRS(const char& TRANS, const OrdinalType& n, const OrdinalType& nrhs, const ScalarType* dl, const ScalarType* d, const ScalarType* du, const ScalarType* du2, const OrdinalType* IPIV, ScalarType* B, const OrdinalType& ldb, OrdinalType* info) const 833 { 834 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 835 } 836 837 template<typename OrdinalType, typename ScalarType> GETRI(const OrdinalType & n,ScalarType * A,const OrdinalType & lda,const OrdinalType * IPIV,ScalarType * WORK,const OrdinalType & lwork,OrdinalType * info) const838 void LAPACK<OrdinalType,ScalarType>::GETRI(const OrdinalType& n, ScalarType* A, const OrdinalType& lda, const OrdinalType* IPIV, ScalarType* WORK, const OrdinalType& lwork, OrdinalType* info) const 839 { 840 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 841 } 842 843 template<typename OrdinalType, typename ScalarType> 844 void 845 LAPACK<OrdinalType,ScalarType>:: LATRS(const char & UPLO,const char & TRANS,const char & DIAG,const char & NORMIN,const OrdinalType & N,ScalarType * A,const OrdinalType & LDA,ScalarType * X,MagnitudeType * SCALE,MagnitudeType * CNORM,OrdinalType * INFO) const846 LATRS (const char& UPLO, 847 const char& TRANS, 848 const char& DIAG, 849 const char& NORMIN, 850 const OrdinalType& N, 851 ScalarType* A, 852 const OrdinalType& LDA, 853 ScalarType* X, 854 MagnitudeType* SCALE, 855 MagnitudeType* CNORM, 856 OrdinalType* INFO) const 857 { 858 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 859 } 860 861 template<typename OrdinalType, typename ScalarType> GECON(const char & NORM,const OrdinalType & n,const ScalarType * A,const OrdinalType & lda,const ScalarType & anorm,ScalarType * rcond,ScalarType * WORK,OrdinalType * IWORK,OrdinalType * info) const862 void LAPACK<OrdinalType,ScalarType>::GECON(const char& NORM, const OrdinalType& n, const ScalarType* A, const OrdinalType& lda, const ScalarType& anorm, ScalarType* rcond, ScalarType* WORK, OrdinalType* IWORK, OrdinalType* info) const 863 { 864 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 865 } 866 867 template<typename OrdinalType, typename ScalarType> GBCON(const char & NORM,const OrdinalType & n,const OrdinalType & kl,const OrdinalType & ku,const ScalarType * A,const OrdinalType & lda,OrdinalType * IPIV,const ScalarType & anorm,ScalarType * rcond,ScalarType * WORK,OrdinalType * IWORK,OrdinalType * info) const868 void LAPACK<OrdinalType,ScalarType>::GBCON(const char& NORM, const OrdinalType& n, const OrdinalType& kl, const OrdinalType& ku, const ScalarType* A, const OrdinalType& lda, OrdinalType* IPIV, const ScalarType& anorm, ScalarType* rcond, ScalarType* WORK, OrdinalType* IWORK, OrdinalType* info) const 869 { 870 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 871 } 872 873 template<typename OrdinalType, typename ScalarType> LANGB(const char & NORM,const OrdinalType & n,const OrdinalType & kl,const OrdinalType & ku,const ScalarType * A,const OrdinalType & lda,MagnitudeType * WORK) const874 typename ScalarTraits<ScalarType>::magnitudeType LAPACK<OrdinalType,ScalarType>::LANGB(const char& NORM, const OrdinalType& n, const OrdinalType& kl, const OrdinalType& ku, const ScalarType* A, const OrdinalType& lda, MagnitudeType* WORK) const 875 { 876 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 877 } 878 879 template<typename OrdinalType, typename ScalarType> GESV(const OrdinalType & n,const OrdinalType & nrhs,ScalarType * A,const OrdinalType & lda,OrdinalType * IPIV,ScalarType * B,const OrdinalType & ldb,OrdinalType * info) const880 void LAPACK<OrdinalType,ScalarType>::GESV(const OrdinalType& n, const OrdinalType& nrhs, ScalarType* A, const OrdinalType& lda, OrdinalType* IPIV, ScalarType* B, const OrdinalType& ldb, OrdinalType* info) const 881 { 882 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 883 } 884 885 template<typename OrdinalType, typename ScalarType> GEEQU(const OrdinalType & m,const OrdinalType & n,const ScalarType * A,const OrdinalType & lda,ScalarType * R,ScalarType * C,ScalarType * rowcond,ScalarType * colcond,ScalarType * amax,OrdinalType * info) const886 void LAPACK<OrdinalType,ScalarType>::GEEQU(const OrdinalType& m, const OrdinalType& n, const ScalarType* A, const OrdinalType& lda, ScalarType* R, ScalarType* C, ScalarType* rowcond, ScalarType* colcond, ScalarType* amax, OrdinalType* info) const 887 { 888 889 // Test the input parameters 890 *info = 0; 891 if (m < 0) { 892 *info = -1; 893 } else if (n < 0) { 894 *info = -2; 895 } else if (lda < TEUCHOS_MAX(1, m)) { 896 *info = -4; 897 } 898 if (*info != 0) { 899 return; 900 } 901 902 ScalarType sZero = ScalarTraits<ScalarType>::zero(); 903 ScalarType sOne = ScalarTraits<ScalarType>::one(); 904 MagnitudeType mZero = ScalarTraits<ScalarType>::magnitude(sZero); 905 MagnitudeType mOne = ScalarTraits<ScalarType>::magnitude(sOne); 906 907 // Quick return 908 if (m == 0 || n == 0) { 909 *rowcond = mOne; 910 *colcond = mOne; 911 *amax = mZero; 912 return; 913 } 914 915 MagnitudeType safeMin = ScalarTraits<ScalarType>::sfmin(); 916 MagnitudeType smlnum = ScalarTraits<ScalarType>::magnitude(safeMin); 917 MagnitudeType bignum = ScalarTraits<ScalarType>::magnitude(sOne/smlnum); 918 919 // Compute the row scale factors 920 for (OrdinalType i=0; i<m; i++) { 921 R[i] = mZero; 922 } 923 924 // Find the maximum element in each row 925 for (OrdinalType j=0; j<n; j++) { 926 for (OrdinalType i=0; i<m; i++) { 927 R[i] = TEUCHOS_MAX( R[i], ScalarTraits<ScalarType>::magnitude( A[j*lda + i] ) ); 928 } 929 } 930 931 // Find the maximum and minimum scale factors 932 MagnitudeType rcmin = bignum; 933 MagnitudeType rcmax = mZero; 934 for (OrdinalType i=0; i<m; i++) { 935 rcmax = TEUCHOS_MAX( rcmax, R[i] ); 936 rcmin = TEUCHOS_MIN( rcmin, R[i] ); 937 } 938 *amax = rcmax; 939 940 if (rcmin == mZero) { 941 // Find the first zero scale factor and return an error code 942 for (OrdinalType i=0; i<m; i++) { 943 if (R[i] == mZero) 944 *info = i; 945 } 946 } else { 947 // Invert the scale factors 948 for (OrdinalType i=0; i<m; i++) { 949 R[i] = mOne / TEUCHOS_MIN( TEUCHOS_MAX( R[i], smlnum ), bignum ); 950 } 951 // Compute rowcond = min(R(i)) / max(R(i)) 952 *rowcond = TEUCHOS_MAX( rcmin, smlnum ) / TEUCHOS_MIN( rcmax, bignum ); 953 } 954 955 // Compute the column scale factors 956 for (OrdinalType j=0; j<n; j++) { 957 C[j] = mZero; 958 } 959 960 // Find the maximum element in each column, assuming the row scaling computed above 961 for (OrdinalType j=0; j<n; j++) { 962 for (OrdinalType i=0; i<m; i++) { 963 C[j] = TEUCHOS_MAX( C[j], R[i]*ScalarTraits<ScalarType>::magnitude( A[j*lda + i] ) ); 964 } 965 } 966 967 // Find the maximum and minimum scale factors 968 rcmin = bignum; 969 rcmax = mZero; 970 for (OrdinalType j=0; j<n; j++) { 971 rcmax = TEUCHOS_MAX( rcmax, C[j] ); 972 rcmin = TEUCHOS_MIN( rcmin, C[j] ); 973 } 974 975 if (rcmin == mZero) { 976 // Find the first zero scale factor and return an error code 977 for (OrdinalType j=0; j<n; j++) { 978 if (C[j] == mZero) 979 *info = m+j; 980 } 981 } else { 982 // Invert the scale factors 983 for (OrdinalType j=0; j<n; j++) { 984 C[j] = mOne / TEUCHOS_MIN( TEUCHOS_MAX( C[j], smlnum ), bignum ); 985 } 986 // Compute colcond = min(C(j)) / max(C(j)) 987 *colcond = TEUCHOS_MAX( rcmin, smlnum ) / TEUCHOS_MIN( rcmax, bignum ); 988 } 989 } 990 991 template<typename OrdinalType, typename ScalarType> GERFS(const char & TRANS,const OrdinalType & n,const OrdinalType & nrhs,const ScalarType * A,const OrdinalType & lda,const ScalarType * AF,const OrdinalType & ldaf,const OrdinalType * IPIV,const ScalarType * B,const OrdinalType & ldb,ScalarType * X,const OrdinalType & ldx,ScalarType * FERR,ScalarType * BERR,ScalarType * WORK,OrdinalType * IWORK,OrdinalType * info) const992 void LAPACK<OrdinalType,ScalarType>::GERFS(const char& TRANS, const OrdinalType& n, const OrdinalType& nrhs, const ScalarType* A, const OrdinalType& lda, const ScalarType* AF, const OrdinalType& ldaf, const OrdinalType* IPIV, const ScalarType* B, const OrdinalType& ldb, ScalarType* X, const OrdinalType& ldx, ScalarType* FERR, ScalarType* BERR, ScalarType* WORK, OrdinalType* IWORK, OrdinalType* info) const 993 { 994 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 995 } 996 997 template<typename OrdinalType, typename ScalarType> GBEQU(const OrdinalType & m,const OrdinalType & n,const OrdinalType & kl,const OrdinalType & ku,const ScalarType * A,const OrdinalType & lda,MagnitudeType * R,MagnitudeType * C,MagnitudeType * rowcond,MagnitudeType * colcond,MagnitudeType * amax,OrdinalType * info) const998 void LAPACK<OrdinalType,ScalarType>::GBEQU(const OrdinalType& m, const OrdinalType& n, const OrdinalType& kl, const OrdinalType& ku, const ScalarType* A, const OrdinalType& lda, MagnitudeType* R, MagnitudeType* C, MagnitudeType* rowcond, MagnitudeType* colcond, MagnitudeType* amax, OrdinalType* info) const 999 { 1000 1001 // Test the input parameters 1002 * info = 0; 1003 if (m < 0) { 1004 *info = -1; 1005 } else if (n < 0) { 1006 *info = -2; 1007 } else if (kl < 0) { 1008 *info = -3; 1009 } else if (ku < 0) { 1010 *info = -4; 1011 } else if (lda < kl+ku+1) { 1012 *info = -6; 1013 } 1014 if (*info != 0) { 1015 return; 1016 } 1017 1018 ScalarType sZero = ScalarTraits<ScalarType>::zero(); 1019 ScalarType sOne = ScalarTraits<ScalarType>::one(); 1020 MagnitudeType mZero = ScalarTraits<ScalarType>::magnitude(sZero); 1021 MagnitudeType mOne = ScalarTraits<ScalarType>::magnitude(sOne); 1022 1023 // Quick return 1024 if (m == 0 || n == 0) { 1025 *rowcond = mOne; 1026 *colcond = mOne; 1027 *amax = mZero; 1028 return; 1029 } 1030 1031 MagnitudeType safeMin = ScalarTraits<ScalarType>::sfmin(); 1032 MagnitudeType smlnum = ScalarTraits<ScalarType>::magnitude(safeMin); 1033 MagnitudeType bignum = ScalarTraits<ScalarType>::magnitude(sOne/smlnum); 1034 1035 // Compute the row scale factors 1036 for (OrdinalType i=0; i<m; i++) { 1037 R[i] = mZero; 1038 } 1039 1040 // Find the maximum element in each row 1041 for (OrdinalType j=0; j<n; j++) { 1042 for (OrdinalType i=TEUCHOS_MAX(j-ku,0); i<TEUCHOS_MIN(j+kl,m-1); i++) { 1043 R[i] = TEUCHOS_MAX( R[i], ScalarTraits<ScalarType>::magnitude( A[j*lda + ku+i-j] ) ); 1044 } 1045 } 1046 1047 // Find the maximum and minimum scale factors 1048 MagnitudeType rcmin = bignum; 1049 MagnitudeType rcmax = mZero; 1050 for (OrdinalType i=0; i<m; i++) { 1051 rcmax = TEUCHOS_MAX( rcmax, R[i] ); 1052 rcmin = TEUCHOS_MIN( rcmin, R[i] ); 1053 } 1054 *amax = rcmax; 1055 1056 if (rcmin == mZero) { 1057 // Find the first zero scale factor and return an error code 1058 for (OrdinalType i=0; i<m; i++) { 1059 if (R[i] == mZero) 1060 *info = i; 1061 } 1062 } else { 1063 // Invert the scale factors 1064 for (OrdinalType i=0; i<m; i++) { 1065 R[i] = mOne / TEUCHOS_MIN( TEUCHOS_MAX( R[i], smlnum ), bignum ); 1066 } 1067 // Compute rowcond = min(R(i)) / max(R(i)) 1068 *rowcond = TEUCHOS_MAX( rcmin, smlnum ) / TEUCHOS_MIN( rcmax, bignum ); 1069 } 1070 1071 // Compute the column scale factors 1072 for (OrdinalType j=0; j<n; j++) { 1073 C[j] = mZero; 1074 } 1075 1076 // Find the maximum element in each column, assuming the row scaling computed above 1077 for (OrdinalType j=0; j<n; j++) { 1078 for (OrdinalType i=TEUCHOS_MAX(j-ku,0); i<TEUCHOS_MIN(j+kl,m-1); i++) { 1079 C[j] = TEUCHOS_MAX( C[j], R[i]*ScalarTraits<ScalarType>::magnitude( A[j*lda + ku+i-j] ) ); 1080 } 1081 } 1082 1083 // Find the maximum and minimum scale factors 1084 rcmin = bignum; 1085 rcmax = mZero; 1086 for (OrdinalType j=0; j<n; j++) { 1087 rcmax = TEUCHOS_MAX( rcmax, C[j] ); 1088 rcmin = TEUCHOS_MIN( rcmin, C[j] ); 1089 } 1090 1091 if (rcmin == mZero) { 1092 // Find the first zero scale factor and return an error code 1093 for (OrdinalType j=0; j<n; j++) { 1094 if (C[j] == mZero) 1095 *info = m+j; 1096 } 1097 } else { 1098 // Invert the scale factors 1099 for (OrdinalType j=0; j<n; j++) { 1100 C[j] = mOne / TEUCHOS_MIN( TEUCHOS_MAX( C[j], smlnum ), bignum ); 1101 } 1102 // Compute colcond = min(C(j)) / max(C(j)) 1103 *colcond = TEUCHOS_MAX( rcmin, smlnum ) / TEUCHOS_MIN( rcmax, bignum ); 1104 } 1105 } 1106 1107 template<typename OrdinalType, typename ScalarType> GBRFS(const char & TRANS,const OrdinalType & n,const OrdinalType & kl,const OrdinalType & ku,const OrdinalType & nrhs,const ScalarType * A,const OrdinalType & lda,const ScalarType * AF,const OrdinalType & ldaf,const OrdinalType * IPIV,const ScalarType * B,const OrdinalType & ldb,ScalarType * X,const OrdinalType & ldx,ScalarType * FERR,ScalarType * BERR,ScalarType * WORK,OrdinalType * IWORK,OrdinalType * info) const1108 void LAPACK<OrdinalType,ScalarType>::GBRFS(const char& TRANS, const OrdinalType& n, const OrdinalType& kl, const OrdinalType& ku, const OrdinalType& nrhs, const ScalarType* A, const OrdinalType& lda, const ScalarType* AF, const OrdinalType& ldaf, const OrdinalType* IPIV, const ScalarType* B, const OrdinalType& ldb, ScalarType* X, const OrdinalType& ldx, ScalarType* FERR, ScalarType* BERR, ScalarType* WORK, OrdinalType* IWORK, OrdinalType* info) const 1109 { 1110 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 1111 } 1112 1113 template<typename OrdinalType, typename ScalarType> GESVX(const char & FACT,const char & TRANS,const OrdinalType & n,const OrdinalType & nrhs,ScalarType * A,const OrdinalType & lda,ScalarType * AF,const OrdinalType & ldaf,OrdinalType * IPIV,char * EQUED,ScalarType * R,ScalarType * C,ScalarType * B,const OrdinalType & ldb,ScalarType * X,const OrdinalType & ldx,ScalarType * rcond,ScalarType * FERR,ScalarType * BERR,ScalarType * WORK,OrdinalType * IWORK,OrdinalType * info) const1114 void LAPACK<OrdinalType,ScalarType>::GESVX(const char& FACT, const char& TRANS, const OrdinalType& n, const OrdinalType& nrhs, ScalarType* A, const OrdinalType& lda, ScalarType* AF, const OrdinalType& ldaf, OrdinalType* IPIV, char* EQUED, ScalarType* R, ScalarType* C, ScalarType* B, const OrdinalType& ldb, ScalarType* X, const OrdinalType& ldx, ScalarType* rcond, ScalarType* FERR, ScalarType* BERR, ScalarType* WORK, OrdinalType* IWORK, OrdinalType* info) const 1115 { 1116 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 1117 } 1118 1119 template<typename OrdinalType, typename ScalarType> SYTRD(const char & UPLO,const OrdinalType & n,ScalarType * A,const OrdinalType & lda,ScalarType * D,ScalarType * E,ScalarType * TAU,ScalarType * WORK,const OrdinalType & lwork,OrdinalType * info) const1120 void LAPACK<OrdinalType,ScalarType>::SYTRD(const char& UPLO, const OrdinalType& n, ScalarType* A, const OrdinalType& lda, ScalarType* D, ScalarType* E, ScalarType* TAU, ScalarType* WORK, const OrdinalType& lwork, OrdinalType* info) const 1121 { 1122 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 1123 } 1124 1125 template<typename OrdinalType, typename ScalarType> GEHRD(const OrdinalType & n,const OrdinalType & ilo,const OrdinalType & ihi,ScalarType * A,const OrdinalType & lda,ScalarType * TAU,ScalarType * WORK,const OrdinalType & lwork,OrdinalType * info) const1126 void LAPACK<OrdinalType,ScalarType>::GEHRD(const OrdinalType& n, const OrdinalType& ilo, const OrdinalType& ihi, ScalarType* A, const OrdinalType& lda, ScalarType* TAU, ScalarType* WORK, const OrdinalType& lwork, OrdinalType* info) const 1127 { 1128 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 1129 } 1130 1131 template<typename OrdinalType, typename ScalarType> TRTRS(const char & UPLO,const char & TRANS,const char & DIAG,const OrdinalType & n,const OrdinalType & nrhs,const ScalarType * A,const OrdinalType & lda,ScalarType * B,const OrdinalType & ldb,OrdinalType * info) const1132 void LAPACK<OrdinalType,ScalarType>::TRTRS(const char& UPLO, const char& TRANS, const char& DIAG, const OrdinalType& n, const OrdinalType& nrhs, const ScalarType* A, const OrdinalType& lda, ScalarType* B, const OrdinalType& ldb, OrdinalType* info) const 1133 { 1134 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 1135 } 1136 1137 template<typename OrdinalType, typename ScalarType> TRTRI(const char & UPLO,const char & DIAG,const OrdinalType & n,const ScalarType * A,const OrdinalType & lda,OrdinalType * info) const1138 void LAPACK<OrdinalType,ScalarType>::TRTRI(const char& UPLO, const char& DIAG, const OrdinalType& n, const ScalarType* A, const OrdinalType& lda, OrdinalType* info) const 1139 { 1140 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 1141 } 1142 1143 template<typename OrdinalType, typename ScalarType> SPEV(const char & JOBZ,const char & UPLO,const OrdinalType & n,ScalarType * AP,ScalarType * W,ScalarType * Z,const OrdinalType & ldz,ScalarType * WORK,OrdinalType * info) const1144 void LAPACK<OrdinalType,ScalarType>::SPEV(const char& JOBZ, const char& UPLO, const OrdinalType& n, ScalarType* AP, ScalarType* W, ScalarType* Z, const OrdinalType& ldz, ScalarType* WORK, OrdinalType* info) const 1145 { 1146 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 1147 } 1148 1149 template<typename OrdinalType, typename ScalarType> SYEV(const char & JOBZ,const char & UPLO,const OrdinalType & n,ScalarType * A,const OrdinalType & lda,ScalarType * W,ScalarType * WORK,const OrdinalType & lwork,OrdinalType * info) const1150 void LAPACK<OrdinalType,ScalarType>::SYEV(const char& JOBZ, const char& UPLO, const OrdinalType& n, ScalarType* A, const OrdinalType& lda, ScalarType* W, ScalarType* WORK, const OrdinalType& lwork, OrdinalType* info) const 1151 { 1152 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 1153 } 1154 1155 template<typename OrdinalType, typename ScalarType> SYGV(const OrdinalType & itype,const char & JOBZ,const char & UPLO,const OrdinalType & n,ScalarType * A,const OrdinalType & lda,ScalarType * B,const OrdinalType & ldb,ScalarType * W,ScalarType * WORK,const OrdinalType & lwork,OrdinalType * info) const1156 void LAPACK<OrdinalType,ScalarType>::SYGV(const OrdinalType& itype, const char& JOBZ, const char& UPLO, const OrdinalType& n, ScalarType* A, const OrdinalType& lda, ScalarType* B, const OrdinalType& ldb, ScalarType* W, ScalarType* WORK, const OrdinalType& lwork, OrdinalType* info) const 1157 { 1158 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 1159 } 1160 1161 template<typename OrdinalType, typename ScalarType> HEEV(const char & JOBZ,const char & UPLO,const OrdinalType & n,ScalarType * A,const OrdinalType & lda,MagnitudeType * W,ScalarType * WORK,const OrdinalType & lwork,MagnitudeType * RWORK,OrdinalType * info) const1162 void LAPACK<OrdinalType,ScalarType>::HEEV(const char& JOBZ, const char& UPLO, const OrdinalType& n, ScalarType* A, const OrdinalType& lda, MagnitudeType* W, ScalarType* WORK, const OrdinalType& lwork, MagnitudeType* RWORK, OrdinalType* info) const 1163 { 1164 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 1165 } 1166 1167 template<typename OrdinalType, typename ScalarType> HEGV(const OrdinalType & itype,const char & JOBZ,const char & UPLO,const OrdinalType & n,ScalarType * A,const OrdinalType & lda,ScalarType * B,const OrdinalType & ldb,MagnitudeType * W,ScalarType * WORK,const OrdinalType & lwork,MagnitudeType * RWORK,OrdinalType * info) const1168 void LAPACK<OrdinalType,ScalarType>::HEGV(const OrdinalType& itype, const char& JOBZ, const char& UPLO, const OrdinalType& n, ScalarType* A, const OrdinalType& lda, ScalarType* B, const OrdinalType& ldb, MagnitudeType* W, ScalarType* WORK, const OrdinalType& lwork, MagnitudeType* RWORK, OrdinalType* info) const 1169 { 1170 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 1171 } 1172 1173 template<typename OrdinalType, typename ScalarType> STEQR(const char & COMPZ,const OrdinalType & n,MagnitudeType * D,MagnitudeType * E,ScalarType * Z,const OrdinalType & ldz,MagnitudeType * WORK,OrdinalType * info) const1174 void LAPACK<OrdinalType,ScalarType>::STEQR(const char& COMPZ, const OrdinalType& n, MagnitudeType* D, MagnitudeType* E, ScalarType* Z, const OrdinalType& ldz, MagnitudeType* WORK, OrdinalType* info) const 1175 { 1176 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 1177 } 1178 1179 template<typename OrdinalType, typename ScalarType> PTEQR(const char & COMPZ,const OrdinalType & n,MagnitudeType * D,MagnitudeType * E,ScalarType * Z,const OrdinalType & ldz,MagnitudeType * WORK,OrdinalType * info) const1180 void LAPACK<OrdinalType,ScalarType>::PTEQR(const char& COMPZ, const OrdinalType& n, MagnitudeType* D, MagnitudeType* E, ScalarType* Z, const OrdinalType& ldz, MagnitudeType* WORK, OrdinalType* info) const 1181 { 1182 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 1183 } 1184 1185 template<typename OrdinalType, typename ScalarType> HSEQR(const char & JOB,const char & COMPZ,const OrdinalType & n,const OrdinalType & ilo,const OrdinalType & ihi,ScalarType * H,const OrdinalType & ldh,ScalarType * WR,ScalarType * WI,ScalarType * Z,const OrdinalType & ldz,ScalarType * WORK,const OrdinalType & lwork,OrdinalType * info) const1186 void LAPACK<OrdinalType, ScalarType>::HSEQR(const char& JOB, const char& COMPZ, const OrdinalType& n, const OrdinalType& ilo, const OrdinalType& ihi, ScalarType* H, const OrdinalType& ldh, ScalarType* WR, ScalarType* WI, ScalarType* Z, const OrdinalType& ldz, ScalarType* WORK, const OrdinalType& lwork, OrdinalType* info) const 1187 { 1188 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 1189 } 1190 1191 template<typename OrdinalType, typename ScalarType> GEES(const char & JOBVS,const char & SORT,OrdinalType & (* ptr2func)(ScalarType *,ScalarType *),const OrdinalType & n,ScalarType * A,const OrdinalType & lda,OrdinalType * sdim,ScalarType * WR,ScalarType * WI,ScalarType * VS,const OrdinalType & ldvs,ScalarType * WORK,const OrdinalType & lwork,OrdinalType * BWORK,OrdinalType * info) const1192 void LAPACK<OrdinalType, ScalarType>::GEES(const char& JOBVS, const char& SORT, OrdinalType& (*ptr2func)(ScalarType*, ScalarType*), const OrdinalType& n, ScalarType* A, const OrdinalType& lda, OrdinalType* sdim, ScalarType* WR, ScalarType* WI, ScalarType* VS, const OrdinalType& ldvs, ScalarType* WORK, const OrdinalType& lwork, OrdinalType* BWORK, OrdinalType* info) const 1193 { 1194 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 1195 } 1196 1197 template<typename OrdinalType, typename ScalarType> GEES(const char & JOBVS,const char & SORT,OrdinalType & (* ptr2func)(ScalarType *),const OrdinalType & n,ScalarType * A,const OrdinalType & lda,OrdinalType * sdim,ScalarType * W,ScalarType * VS,const OrdinalType & ldvs,ScalarType * WORK,const OrdinalType & lwork,MagnitudeType * RWORK,OrdinalType * BWORK,OrdinalType * info) const1198 void LAPACK<OrdinalType, ScalarType>::GEES(const char& JOBVS, const char& SORT, OrdinalType& (*ptr2func)(ScalarType*), const OrdinalType& n, ScalarType* A, const OrdinalType& lda, OrdinalType* sdim, ScalarType* W, ScalarType* VS, const OrdinalType& ldvs, ScalarType* WORK, const OrdinalType& lwork, MagnitudeType *RWORK, OrdinalType* BWORK, OrdinalType* info) const 1199 { 1200 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 1201 } 1202 1203 template<typename OrdinalType, typename ScalarType> GEES(const char & JOBVS,const OrdinalType & n,ScalarType * A,const OrdinalType & lda,OrdinalType * sdim,MagnitudeType * WR,MagnitudeType * WI,ScalarType * VS,const OrdinalType & ldvs,ScalarType * WORK,const OrdinalType & lwork,MagnitudeType * RWORK,OrdinalType * BWORK,OrdinalType * info) const1204 void LAPACK<OrdinalType, ScalarType>::GEES(const char& JOBVS, const OrdinalType& n, ScalarType* A, const OrdinalType& lda, OrdinalType* sdim, MagnitudeType* WR, MagnitudeType* WI, ScalarType* VS, const OrdinalType& ldvs, ScalarType* WORK, const OrdinalType& lwork, MagnitudeType *RWORK, OrdinalType* BWORK, OrdinalType* info) const 1205 { 1206 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 1207 } 1208 1209 template<typename OrdinalType, typename ScalarType> GEEV(const char & JOBVL,const char & JOBVR,const OrdinalType & n,ScalarType * A,const OrdinalType & lda,MagnitudeType * WR,MagnitudeType * WI,ScalarType * VL,const OrdinalType & ldvl,ScalarType * VR,const OrdinalType & ldvr,ScalarType * WORK,const OrdinalType & lwork,MagnitudeType * rwork,OrdinalType * info) const1210 void LAPACK<OrdinalType, ScalarType>::GEEV(const char& JOBVL, const char& JOBVR, const OrdinalType& n, ScalarType* A, const OrdinalType& lda, MagnitudeType* WR, MagnitudeType* WI, ScalarType* VL, const OrdinalType& ldvl, ScalarType* VR, const OrdinalType& ldvr, ScalarType* WORK, const OrdinalType& lwork, MagnitudeType* rwork, OrdinalType* info) const 1211 { 1212 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 1213 } 1214 1215 template<typename OrdinalType, typename ScalarType> GEEVX(const char & BALANC,const char & JOBVL,const char & JOBVR,const char & SENSE,const OrdinalType & n,ScalarType * A,const OrdinalType & lda,ScalarType * WR,ScalarType * WI,ScalarType * VL,const OrdinalType & ldvl,ScalarType * VR,const OrdinalType & ldvr,OrdinalType * ilo,OrdinalType * ihi,MagnitudeType * SCALE,MagnitudeType * abnrm,MagnitudeType * RCONDE,MagnitudeType * RCONDV,ScalarType * WORK,const OrdinalType & lwork,OrdinalType * IWORK,OrdinalType * info) const1216 void LAPACK<OrdinalType, ScalarType>::GEEVX(const char& BALANC, const char& JOBVL, const char& JOBVR, const char& SENSE, const OrdinalType& n, ScalarType* A, const OrdinalType& lda, ScalarType* WR, ScalarType* WI, ScalarType* VL, const OrdinalType& ldvl, ScalarType* VR, const OrdinalType& ldvr, OrdinalType* ilo, OrdinalType* ihi, MagnitudeType* SCALE, MagnitudeType* abnrm, MagnitudeType* RCONDE, MagnitudeType* RCONDV, ScalarType* WORK, const OrdinalType& lwork, OrdinalType* IWORK, OrdinalType* info) const 1217 { 1218 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 1219 } 1220 1221 template<typename OrdinalType, typename ScalarType> GESVD(const char & JOBU,const char & JOBVT,const OrdinalType & m,const OrdinalType & n,ScalarType * A,const OrdinalType & lda,MagnitudeType * S,ScalarType * U,const OrdinalType & ldu,ScalarType * V,const OrdinalType & ldv,ScalarType * WORK,const OrdinalType & lwork,MagnitudeType * RWORK,OrdinalType * info) const1222 void LAPACK<OrdinalType, ScalarType>::GESVD(const char& JOBU, const char& JOBVT, const OrdinalType& m, const OrdinalType& n, ScalarType* A, const OrdinalType& lda, MagnitudeType* S, ScalarType* U, const OrdinalType& ldu, ScalarType* V, const OrdinalType& ldv, ScalarType* WORK, const OrdinalType& lwork, MagnitudeType* RWORK, OrdinalType* info) const 1223 { 1224 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 1225 } 1226 1227 template<typename OrdinalType, typename ScalarType> GGEVX(const char & BALANC,const char & JOBVL,const char & JOBVR,const char & SENSE,const OrdinalType & n,ScalarType * A,const OrdinalType & lda,ScalarType * B,const OrdinalType & ldb,MagnitudeType * ALPHAR,MagnitudeType * ALPHAI,ScalarType * BETA,ScalarType * VL,const OrdinalType & ldvl,ScalarType * VR,const OrdinalType & ldvr,OrdinalType * ilo,OrdinalType * ihi,MagnitudeType * lscale,MagnitudeType * rscale,MagnitudeType * abnrm,MagnitudeType * bbnrm,MagnitudeType * RCONDE,MagnitudeType * RCONDV,ScalarType * WORK,const OrdinalType & lwork,OrdinalType * IWORK,OrdinalType * BWORK,OrdinalType * info) const1228 void LAPACK<OrdinalType, ScalarType>::GGEVX(const char& BALANC, const char& JOBVL, const char& JOBVR, const char& SENSE, const OrdinalType& n, ScalarType* A, const OrdinalType& lda, ScalarType* B, const OrdinalType& ldb, MagnitudeType* ALPHAR, MagnitudeType* ALPHAI, ScalarType* BETA, ScalarType* VL, const OrdinalType& ldvl, ScalarType* VR, const OrdinalType& ldvr, OrdinalType* ilo, OrdinalType* ihi, MagnitudeType* lscale, MagnitudeType* rscale, MagnitudeType* abnrm, MagnitudeType* bbnrm, MagnitudeType* RCONDE, MagnitudeType* RCONDV, ScalarType* WORK, const OrdinalType& lwork, OrdinalType* IWORK, OrdinalType* BWORK, OrdinalType* info) const 1229 { 1230 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 1231 } 1232 1233 template<typename OrdinalType, typename ScalarType> GGEV(const char & JOBVL,const char & JOBVR,const OrdinalType & n,ScalarType * A,const OrdinalType & lda,ScalarType * B,const OrdinalType & ldb,MagnitudeType * ALPHAR,MagnitudeType * ALPHAI,ScalarType * BETA,ScalarType * VL,const OrdinalType & ldvl,ScalarType * VR,const OrdinalType & ldvr,ScalarType * WORK,const OrdinalType & lwork,OrdinalType * info) const1234 void LAPACK<OrdinalType, ScalarType>::GGEV(const char& JOBVL, const char& JOBVR, const OrdinalType& n, ScalarType* A, const OrdinalType& lda, ScalarType* B, const OrdinalType& ldb, MagnitudeType *ALPHAR, MagnitudeType *ALPHAI, ScalarType* BETA, ScalarType* VL, const OrdinalType& ldvl, ScalarType* VR, const OrdinalType& ldvr, ScalarType* WORK, const OrdinalType& lwork, OrdinalType* info) const 1235 { 1236 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 1237 } 1238 1239 1240 template<typename OrdinalType, typename ScalarType> TRSEN(const char & JOB,const char & COMPQ,const OrdinalType * SELECT,const OrdinalType & n,ScalarType * T,const OrdinalType & ldt,ScalarType * Q,const OrdinalType & ldq,MagnitudeType * WR,MagnitudeType * WI,OrdinalType * M,ScalarType * S,MagnitudeType * SEP,ScalarType * WORK,const OrdinalType & lwork,OrdinalType * IWORK,const OrdinalType & liwork,OrdinalType * info) const1241 void LAPACK<OrdinalType,ScalarType>::TRSEN(const char& JOB, const char& COMPQ, const OrdinalType* SELECT, const OrdinalType& n, ScalarType* T, const OrdinalType& ldt, ScalarType* Q, const OrdinalType& ldq, MagnitudeType *WR, MagnitudeType *WI, OrdinalType* M, ScalarType* S, MagnitudeType *SEP, ScalarType* WORK, const OrdinalType& lwork, OrdinalType* IWORK, const OrdinalType& liwork, OrdinalType* info ) const 1242 { 1243 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 1244 } 1245 1246 1247 template<typename OrdinalType, typename ScalarType> TGSEN(const OrdinalType & ijob,const OrdinalType & wantq,const OrdinalType & wantz,const OrdinalType * SELECT,const OrdinalType & n,ScalarType * A,const OrdinalType & lda,ScalarType * B,const OrdinalType & ldb,MagnitudeType * ALPHAR,MagnitudeType * ALPHAI,MagnitudeType * BETA,ScalarType * Q,const OrdinalType & ldq,ScalarType * Z,const OrdinalType & ldz,OrdinalType * M,MagnitudeType * PL,MagnitudeType * PR,MagnitudeType * DIF,ScalarType * WORK,const OrdinalType & lwork,OrdinalType * IWORK,const OrdinalType & liwork,OrdinalType * info) const1248 void LAPACK<OrdinalType,ScalarType>::TGSEN(const OrdinalType& ijob, const OrdinalType& wantq, const OrdinalType& wantz, const OrdinalType* SELECT, const OrdinalType& n, ScalarType* A, const OrdinalType& lda, ScalarType* B, const OrdinalType& ldb, MagnitudeType *ALPHAR, MagnitudeType *ALPHAI, MagnitudeType *BETA, ScalarType* Q, const OrdinalType& ldq, ScalarType* Z, const OrdinalType& ldz, OrdinalType* M, MagnitudeType *PL, MagnitudeType *PR, MagnitudeType *DIF, ScalarType* WORK, const OrdinalType& lwork, OrdinalType* IWORK, const OrdinalType& liwork, OrdinalType* info ) const 1249 { 1250 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 1251 } 1252 1253 1254 template<typename OrdinalType, typename ScalarType> GGES(const char & JOBVL,const char & JOBVR,const char & SORT,OrdinalType & (* ptr2func)(ScalarType *,ScalarType *,ScalarType *),const OrdinalType & n,ScalarType * A,const OrdinalType & lda,ScalarType * B,const OrdinalType & ldb,OrdinalType * sdim,MagnitudeType * ALPHAR,MagnitudeType * ALPHAI,MagnitudeType * BETA,ScalarType * VL,const OrdinalType & ldvl,ScalarType * VR,const OrdinalType & ldvr,ScalarType * WORK,const OrdinalType & lwork,OrdinalType * BWORK,OrdinalType * info) const1255 void LAPACK<OrdinalType, ScalarType>::GGES(const char& JOBVL, const char& JOBVR, const char& SORT, OrdinalType& (*ptr2func)(ScalarType*, ScalarType*, ScalarType*), const OrdinalType& n, ScalarType* A, const OrdinalType& lda, ScalarType* B, const OrdinalType& ldb, OrdinalType* sdim, MagnitudeType* ALPHAR, MagnitudeType* ALPHAI, MagnitudeType* BETA, ScalarType* VL, const OrdinalType& ldvl, ScalarType* VR, const OrdinalType& ldvr, ScalarType* WORK, const OrdinalType& lwork, OrdinalType* BWORK, OrdinalType* info ) const 1256 { 1257 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 1258 } 1259 1260 template<typename OrdinalType, typename ScalarType> ORMQR(const char & SIDE,const char & TRANS,const OrdinalType & m,const OrdinalType & n,const OrdinalType & k,ScalarType * A,const OrdinalType & lda,const ScalarType * TAU,ScalarType * C,const OrdinalType & ldc,ScalarType * WORK,const OrdinalType & lwork,OrdinalType * info) const1261 void LAPACK<OrdinalType, ScalarType>::ORMQR(const char& SIDE, const char& TRANS, const OrdinalType& m, const OrdinalType& n, const OrdinalType& k, ScalarType* A, const OrdinalType& lda, const ScalarType* TAU, ScalarType* C, const OrdinalType& ldc, ScalarType* WORK, const OrdinalType& lwork, OrdinalType* info) const 1262 { 1263 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 1264 } 1265 1266 template<typename OrdinalType, typename ScalarType> ORM2R(const char & SIDE,const char & TRANS,const OrdinalType & m,const OrdinalType & n,const OrdinalType & k,const ScalarType A[],const OrdinalType & lda,const ScalarType TAU[],ScalarType C[],const OrdinalType & ldc,ScalarType WORK[],OrdinalType * const info) const1267 void LAPACK<OrdinalType, ScalarType>::ORM2R(const char& SIDE, const char& TRANS, const OrdinalType& m, const OrdinalType& n, const OrdinalType& k, const ScalarType A[], const OrdinalType& lda, const ScalarType TAU[], ScalarType C[], const OrdinalType& ldc, ScalarType WORK[], OrdinalType* const info) const 1268 { 1269 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 1270 } 1271 1272 template<typename OrdinalType, typename ScalarType> UNMQR(const char & SIDE,const char & TRANS,const OrdinalType & m,const OrdinalType & n,const OrdinalType & k,ScalarType * A,const OrdinalType & lda,const ScalarType * TAU,ScalarType * C,const OrdinalType & ldc,ScalarType * WORK,const OrdinalType & lwork,OrdinalType * info) const1273 void LAPACK<OrdinalType, ScalarType>::UNMQR(const char& SIDE, const char& TRANS, const OrdinalType& m, const OrdinalType& n, const OrdinalType& k, ScalarType* A, const OrdinalType& lda, const ScalarType* TAU, ScalarType* C, const OrdinalType& ldc, ScalarType* WORK, const OrdinalType& lwork, OrdinalType* info) const 1274 { 1275 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 1276 } 1277 1278 template<typename OrdinalType, typename ScalarType> UNM2R(const char & SIDE,const char & TRANS,const OrdinalType & M,const OrdinalType & N,const OrdinalType & K,const ScalarType A[],const OrdinalType & LDA,const ScalarType TAU[],ScalarType C[],const OrdinalType & LDC,ScalarType WORK[],OrdinalType * const INFO) const1279 void LAPACK<OrdinalType, ScalarType>::UNM2R(const char& SIDE, const char& TRANS, const OrdinalType& M, const OrdinalType& N, const OrdinalType& K, const ScalarType A[], const OrdinalType& LDA, const ScalarType TAU[], ScalarType C[], const OrdinalType& LDC, ScalarType WORK[], OrdinalType* const INFO) const 1280 { 1281 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 1282 } 1283 1284 template<typename OrdinalType, typename ScalarType> ORGQR(const OrdinalType & m,const OrdinalType & n,const OrdinalType & k,ScalarType * A,const OrdinalType & lda,const ScalarType * TAU,ScalarType * WORK,const OrdinalType & lwork,OrdinalType * info) const1285 void LAPACK<OrdinalType, ScalarType>::ORGQR(const OrdinalType& m, const OrdinalType& n, const OrdinalType& k, ScalarType* A, const OrdinalType& lda, const ScalarType* TAU, ScalarType* WORK, const OrdinalType& lwork, OrdinalType* info) const 1286 { 1287 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 1288 } 1289 1290 template<typename OrdinalType, typename ScalarType> UNGQR(const OrdinalType & m,const OrdinalType & n,const OrdinalType & k,ScalarType * A,const OrdinalType & lda,const ScalarType * TAU,ScalarType * WORK,const OrdinalType & lwork,OrdinalType * info) const1291 void LAPACK<OrdinalType, ScalarType>::UNGQR(const OrdinalType& m, const OrdinalType& n, const OrdinalType& k, ScalarType* A, const OrdinalType& lda, const ScalarType* TAU, ScalarType* WORK, const OrdinalType& lwork, OrdinalType* info) const 1292 { 1293 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 1294 } 1295 1296 template<typename OrdinalType, typename ScalarType> ORGHR(const OrdinalType & n,const OrdinalType & ilo,const OrdinalType & ihi,ScalarType * A,const OrdinalType & lda,const ScalarType * TAU,ScalarType * WORK,const OrdinalType & lwork,OrdinalType * info) const1297 void LAPACK<OrdinalType, ScalarType>::ORGHR(const OrdinalType& n, const OrdinalType& ilo, const OrdinalType& ihi, ScalarType* A, const OrdinalType& lda, const ScalarType* TAU, ScalarType* WORK, const OrdinalType& lwork, OrdinalType* info) const 1298 { 1299 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 1300 } 1301 1302 template<typename OrdinalType, typename ScalarType> ORMHR(const char & SIDE,const char & TRANS,const OrdinalType & m,const OrdinalType & n,const OrdinalType & ilo,const OrdinalType & ihi,const ScalarType * A,const OrdinalType & lda,const ScalarType * TAU,ScalarType * C,const OrdinalType & ldc,ScalarType * WORK,const OrdinalType & lwork,OrdinalType * info) const1303 void LAPACK<OrdinalType, ScalarType>::ORMHR(const char& SIDE, const char& TRANS, const OrdinalType& m, const OrdinalType& n, const OrdinalType& ilo, const OrdinalType& ihi, const ScalarType* A, const OrdinalType& lda, const ScalarType* TAU, ScalarType* C, const OrdinalType& ldc, ScalarType* WORK, const OrdinalType& lwork, OrdinalType* info) const 1304 { 1305 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 1306 } 1307 1308 template<typename OrdinalType, typename ScalarType> TREVC(const char & SIDE,const char & HOWMNY,OrdinalType * select,const OrdinalType & n,const ScalarType * T,const OrdinalType & ldt,ScalarType * VL,const OrdinalType & ldvl,ScalarType * VR,const OrdinalType & ldvr,const OrdinalType & mm,OrdinalType * m,ScalarType * WORK,OrdinalType * info) const1309 void LAPACK<OrdinalType, ScalarType>::TREVC(const char& SIDE, const char& HOWMNY, OrdinalType* select, const OrdinalType& n, const ScalarType* T, const OrdinalType& ldt, ScalarType* VL, const OrdinalType& ldvl, ScalarType* VR, const OrdinalType& ldvr, const OrdinalType& mm, OrdinalType* m, ScalarType* WORK, OrdinalType* info) const 1310 { 1311 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 1312 } 1313 1314 template<typename OrdinalType, typename ScalarType> TREVC(const char & SIDE,const OrdinalType & n,const ScalarType * T,const OrdinalType & ldt,ScalarType * VL,const OrdinalType & ldvl,ScalarType * VR,const OrdinalType & ldvr,const OrdinalType & mm,OrdinalType * m,ScalarType * WORK,MagnitudeType * RWORK,OrdinalType * info) const1315 void LAPACK<OrdinalType, ScalarType>::TREVC(const char& SIDE, const OrdinalType& n, const ScalarType* T, const OrdinalType& ldt, ScalarType* VL, const OrdinalType& ldvl, ScalarType* VR, const OrdinalType& ldvr, const OrdinalType& mm, OrdinalType* m, ScalarType* WORK, MagnitudeType* RWORK, OrdinalType* info) const 1316 { 1317 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 1318 } 1319 1320 template<typename OrdinalType, typename ScalarType> TREXC(const char & COMPQ,const OrdinalType & n,ScalarType * T,const OrdinalType & ldt,ScalarType * Q,const OrdinalType & ldq,OrdinalType * ifst,OrdinalType * ilst,ScalarType * WORK,OrdinalType * info) const1321 void LAPACK<OrdinalType, ScalarType>::TREXC(const char& COMPQ, const OrdinalType& n, ScalarType* T, const OrdinalType& ldt, ScalarType* Q, const OrdinalType& ldq, OrdinalType* ifst, OrdinalType* ilst, ScalarType* WORK, OrdinalType* info) const 1322 { 1323 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 1324 } 1325 1326 1327 template<typename OrdinalType, typename ScalarType> TGEVC(const char & SIDE,const char & HOWMNY,const OrdinalType * SELECT,const OrdinalType & n,ScalarType * S,const OrdinalType & lds,ScalarType * P,const OrdinalType & ldp,ScalarType * VL,const OrdinalType & ldvl,ScalarType * VR,const OrdinalType & ldvr,const OrdinalType & mm,OrdinalType * M,ScalarType * WORK,OrdinalType * info) const1328 void LAPACK<OrdinalType, ScalarType>::TGEVC(const char& SIDE, const char& HOWMNY, const OrdinalType* SELECT, const OrdinalType& n, ScalarType* S, const OrdinalType& lds, ScalarType* P, const OrdinalType& ldp, ScalarType* VL, const OrdinalType& ldvl, ScalarType* VR, const OrdinalType& ldvr, const OrdinalType& mm, OrdinalType* M, ScalarType* WORK, OrdinalType* info) const 1329 { 1330 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 1331 } 1332 1333 1334 template<typename OrdinalType, typename ScalarType> LAMCH(const char & CMACH) const1335 ScalarType LAPACK<OrdinalType, ScalarType>::LAMCH(const char& CMACH) const 1336 { 1337 return UndefinedLAPACKRoutine<ScalarType>::notDefined(); 1338 } 1339 1340 template<typename OrdinalType, typename ScalarType> 1341 OrdinalType LAPACK<OrdinalType, ScalarType>::ILAENV( const OrdinalType& ispec, const std::string& NAME, const std::string& OPTS, const OrdinalType& N1, const OrdinalType& N2, const OrdinalType& N3, const OrdinalType& N4 ) const 1342 { 1343 return UndefinedLAPACKRoutine<OrdinalType>::notDefined(); 1344 } 1345 1346 template<typename OrdinalType, typename ScalarType> LAPY2(const ScalarType & x,const ScalarType & y) const1347 ScalarType LAPACK<OrdinalType, ScalarType>::LAPY2(const ScalarType& x, const ScalarType& y) const 1348 { 1349 return UndefinedLAPACKRoutine<ScalarType>::notDefined(); 1350 } 1351 1352 template<typename OrdinalType, typename ScalarType> LARTG(const ScalarType & f,const ScalarType & g,MagnitudeType * c,ScalarType * s,ScalarType * r) const1353 void LAPACK<OrdinalType, ScalarType>::LARTG( const ScalarType& f, const ScalarType& g, MagnitudeType* c, ScalarType* s, ScalarType* r ) const 1354 { 1355 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 1356 } 1357 1358 template<typename OrdinalType, typename ScalarType> LARFG(const OrdinalType & n,ScalarType * alpha,ScalarType * x,const OrdinalType & incx,ScalarType * tau) const1359 void LAPACK<OrdinalType, ScalarType>::LARFG( const OrdinalType& n, ScalarType* alpha, ScalarType* x, const OrdinalType& incx, ScalarType* tau ) const 1360 { 1361 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 1362 } 1363 1364 template<typename OrdinalType, typename ScalarType> GEBAL(const char & JOBZ,const OrdinalType & n,ScalarType * A,const OrdinalType & lda,OrdinalType * ilo,OrdinalType * ihi,MagnitudeType * scale,OrdinalType * info) const1365 void LAPACK<OrdinalType, ScalarType>::GEBAL( const char& JOBZ, const OrdinalType& n, ScalarType* A, const OrdinalType& lda, OrdinalType* ilo, OrdinalType* ihi, MagnitudeType* scale, OrdinalType* info ) const 1366 { 1367 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 1368 } 1369 1370 1371 template<typename OrdinalType, typename ScalarType> GEBAK(const char & JOBZ,const char & SIDE,const OrdinalType & n,const OrdinalType & ilo,const OrdinalType & ihi,const MagnitudeType * scale,const OrdinalType & m,ScalarType * V,const OrdinalType & ldv,OrdinalType * info) const1372 void LAPACK<OrdinalType, ScalarType>::GEBAK( const char& JOBZ, const char& SIDE, const OrdinalType& n, const OrdinalType& ilo, const OrdinalType& ihi, const MagnitudeType* scale, const OrdinalType& m, ScalarType* V, const OrdinalType& ldv, OrdinalType* info ) const 1373 { 1374 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 1375 } 1376 1377 template<typename OrdinalType, typename ScalarType> LARND(const OrdinalType & idist,OrdinalType * seed) const1378 ScalarType LAPACK<OrdinalType, ScalarType>::LARND( const OrdinalType& idist, OrdinalType* seed ) const 1379 { 1380 return UndefinedLAPACKRoutine<ScalarType>::notDefined(); 1381 } 1382 1383 template<typename OrdinalType, typename ScalarType> LARNV(const OrdinalType & idist,OrdinalType * seed,const OrdinalType & n,ScalarType * v) const1384 void LAPACK<OrdinalType, ScalarType>::LARNV( const OrdinalType& idist, OrdinalType* seed, const OrdinalType& n, ScalarType* v ) const 1385 { 1386 UndefinedLAPACKRoutine<ScalarType>::notDefined(); 1387 } 1388 1389 // END GENERAL TEMPLATE IMPLEMENTATION // 1390 1391 #ifndef DOXYGEN_SHOULD_SKIP_THIS 1392 1393 // BEGIN INT, FLOAT SPECIALIZATION DECLARATION // 1394 1395 template<> 1396 class TEUCHOSNUMERICS_LIB_DLL_EXPORT LAPACK<int, float> 1397 { 1398 public: LAPACK(void)1399 inline LAPACK(void) {} LAPACK(const LAPACK<int,float> &)1400 inline LAPACK(const LAPACK<int, float>& /*lapack*/) {} ~LAPACK(void)1401 inline virtual ~LAPACK(void) {} 1402 1403 // Symmetric positive definite linear system routines 1404 void POTRF(const char& UPLO, const int& n, float* A, const int& lda, int* info) const; 1405 void POTRS(const char& UPLO, const int& n, const int& nrhs, const float* A, const int& lda, float* B, const int& ldb, int* info) const; 1406 void PTTRF(const int& n, float* d, float* e, int* info) const; 1407 void PTTRS(const int& n, const int& nrhs, const float* d, const float* e, float* B, const int& ldb, int* info) const; 1408 void POTRI(const char& UPLO, const int& n, float* A, const int& lda, int* info) const; 1409 void 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; 1410 void POSV(const char& UPLO, const int& n, const int& nrhs, float* A, const int& lda, float* B, const int& ldb, int* info) const; 1411 void POEQU(const int& n, const float* A, const int& lda, float* S, float* scond, float* amax, int* info) const; 1412 void 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; 1413 1414 void 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; 1415 1416 // General Linear System Routines 1417 void 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; 1418 void 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; 1419 void 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; 1420 void 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; 1421 void GEQRF(const int& m, const int& n, float* A, const int& lda, float* TAU, float* WORK, const int& lwork, int* info) const; 1422 void GEQR2(const int& m, const int& n, float A[], const int& lda, float TAU[], float WORK[], int* const info) const; 1423 1424 void GETRF(const int& m, const int& n, float* A, const int& lda, int* IPIV, int* info) const; 1425 void 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; 1426 void 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; 1427 1428 void 1429 GEQP3 (const int& m, 1430 const int& n, 1431 float* A, 1432 const int& lda, 1433 int* jpvt, 1434 float* TAU, 1435 float* WORK, 1436 const int& lwork, 1437 float* RWORK, 1438 int* info) const; 1439 1440 void LASWP (const int& N, 1441 float A[], 1442 const int& LDA, 1443 const int& K1, 1444 const int& K2, 1445 const int IPIV[], 1446 const int& INCX) const; 1447 1448 void GBTRF(const int& m, const int& n, const int& kl, const int& ku, float* A, const int& lda, int* IPIV, int* info) const; 1449 void 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; 1450 void GTTRF(const int& n, float* dl, float* d, float* du, float* du2, int* IPIV, int* info) const; 1451 void 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; 1452 1453 1454 void GETRI(const int& n, float* A, const int& lda, const int* IPIV, float* WORK, const int& lwork, int* info) const; 1455 void LATRS (const char& UPLO, const char& TRANS, const char& DIAG, const char& NORMIN, const int& N, float* A, const int& LDA, float* X, float* SCALE, float* CNORM, int* INFO) const; 1456 void 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; 1457 void 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; 1458 float LANGB(const char& NORM, const int& n, const int& kl, const int& ku, const float* A, const int& lda, float* WORK) const; 1459 void GESV(const int& n, const int& nrhs, float* A, const int& lda, int* IPIV, float* B, const int& ldb, int* info) const; 1460 void 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; 1461 void 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; 1462 void 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; 1463 void 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; 1464 1465 void 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; 1466 1467 void 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; 1468 void 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; 1469 void 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; 1470 void TRTRI(const char& UPLO, const char& DIAG, const int& n, const float* A, const int& lda, int* info) const; 1471 1472 // Symmetric eigenvalue routines. 1473 void STEQR(const char& COMPZ, const int& n, float* D, float* E, float* Z, const int& ldz, float* WORK, int* info) const; 1474 void PTEQR(const char& COMPZ, const int& n, float* D, float* E, float* Z, const int& ldz, float* WORK, int* info) const; 1475 void SPEV(const char& JOBZ, const char& UPLO, const int& n, float* AP, float* W, float* Z, const int& ldz, float* WORK, int* info) const; 1476 void 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; 1477 void 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; 1478 void 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; 1479 void 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; 1480 1481 // Non-Hermitian eigenvalue routines. 1482 void 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; 1483 void 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; 1484 void 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; 1485 1486 void 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; 1487 void 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, float* rwork, int* info) const; 1488 1489 void 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; 1490 void 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; 1491 void 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, float* rwork, int* IWORK, int* BWORK, int* info) const; 1492 void 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; 1493 void TRSEN(const char& JOB, const char& COMPQ, const int* SELECT, const int& n, float* T, const int& ldt, float* Q, const int& ldq, float* WR, float* WI, int* M, float* S, float* SEP, float* WORK, const int& lwork, int* IWORK, const int& liwork, int* info ) const; 1494 void TGSEN(const int& ijob, const int& wantq, const int& wantz, const int* SELECT, const int& n, float* A, const int& lda, float* B, const int& ldb, float* ALPHAR, float* ALPHAI, float* BETA, float* Q, const int& ldq, float* Z, const int& ldz, int* M, float* PL, float* PR, float* DIF, float* WORK, const int& lwork, int* IWORK, const int& liwork, int* info ) const; 1495 void GGES(const char& JOBVL, const char& JOBVR, const char& SORT, int (*ptr2func)(float*, float*, float*), const int& n, float* A, const int& lda, float* B, const int& ldb, int* sdim, float* ALPHAR, float* ALPHAI, float* BETA, float* VL, const int& ldvl, float* VR, const int& ldvr, float* WORK, const int& lwork, int* bwork, int* info ) const; 1496 1497 // SVD routine 1498 void 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; 1499 1500 // Orthogonal matrix routines. 1501 void 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; 1502 void ORM2R(const char& SIDE, const char& TRANS, const int& m, const int& n, const int& k, const float A[], const int& lda, const float TAU[], float C[], const int& ldc, float WORK[], int* const info) const; 1503 void 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; 1504 void UNM2R(const char& SIDE, const char& TRANS, const int& M, const int& N, const int& K, const float A[], const int& LDA, const float TAU[], float C[], const int& LDC, float WORK[], int* const INFO) const; 1505 void 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; 1506 void 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; 1507 void 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; 1508 void 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; 1509 1510 // Triangular matrix routines. 1511 void 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; 1512 void 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; 1513 1514 void 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; 1515 1516 void TGEVC(const char& SIDE, const char& HOWMNY, const int* SELECT, const int& n, float* S, const int& lds, float* P, const int& ldp, float* VL, const int& ldvl, float* VR, const int& ldvr, const int& mm, int* M, float* WORK, int* info) const; 1517 1518 // Rotation/reflection generators 1519 void LARTG( const float& f, const float& g, float* c, float* s, float* r ) const; 1520 void LARFG( const int& n, float* alpha, float* x, const int& incx, float* tau ) const; 1521 1522 // Matrix balancing routines. 1523 1524 void GEBAL(const char& JOBZ, const int& n, float* A, const int& lda, int* ilo, int* ihi, float* scale, int* info) const; 1525 1526 void 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; 1527 1528 // Random number generators 1529 float LARND( const int& idist, int* seed ) const; 1530 void LARNV( const int& idist, int* seed, const int& n, float* v ) const; 1531 1532 // Machine characteristics. 1533 float LAMCH(const char& CMACH) const; 1534 int ILAENV( const int& ispec, const std::string& NAME, const std::string& OPTS, const int& N1 = -1, const int& N2 = -1, const int& N3 = -1, const int& N4 = -1 ) const; 1535 1536 // Miscellaneous routines. 1537 float LAPY2(const float& x, const float& y) const; 1538 1539 }; 1540 1541 // END INT, FLOAT SPECIALIZATION DECLARATION // 1542 1543 // BEGIN INT, DOUBLE SPECIALIZATION DECLARATION // 1544 1545 template<> 1546 class TEUCHOSNUMERICS_LIB_DLL_EXPORT LAPACK<int, double> 1547 { 1548 public: LAPACK(void)1549 inline LAPACK(void) {} LAPACK(const LAPACK<int,double> &)1550 inline LAPACK(const LAPACK<int, double>& /*lapack*/) {} ~LAPACK(void)1551 inline virtual ~LAPACK(void) {} 1552 1553 // Symmetric positive definite linear system routines 1554 void PTTRF(const int& n, double* d, double* e, int* info) const; 1555 void PTTRS(const int& n, const int& nrhs, const double* d, const double* e, double* B, const int& ldb, int* info) const; 1556 void POTRF(const char& UPLO, const int& n, double* A, const int& lda, int* info) const; 1557 void POTRS(const char& UPLO, const int& n, const int& nrhs, const double* A, const int& lda, double* B, const int& ldb, int* info) const; 1558 void POTRI(const char& UPLO, const int& n, double* A, const int& lda, int* info) const; 1559 void 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; 1560 void POSV(const char& UPLO, const int& n, const int& nrhs, double* A, const int& lda, double* B, const int& ldb, int* info) const; 1561 void POEQU(const int& n, const double* A, const int& lda, double* S, double* scond, double* amax, int* info) const; 1562 void 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; 1563 1564 void 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; 1565 1566 // General linear system routines 1567 void 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; 1568 void 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; 1569 void 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; 1570 void 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; 1571 void GEQRF(const int& m, const int& n, double* A, const int& lda, double* TAU, double* WORK, const int& lwork, int* info) const; 1572 void GEQR2(const int& m, const int& n, double A[], const int& lda, double TAU[], double WORK[], int* const info) const; 1573 void GETRF(const int& m, const int& n, double* A, const int& lda, int* IPIV, int* info) const; 1574 void 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; 1575 void 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; 1576 1577 void 1578 GEQP3 (const int& m, 1579 const int& n, 1580 double* A, 1581 const int& lda, 1582 int* jpvt, 1583 double* TAU, 1584 double* WORK, 1585 const int& lwork, 1586 double* RWORK, 1587 int* info) const; 1588 1589 void LASWP (const int& N, 1590 double A[], 1591 const int& LDA, 1592 const int& K1, 1593 const int& K2, 1594 const int IPIV[], 1595 const int& INCX) const; 1596 1597 void GBTRF(const int& m, const int& n, const int& kl, const int& ku, double* A, const int& lda, int* IPIV, int* info) const; 1598 void 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; 1599 void GTTRF(const int& n, double* dl, double* d, double* du, double* du2, int* IPIV, int* info) const; 1600 void 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; 1601 void GETRI(const int& n, double* A, const int& lda, const int* IPIV, double* WORK, const int& lwork, int* info) const; 1602 void LATRS (const char& UPLO, const char& TRANS, const char& DIAG, const char& NORMIN, const int& N, double* A, const int& LDA, double* X, double* SCALE, double* CNORM, int* INFO) const; 1603 void 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; 1604 void 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; 1605 double LANGB(const char& NORM, const int& n, const int& kl, const int& ku, const double* A, const int& lda, double* WORK) const; 1606 void GESV(const int& n, const int& nrhs, double* A, const int& lda, int* IPIV, double* B, const int& ldb, int* info) const; 1607 void 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; 1608 void 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; 1609 void 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; 1610 void 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; 1611 1612 void 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; 1613 1614 void 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; 1615 void 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; 1616 void 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; 1617 void TRTRI(const char& UPLO, const char& DIAG, const int& n, const double* A, const int& lda, int* info) const; 1618 1619 // Symmetric eigenproblem routines. 1620 void STEQR(const char& COMPZ, const int& n, double* D, double* E, double* Z, const int& ldz, double* WORK, int* info) const; 1621 void PTEQR(const char& COMPZ, const int& n, double* D, double* E, double* Z, const int& ldz, double* WORK, int* info) const; 1622 void SPEV(const char& JOBZ, const char& UPLO, const int& n, double* AP, double* W, double* Z, const int& ldz, double* WORK, int* info) const; 1623 void 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; 1624 void 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; 1625 void 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; 1626 void 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; 1627 1628 // Non-Hermitian eigenproblem routines. 1629 void 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; 1630 void 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; 1631 void 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; 1632 1633 void 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; 1634 void 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, double* RWORK, int* info) const; 1635 1636 void 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; 1637 void 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; 1638 void 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, double* rwork, int* IWORK, int* BWORK, int* info) const; 1639 void 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; 1640 void TRSEN(const char& JOB, const char& COMPQ, const int* SELECT, const int& n, double* T, const int& ldt, double* Q, const int& ldq, double* WR, double* WI, int* M, double* S, double* SEP, double* WORK, const int& lwork, int* IWORK, const int& liwork, int* info ) const; 1641 void TGSEN(const int& ijob, const int& wantq, const int& wantz, const int* SELECT, const int& n, double* A, const int& lda, double* B, const int& ldb, double* ALPHAR, double* ALPHAI, double* BETA, double* Q, const int& ldq, double* Z, const int& ldz, int* M, double* PL, double* PR, double* DIF, double* WORK, const int& lwork, int* IWORK, const int& liwork, int* info ) const; 1642 void GGES(const char& JOBVL, const char& JOBVR, const char& SORT, int (*ptr2func)(double*, double*, double*), const int& n, double* A, const int& lda, double* B, const int& ldb, int* sdim, double* ALPHAR, double* ALPHAI, double* BETA, double* VL, const int& ldvl, double* VR, const int& ldvr, double* WORK, const int& lwork, int* bwork, int* info ) const; 1643 1644 1645 // SVD routine 1646 void 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; 1647 1648 // Orthogonal matrix routines. 1649 void 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; 1650 void ORM2R(const char& SIDE, const char& TRANS, const int& m, const int& n, const int& k, const double A[], const int& lda, const double TAU[], double C[], const int& ldc, double WORK[], int* const info) const; 1651 void 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; 1652 void UNM2R(const char& SIDE, const char& TRANS, const int& M, const int& N, const int& K, const double A[], const int& LDA, const double TAU[], double C[], const int& LDC, double WORK[], int* const INFO) const; 1653 void 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; 1654 void 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; 1655 void 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; 1656 void 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; 1657 1658 // Triangular matrix routines. 1659 void 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; 1660 void 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; 1661 1662 void 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; 1663 1664 void TGEVC(const char& SIDE, const char& HOWMNY, const int* SELECT, const int& n, double* S, const int& lds, double* P, const int& ldp, double* VL, const int& ldvl, double* VR, const int& ldvr, const int& mm, int* M, double* WORK, int* info) const; 1665 1666 // Rotation/reflection generators 1667 void LARTG( const double& f, const double& g, double* c, double* s, double* r ) const; 1668 void LARFG( const int& n, double* alpha, double* x, const int& incx, double* tau ) const; 1669 1670 // Matrix balancing routines. 1671 1672 void GEBAL(const char& JOBZ, const int& n, double* A, const int& lda, int* ilo, int* ihi, double* scale, int* info) const; 1673 1674 void 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; 1675 1676 // Random number generators 1677 double LARND( const int& idist, int* seed ) const; 1678 void LARNV( const int& idist, int* seed, const int& n, double* v ) const; 1679 1680 // Machine characteristic routines. 1681 double LAMCH(const char& CMACH) const; 1682 int ILAENV( const int& ispec, const std::string& NAME, const std::string& OPTS, const int& N1 = -1, const int& N2 = -1, const int& N3 = -1, const int& N4 = -1 ) const; 1683 1684 // Miscellaneous routines. 1685 double LAPY2(const double& x, const double& y) const; 1686 1687 }; 1688 1689 // END INT, DOUBLE SPECIALIZATION DECLARATION // 1690 1691 #ifdef HAVE_TEUCHOS_COMPLEX 1692 1693 // BEGIN INT, COMPLEX<FLOAT> SPECIALIZATION DECLARATION // 1694 1695 template<> 1696 class TEUCHOSNUMERICS_LIB_DLL_EXPORT LAPACK<int, std::complex<float> > 1697 { 1698 public: LAPACK(void)1699 inline LAPACK(void) {} LAPACK(const LAPACK<int,std::complex<float>> & lapack)1700 inline LAPACK(const LAPACK<int, std::complex<float> >& lapack) {} ~LAPACK(void)1701 inline virtual ~LAPACK(void) {} 1702 1703 // Symmetric positive definite linear system routines 1704 void PTTRF(const int& n, std::complex<float>* d, std::complex<float>* e, int* info) const; 1705 void 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; 1706 void POTRF(const char& UPLO, const int& n, std::complex<float>* A, const int& lda, int* info) const; 1707 void 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; 1708 void POTRI(const char& UPLO, const int& n, std::complex<float>* A, const int& lda, int* info) const; 1709 void 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; 1710 void 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; 1711 void POEQU(const int& n, const std::complex<float>* A, const int& lda, float* S, float* scond, float* amax, int* info) const; 1712 void 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; 1713 1714 void 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; 1715 1716 // General Linear System Routines 1717 void 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; 1718 void 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; 1719 void 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; 1720 void GEQR2(const int& m, const int& n, std::complex<float> A[], const int& lda, std::complex<float> TAU[], std::complex<float> WORK[], int* const info) const; 1721 void 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; 1722 void 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; 1723 void UNM2R(const char& SIDE, const char& TRANS, const int& M, const int& N, const int& K, const std::complex<float> A[], const int& LDA, const std::complex<float> TAU[], std::complex<float> C[], const int& LDC, std::complex<float> WORK[], int* const INFO) const; 1724 void GETRF(const int& m, const int& n, std::complex<float>* A, const int& lda, int* IPIV, int* info) const; 1725 void 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; 1726 void 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; 1727 1728 void 1729 GEQP3 (const int& m, 1730 const int& n, 1731 std::complex<float>* A, 1732 const int& lda, 1733 int* jpvt, 1734 std::complex<float>* TAU, 1735 std::complex<float>* WORK, 1736 const int& lwork, 1737 float* RWORK, 1738 int* info) const; 1739 1740 void LASWP (const int& N, 1741 std::complex<float> A[], 1742 const int& LDA, 1743 const int& K1, 1744 const int& K2, 1745 const int IPIV[], 1746 const int& INCX) const; 1747 1748 void 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; 1749 void 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; 1750 void 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; 1751 void 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; 1752 void GETRI(const int& n, std::complex<float>* A, const int& lda, const int* IPIV, std::complex<float>* WORK, const int& lwork, int* info) const; 1753 void LATRS (const char& UPLO, const char& TRANS, const char& DIAG, const char& NORMIN, const int& N, std::complex<float>* A, const int& LDA, std::complex<float>* X, float* SCALE, float* CNORM, int* INFO) const; 1754 void 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; 1755 void 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; 1756 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; 1757 void 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; 1758 void 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; 1759 void 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; 1760 void 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; 1761 void 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; 1762 1763 void 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; 1764 1765 void 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; 1766 void 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; 1767 void TRTRI(const char& UPLO, const char& DIAG, const int& n, const std::complex<float>* A, const int& lda, int* info) const; 1768 1769 // Symmetric eigenvalue routines. 1770 void STEQR(const char& COMPZ, const int& n, float* D, float* E, std::complex<float>* Z, const int& ldz, float* WORK, int* info) const; 1771 void PTEQR(const char& COMPZ, const int& n, float* D, float* E, std::complex<float>* Z, const int& ldz, float* WORK, int* info) const; 1772 void 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; 1773 void 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; 1774 1775 // Non-Hermitian eigenvalue routines. 1776 void 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; 1777 void 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; 1778 void 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; 1779 1780 void 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; 1781 void GEEV(const char& JOBVL, const char& JOBVR, const int& n, std::complex<float>* A, const int& lda, float* WR, float* WI, 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; 1782 1783 void 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; 1784 1785 void 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; 1786 void GGEVX(const char& BALANC, const char& JOBVL, const char& JOBVR, const char& SENSE, const int& n, std::complex<float>* A, const int& lda, std::complex<float>* B, const int& ldb, float* ALPHAR, float* ALPHAI, std::complex<float>* BETA, std::complex<float>* VL, const int& ldvl, std::complex<float>* VR, const int& ldvr, int* ilo, int* ihi, float* lscale, float* rscale, float* abnrm, float* bbnrm, float* RCONDE, float* RCONDV, std::complex<float>* WORK, const int& lwork, float* RWORK, int* IWORK, int* BWORK, int* info) const; 1787 void GGEV(const char& JOBVL, const char& JOBVR, 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, std::complex<float> *WORK, const int& lwork, float* RWORK, int* info) const; 1788 1789 // SVD routine 1790 void 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; 1791 1792 // Triangular matrix routines. 1793 void 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; 1794 void 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; 1795 1796 void 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; 1797 1798 // Rotation/reflection generators 1799 void LARTG( const std::complex<float> f, const std::complex<float> g, float* c, std::complex<float>* s, std::complex<float>* r ) const; 1800 void LARFG( const int& n, std::complex<float>* alpha, std::complex<float>* x, const int& incx, std::complex<float>* tau ) const; 1801 1802 // Matrix balancing routines. 1803 1804 void GEBAL(const char& JOBZ, const int& n, std::complex<float>* A, const int& lda, int* ilo, int* ihi, float* scale, int* info) const; 1805 1806 void 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; 1807 1808 // Random number generators 1809 std::complex<float> LARND( const int& idist, int* seed ) const; 1810 void LARNV( const int& idist, int* seed, const int& n, std::complex<float>* v ) const; 1811 1812 // Machine characteristics 1813 int ILAENV( const int& ispec, const std::string& NAME, const std::string& OPTS, const int& N1 = -1, const int& N2 = -1, const int& N3 = -1, const int& N4 = -1 ) const; 1814 1815 }; 1816 1817 // END INT, COMPLEX<FLOAT> SPECIALIZATION DECLARATION // 1818 1819 // BEGIN INT, COMPLEX<DOUBLE> SPECIALIZATION DECLARATION // 1820 1821 template<> 1822 class TEUCHOSNUMERICS_LIB_DLL_EXPORT LAPACK<int, std::complex<double> > 1823 { 1824 public: LAPACK(void)1825 inline LAPACK(void) {} LAPACK(const LAPACK<int,std::complex<double>> & lapack)1826 inline LAPACK(const LAPACK<int, std::complex<double> >& lapack) {} ~LAPACK(void)1827 inline virtual ~LAPACK(void) {} 1828 1829 // Symmetric positive definite linear system routines 1830 void PTTRF(const int& n, std::complex<double>* d, std::complex<double>* e, int* info) const; 1831 void 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; 1832 void POTRF(const char& UPLO, const int& n, std::complex<double>* A, const int& lda, int* info) const; 1833 void 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; 1834 void POTRI(const char& UPLO, const int& n, std::complex<double>* A, const int& lda, int* info) const; 1835 void 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; 1836 void 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; 1837 void POEQU(const int& n, const std::complex<double>* A, const int& lda, double* S, double* scond, double* amax, int* info) const; 1838 void 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; 1839 1840 void 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; 1841 1842 // General Linear System Routines 1843 void 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; 1844 void 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; 1845 void 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; 1846 void GEQR2(const int& m, const int& n, std::complex<double> A[], const int& lda, std::complex<double> TAU[], std::complex<double> WORK[], int* const info) const; 1847 void 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; 1848 void 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; 1849 void UNM2R(const char& SIDE, const char& TRANS, const int& M, const int& N, const int& K, const std::complex<double> A[], const int& LDA, const std::complex<double> TAU[], std::complex<double> C[], const int& LDC, std::complex<double> WORK[], int* const INFO) const; 1850 1851 void GETRF(const int& m, const int& n, std::complex<double>* A, const int& lda, int* IPIV, int* info) const; 1852 void 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; 1853 void 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; 1854 1855 void 1856 GEQP3 (const int& m, 1857 const int& n, 1858 std::complex<double>* A, 1859 const int& lda, 1860 int* jpvt, 1861 std::complex<double>* TAU, 1862 std::complex<double>* WORK, 1863 const int& lwork, 1864 double* RWORK, 1865 int* info) const; 1866 1867 void LASWP (const int& N, 1868 std::complex<double> A[], 1869 const int& LDA, 1870 const int& K1, 1871 const int& K2, 1872 const int IPIV[], 1873 const int& INCX) const; 1874 1875 void 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; 1876 void 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; 1877 void 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; 1878 void 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; 1879 void GETRI(const int& n, std::complex<double>* A, const int& lda, const int* IPIV, std::complex<double>* WORK, const int& lwork, int* info) const; 1880 void LATRS (const char& UPLO, const char& TRANS, const char& DIAG, const char& NORMIN, const int& N, std::complex<double>* A, const int& LDA, std::complex<double>* X, double* SCALE, double* CNORM, int* INFO) const; 1881 void 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; 1882 void 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; 1883 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; 1884 void 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; 1885 void 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; 1886 void 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; 1887 void 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; 1888 void 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; 1889 1890 void 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; 1891 1892 void 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; 1893 void 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; 1894 void TRTRI(const char& UPLO, const char& DIAG, const int& n, const std::complex<double>* A, const int& lda, int* info) const; 1895 1896 // Symmetric eigenvalue routines. 1897 void STEQR(const char& COMPZ, const int& n, double* D, double* E, std::complex<double>* Z, const int& ldz, double* WORK, int* info) const; 1898 void PTEQR(const char& COMPZ, const int& n, double* D, double* E, std::complex<double>* Z, const int& ldz, double* WORK, int* info) const; 1899 void 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; 1900 void 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; 1901 1902 // Non-hermitian eigenvalue routines. 1903 void 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; 1904 void 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; 1905 void 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; 1906 1907 void 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; 1908 void GEEV(const char& JOBVL, const char& JOBVR, const int& n, std::complex<double>* A, const int& lda, double* WR, double* WI, 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; 1909 1910 void 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; 1911 void 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; 1912 void GGEVX(const char& BALANC, const char& JOBVL, const char& JOBVR, const char& SENSE, const int& n, std::complex<double>* A, const int& lda, std::complex<double>* B, const int& ldb, double* ALPHAR, double* ALPHAI, std::complex<double>* BETA, std::complex<double>* VL, const int& ldvl, std::complex<double>* VR, const int& ldvr, int* ilo, int* ihi, double* lscale, double* rscale, double* abnrm, double* bbnrm, double* RCONDE, double* RCONDV, std::complex<double>* work, const int& lwork, double* RWORK, int* IWORK, int* BWORK, int* info) const; 1913 void GGEV(const char& JOBVL, const char& JOBVR, 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, std::complex<double> *WORK, const int& lwork, double* RWORK, int* info) const; 1914 1915 // SVD routine 1916 void 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; 1917 1918 // Triangular matrix routines. 1919 void 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; 1920 void 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; 1921 1922 void 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; 1923 1924 // Rotation/reflection generators 1925 void LARTG( const std::complex<double> f, const std::complex<double> g, double* c, std::complex<double>* s, std::complex<double>* r ) const; 1926 void LARFG( const int& n, std::complex<double>* alpha, std::complex<double>* x, const int& incx, std::complex<double>* tau ) const; 1927 1928 // Matrix balancing routines. 1929 1930 void GEBAL(const char& JOBZ, const int& n, std::complex<double>* A, const int& lda, int* ilo, int* ihi, double* scale, int* info) const; 1931 1932 void 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; 1933 1934 // Random number generators 1935 std::complex<double> LARND( const int& idist, int* seed ) const; 1936 void LARNV( const int& idist, int* seed, const int& n, std::complex<double>* v ) const; 1937 1938 // Machine characteristics 1939 int ILAENV( const int& ispec, const std::string& NAME, const std::string& OPTS, const int& N1 = -1, const int& N2 = -1, const int& N3 = -1, const int& N4 = -1 ) const; 1940 1941 }; 1942 1943 // END INT, COMPLEX<DOUBLE> SPECIALIZATION DECLARATION // 1944 1945 #endif // HAVE_TEUCHOS_COMPLEX 1946 1947 #ifdef HAVE_TEUCHOSCORE_QUADMATH 1948 1949 // BEGIN int, __float128 SPECIALIZATION DECLARATION // 1950 1951 // mfh 18 Sep 2015: I had to write this specialization by hand, 1952 // since LAPACK does not provide it, so it is not complete. 1953 template<> 1954 class TEUCHOSNUMERICS_LIB_DLL_EXPORT LAPACK<int, __float128> 1955 { 1956 public: LAPACK(void)1957 inline LAPACK(void) {} LAPACK(const LAPACK<int,__float128> & lapack)1958 inline LAPACK(const LAPACK<int, __float128>& lapack) {} ~LAPACK(void)1959 inline virtual ~LAPACK(void) {} 1960 1961 void GEQRF(const int& m, const int& n, __float128* A, const int& lda, __float128* TAU, __float128* WORK, const int& lwork, int* info) const; 1962 void GEQR2(const int& m, const int& n, __float128 A[], const int& lda, __float128 TAU[], __float128 WORK[], int* const info) const; 1963 void GETRF(const int& m, const int& n, __float128* A, const int& lda, int* IPIV, int* info) const; 1964 void GETRS(const char& TRANS, const int& n, const int& nrhs, const __float128* A, const int& lda, const int* IPIV, __float128* B, const int& ldb, int* info) const; 1965 void GETRI(const int& n, __float128* A, const int& lda, const int* IPIV, __float128* WORK, const int& lwork, int* info) const; 1966 void LASWP (const int& N, __float128 A[], const int& LDA, const int& K1, const int& K2, const int IPIV[], const int& INCX) const; 1967 1968 void ORM2R(const char& SIDE, const char& TRANS, const int& m, const int& n, const int& k, const __float128 A[], const int& lda, const __float128 TAU[], __float128 C[], const int& ldc, __float128 WORK[], int* const info) const; 1969 void ORGQR(const int& m, const int& n, const int& k, __float128* A, const int& lda, const __float128* TAU, __float128* WORK, const int& lwork, int* info) const; 1970 void UNGQR(const int& m, const int& n, const int& k, __float128* A, const int& lda, const __float128* TAU, __float128* WORK, const int& lwork, int* info) const; 1971 1972 void LARFG( const int& n, __float128* alpha, __float128* x, const int& incx, __float128* tau ) const; 1973 1974 __float128 LAPY2 (const __float128 x, const __float128 y) const; 1975 void LASCL (const char& TYPE, const int& kl, const int& ku, const __float128 cfrom, const __float128 cto, const int& m, const int& n, __float128* A, const int& lda, int* info) const; 1976 1977 void GBTRF (const int& m, const int& n, const int& kl, const int& ku, __float128* A, const int& lda, int* IPIV, int* info) const; 1978 void GBTRS (const char& TRANS, const int& n, const int& kl, const int& ku, const int& nrhs, const __float128* A, const int& lda, const int* IPIV, __float128* B, const int& ldb, int* info) const; 1979 }; 1980 1981 // END int, __float128 SPECIALIZATION DECLARATION // 1982 1983 #endif // HAVE_TEUCHOSCORE_QUADMATH 1984 1985 #endif // DOXYGEN_SHOULD_SKIP_THIS 1986 1987 } // namespace Teuchos 1988 1989 #endif // _TEUCHOS_LAPACK_HPP_ 1990