MOOCHO (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DenseLinAlgPack_LAPACK_Cpp.hpp
Go to the documentation of this file.
1 // @HEADER
2 // ***********************************************************************
3 //
4 // Moocho: Multi-functional Object-Oriented arCHitecture for Optimization
5 // Copyright (2003) 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 Roscoe A. Bartlett (rabartl@sandia.gov)
38 //
39 // ***********************************************************************
40 // @HEADER
41 
42 #ifndef LAPACK_CPP_H
43 #define LAPACK_CPP_H
44 
47 
48 // Cpp Declarations for calling LAPACK functions that
49 // use function overloading to remove the floating point
50 // typeds from the names and use enumerations to replace
51 // the char arguments.
52 
53 namespace LAPACK_Cpp {
54 
59 
60 // xPOTRF
61 
62 inline
65  , const f_int& n, f_dbl_prec* A, const f_int& lda
66  , f_int* info )
67 {
69  ,n ,A ,lda ,info );
70 }
71 
72 // xGEQRF
73 
74 inline
76 void geqrf( const f_int& m
77  , const f_int& n, f_dbl_prec* A, const f_int& lda
78  , f_dbl_prec* tau, f_dbl_prec* work
79  , const f_int& lwork, f_int* info )
80 {
81  LAPACK_C_Decl::dgeqrf(m,n,A,lda,tau,work,lwork,info);
82 }
83 
84 // xORMQR
85 
86 inline
89  , const f_int& m, const f_int& n
90  , const f_int& k, const f_dbl_prec* A, const f_int& lda
91  , const f_dbl_prec* tau, f_dbl_prec* C, const f_int& ldc
92  , f_dbl_prec* work, const f_int& lwork, f_int* info )
93 {
95  , BLAS_Cpp::TransChar[trans], m, n, k, A, lda
96  , tau, C, ldc, work, lwork, info );
97 
98 }
99 
100 // xSYTRF
101 
102 inline
103 //
104 void sytrf( BLAS_Cpp::Uplo uplo, const f_int& n, f_dbl_prec A[]
105  , const f_int& lda, f_int ipiv[], f_dbl_prec work[], const f_int& lwork
106  , f_int* info )
107 {
109  , n, A, lda, ipiv, work, lwork, info );
110 }
111 
112 // xSYTRS
113 
114 inline
117  , const f_int& n, const f_int& nrhs, const f_dbl_prec A[]
118  , const f_int& lda, const f_int ipiv[], f_dbl_prec B[]
119  , const f_int& ldb, f_int* info )
120 {
122  , n, nrhs, A, lda, ipiv, B, ldb, info );
123 }
124 
125 // xGETRF
126 
127 inline
128 //
129 void getrf(
130  const f_int& m, const f_int& n, f_dbl_prec A[]
131  ,const f_int& lda, f_int ipiv[], f_int* info )
132 {
133  LAPACK_C_Decl::dgetrf( m, n, A, lda, ipiv, info );
134 }
135 
136 // xGETRS
137 
138 inline
140 void getrs(
142  ,const f_int& n, const f_int& nrhs, const f_dbl_prec A[]
143  , const f_int& lda, const f_int ipiv[], f_dbl_prec B[]
144  , const f_int& ldb, f_int* info )
145 {
147  BLAS_Cpp::TransChar[trans], n, nrhs, A, lda, ipiv, B, ldb, info
148  );
149 }
150 
151 } // end namespace LAPACK_Cpp
152 
153 #endif // LAPACK_CPP_H
void getrf(const f_int &m, const f_int &n, f_dbl_prec A[], const f_int &lda, f_int ipiv[], f_int *info)
void ormqr(BLAS_Cpp::Side side, BLAS_Cpp::Transp trans, const f_int &m, const f_int &n, const f_int &k, const f_dbl_prec *A, const f_int &lda, const f_dbl_prec *tau, f_dbl_prec *C, const f_int &ldc, f_dbl_prec *work, const f_int &lwork, f_int *info)
FortranTypes::f_int f_int
void geqrf(const f_int &m, const f_int &n, f_dbl_prec *A, const f_int &lda, f_dbl_prec *tau, f_dbl_prec *work, const f_int &lwork, f_int *info)
void dsytrs(const f_char &UPLO, const f_int &N, const f_int &NRHS, const f_dbl_prec A[], const f_int &LDA, const f_int IPIV[], f_dbl_prec B[], const f_int &LDB, f_int *INFO)
void dgeqrf(const f_int &M, const f_int &N, f_dbl_prec *A, const f_int &LDA, f_dbl_prec *TAU, f_dbl_prec *WORK, const f_int &LWORK, f_int *INFO)
const char UploChar[]
Transposed.
void getrs(BLAS_Cpp::Transp trans, const f_int &n, const f_int &nrhs, const f_dbl_prec A[], const f_int &lda, const f_int ipiv[], f_dbl_prec B[], const f_int &ldb, f_int *info)
FortranTypes::f_logical f_logical
void dpotrf(const f_char &UPLO, const f_int &N, f_dbl_prec *A, const f_int &LDA, f_int *INFO)
FortranTypes::f_dbl_prec f_dbl_prec
void potrf(BLAS_Cpp::Uplo uplo, const f_int &n, f_dbl_prec *A, const f_int &lda, f_int *info)
void sytrs(BLAS_Cpp::Uplo uplo, const f_int &n, const f_int &nrhs, const f_dbl_prec A[], const f_int &lda, const f_int ipiv[], f_dbl_prec B[], const f_int &ldb, f_int *info)
void dsytrf(const f_char &UPLO, const f_int &N, f_dbl_prec A[], const f_int &LDA, f_int IPIV[], f_dbl_prec WORK[], const f_int &LWORK, f_int *INFO)
FortranTypes::f_real f_real
void dormqr(const f_char &SIDE, const f_char &TRANS, const f_int &M, const f_int &N, const f_int &K, const f_dbl_prec *A, const f_int &LDA, const f_dbl_prec *TAU, f_dbl_prec *C, const f_int &LDC, f_dbl_prec *WORK, const f_int &LWORK, f_int *INFO)
void dgetrs(const f_char &TRANS, const f_int &N, const f_int &NRHS, const f_dbl_prec A[], const f_int &LDA, const f_int IPIV[], f_dbl_prec B[], const f_int &LDB, f_int *INFO)
void dgetrf(const f_int &M, const f_int &N, f_dbl_prec A[], const f_int &LDA, f_int IPIV[], f_int *INFO)
const char SideChar[]
Transp
TRANS.
const char TransChar[]
void sytrf(BLAS_Cpp::Uplo uplo, const f_int &n, f_dbl_prec A[], const f_int &lda, f_int ipiv[], f_dbl_prec work[], const f_int &lwork, f_int *info)