|
Anasazi Version of the Day
|
00001 // @HEADER 00002 // *********************************************************************** 00003 // 00004 // Anasazi: Block Eigensolvers Package 00005 // Copyright (2010) Sandia Corporation 00006 // 00007 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive 00008 // license for use of this work by or on behalf of the U.S. Government. 00009 // 00010 // This library is free software; you can redistribute it and/or modify 00011 // it under the terms of the GNU Lesser General Public License as 00012 // published by the Free Software Foundation; either version 2.1 of the 00013 // License, or (at your option) any later version. 00014 // 00015 // This library is distributed in the hope that it will be useful, but 00016 // WITHOUT ANY WARRANTY; without even the implied warranty of 00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00018 // Lesser General Public License for more details. 00019 // 00020 // You should have received a copy of the GNU Lesser General Public 00021 // License along with this library; if not, write to the Free Software 00022 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 00023 // USA 00024 // Questions? Contact Michael A. Heroux (maherou@sandia.gov) 00025 // 00026 // *********************************************************************** 00027 // @HEADER 00028 00029 #ifndef __TSQR_Tsqr_Lapack_hpp 00030 #define __TSQR_Tsqr_Lapack_hpp 00031 00032 #include "Tsqr_ScalarTraits.hpp" 00033 00036 00037 namespace TSQR { 00038 00039 template< class Ordinal, class Scalar > 00040 class LAPACK { 00041 public: 00042 typedef Ordinal ordinal_type; 00043 typedef Scalar scalar_type; 00046 typedef typename ScalarTraits< Scalar >::magnitude_type magnitude_type; 00047 00048 LAPACK () {} 00049 00056 static bool QR_produces_R_factor_with_nonnegative_diagonal(); 00057 00062 void 00063 LARFP (const Ordinal n, 00064 Scalar& alpha, 00065 Scalar x[], 00066 const Ordinal incx, 00067 Scalar& tau); 00068 00073 void 00074 GEQRF (const Ordinal m, 00075 const Ordinal n, 00076 Scalar A[], 00077 const Ordinal lda, 00078 Scalar tau[], 00079 Scalar work[], 00080 const int lwork, 00081 int* const INFO); 00082 00087 void 00088 GEQR2 (const Ordinal m, 00089 const Ordinal n, 00090 Scalar A[], 00091 const Ordinal lda, 00092 Scalar tau[], 00093 Scalar work[], 00094 int* const INFO); 00095 00096 void 00097 ORM2R (const char* const side, 00098 const char* const trans, 00099 const Ordinal m, 00100 const Ordinal n, 00101 const Ordinal k, 00102 const Scalar A[], 00103 const Ordinal lda, 00104 const Scalar tau[], 00105 Scalar C[], 00106 const Ordinal ldc, 00107 Scalar work[], 00108 int* const info); 00109 00110 void 00111 ORMQR (const char* const side, 00112 const char* const trans, 00113 const Ordinal m, 00114 const Ordinal n, 00115 const Ordinal k, 00116 const Scalar A[], 00117 const Ordinal lda, 00118 const Scalar tau[], 00119 Scalar C[], 00120 const Ordinal ldc, 00121 Scalar work[], 00122 const int lwork, 00123 int* const INFO); 00124 00125 void 00126 ORGQR (const Ordinal m, 00127 const Ordinal n, 00128 const Ordinal k, 00129 Scalar A[], 00130 const Ordinal lda, 00131 Scalar tau[], 00132 Scalar work[], 00133 const int lwork, 00134 int* const INFO); 00135 00136 void 00137 POTRF (const char* const uplo, 00138 const Ordinal n, 00139 Scalar A[], 00140 const Ordinal lda, 00141 int* const INFO); 00142 00143 void 00144 POTRS (const char* const uplo, 00145 const Ordinal n, 00146 const Ordinal nrhs, 00147 const Scalar A[], 00148 const Ordinal lda, 00149 Scalar B[], 00150 const Ordinal ldb, 00151 int* const INFO); 00152 00153 void 00154 POTRI (const char* const uplo, 00155 const Ordinal n, 00156 Scalar A[], 00157 const Ordinal lda, 00158 int* const INFO); 00159 00160 void 00161 LARNV (const int idist, 00162 int iseed[], 00163 const Ordinal n, 00164 Scalar x[]); 00165 00166 void 00167 GESVD (const char* const jobu, 00168 const char* const jobvt, 00169 const Ordinal m, 00170 const Ordinal n, 00171 Scalar A[], 00172 const Ordinal lda, 00173 magnitude_type s[], 00174 Scalar U[], 00175 const Ordinal ldu, 00176 Scalar VT[], 00177 const Ordinal ldvt, 00178 Scalar work[], 00179 const Ordinal lwork, 00180 magnitude_type rwork[], 00181 int* const INFO); 00182 00183 private: 00184 LAPACK (const LAPACK&); 00185 LAPACK& operator= (const LAPACK&); 00186 }; 00187 00188 } // namespace TSQR 00189 00190 #endif // __TSQR_Tsqr_Lapack_hpp
1.7.4