00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #ifndef TOON_INCLUDE_LAPCK_H
00031 #define TOON_INCLUDE_LAPCK_H
00032
00033
00034 namespace TooN {
00035
00036 extern "C" {
00037
00038 void dgetrf_(int* M, int *N, double* A, int* lda, int* IPIV, int* INFO);
00039 void sgetrf_(int* M, int *N, float* A, int* lda, int* IPIV, int* INFO);
00040
00041
00042 void dgetri_(int* N, double* A, int* lda, int* IPIV, double* WORK, int* lwork, int* INFO);
00043 void sgetri_(int* N, float* A, int* lda, int* IPIV, float* WORK, int* lwork, int* INFO);
00044
00045
00046 void dtrsm_(char* SIDE, char* UPLO, char* TRANSA, char* DIAG, int* M, int* N, double* alpha, double* A, int* lda, double* B, int* ldb);
00047 void strsm_(char* SIDE, char* UPLO, char* TRANSA, char* DIAG, int* M, int* N, float* alpha, float* A, int* lda, float* B, int* ldb);
00048
00049
00050
00051 void dgesvd_(const char* JOBU, const char* JOBVT, int* M, int *N, double* A, int* lda,
00052 double* S, double *U, int* ldu, double* VT, int* ldvt,
00053 double* WORK, int* lwork, int* INFO);
00054
00055 void sgesvd_(const char* JOBU, const char* JOBVT, int* M, int *N, float* A, int* lda,
00056 float* S, float *U, int* ldu, float* VT, int* ldvt,
00057 float* WORK, int* lwork, int* INFO);
00058
00059
00060 void dsyev_(const char* JOBZ, const char* UPLO, int* N, double* A, int* lda, double* W, double* WORK, int* LWORK, int* INFO);
00061 void ssyev_(const char* JOBZ, const char* UPLO, int* N, float* A, int* lda, float* W, float* WORK, int* LWORK, int* INFO);
00062
00063
00064 void dgeev_(const char* JOBVL, const char* JOBVR, int* N, double* A, int* lda, double* WR, double* WI, double* VL, int* LDVL, double* VR, int* LDVR , double* WORK, int* LWORK, int* INFO);
00065 void sgeev_(const char* JOBVL, const char* JOBVR, int* N, float* A, int* lda, float* WR, float* WI, float* VL, int* LDVL, float* VR, int* LDVR , float* WORK, int* LWORK, int* INFO);
00066
00067
00068 void dpotrf_(const char* UPLO, const int* N, double* A, const int* LDA, int* INFO);
00069 void spotrf_(const char* UPLO, const int* N, float* A, const int* LDA, int* INFO);
00070
00071
00072 void dpotrs_(const char* UPLO, const int* N, const int* NRHS, const double* A, const int* LDA, double* B, const int* LDB, int* INFO);
00073 void spotrs_(const char* UPLO, const int* N, const int* NRHS, const float* A, const int* LDA, float* B, const int* LDB, int* INFO);
00074
00075
00076 void dpotri_(const char* UPLO, const int* N, double* A, const int* LDA, int* INFO);
00077 void spotri_(const char* UPLO, const int* N, float* A, const int* LDA, int* INFO);
00078
00079
00080 void sgeqp3_(int* M, int* N, float* A, int* LDA, int* JPVT, float* TAU, float* WORK, int* LWORK, int* INFO );
00081 void dgeqp3_(int* M, int* N, double* A, int* LDA, int* JPVT, double* TAU, double* WORK, int* LWORK, int* INFO );
00082
00083
00084 void sorgqr_(int* M,int* N,int* K, float* A, int* LDA, float* TAU, float* WORK, int* LWORK, int* INFO );
00085 void dorgqr_(int* M,int* N,int* K, double* A, int* LDA, double* TAU, double* WORK, int* LWORK, int* INFO );
00086 }
00087
00088
00090
00092
00093 inline void getrf_(int* M, int *N, float* A, int* lda, int* IPIV, int* INFO){
00094 sgetrf_(M, N, A, lda, IPIV, INFO);
00095 }
00096
00097 inline void getrf_(int* M, int *N, double* A, int* lda, int* IPIV, int* INFO){
00098 dgetrf_(M, N, A, lda, IPIV, INFO);
00099 }
00100
00101 inline void trsm_(const char* SIDE, const char* UPLO, const char* TRANSA, const char* DIAG, int* M, int* N, float* alpha, float* A, int* lda, float* B, int* ldb) {
00102 strsm_(const_cast<char*>(SIDE), const_cast<char*>(UPLO), const_cast<char*>(TRANSA), const_cast<char*>(DIAG), M, N, alpha, A, lda, B, ldb);
00103 }
00104
00105 inline void trsm_(const char* SIDE, const char* UPLO, const char* TRANSA, const char* DIAG, int* M, int* N, double* alpha, double* A, int* lda, double* B, int* ldb) {
00106 dtrsm_(const_cast<char*>(SIDE), const_cast<char*>(UPLO), const_cast<char*>(TRANSA), const_cast<char*>(DIAG), M, N, alpha, A, lda, B, ldb);
00107 }
00108
00109 inline void getri_(int* N, double* A, int* lda, int* IPIV, double* WORK, int* lwork, int* INFO){
00110 dgetri_(N, A, lda, IPIV, WORK, lwork, INFO);
00111 }
00112
00113 inline void getri_(int* N, float* A, int* lda, int* IPIV, float* WORK, int* lwork, int* INFO){
00114 sgetri_(N, A, lda, IPIV, WORK, lwork, INFO);
00115 }
00116
00117 inline void potrf_(const char * UPLO, const int* N, double* A, const int* LDA, int* INFO){
00118 dpotrf_(UPLO, N, A, LDA, INFO);
00119 }
00120
00121 inline void potrf_(const char * UPLO, const int* N, float* A, const int* LDA, int* INFO){
00122 spotrf_(UPLO, N, A, LDA, INFO);
00123 }
00124
00125
00126 inline void gesvd_(const char* JOBU, const char* JOBVT, int* M, int *N, double* A, int* lda,
00127 double* S, double *U, int* ldu, double* VT, int* ldvt,
00128 double* WORK, int* lwork, int* INFO){
00129 dgesvd_(JOBU, JOBVT, M, N, A, lda, S, U, ldu, VT, ldvt, WORK, lwork, INFO);
00130 }
00131
00132 inline void gesvd_(const char* JOBU, const char* JOBVT, int* M, int *N, float* A, int* lda,
00133 float* S, float *U, int* ldu, float* VT, int* ldvt,
00134 float* WORK, int* lwork, int* INFO){
00135 sgesvd_(JOBU, JOBVT, M, N, A, lda, S, U, ldu, VT, ldvt, WORK, lwork, INFO);
00136 }
00137
00138
00139 inline void potrs_(const char* UPLO, const int* N, const int* NRHS, const double* A, const int* LDA, double* B, const int* LDB, int* INFO){
00140 dpotrs_(UPLO, N, NRHS, A, LDA, B, LDB, INFO);
00141 }
00142
00143 inline void potrs_(const char* UPLO, const int* N, const int* NRHS, const float* A, const int* LDA, float* B, const int* LDB, int* INFO){
00144 spotrs_(UPLO, N, NRHS, A, LDA, B, LDB, INFO);
00145 }
00146
00147
00148 inline void potri_(const char* UPLO, const int* N, double* A, const int* LDA, int* INFO){
00149 dpotri_(UPLO, N, A, LDA, INFO);
00150 }
00151
00152 inline void potri_(const char* UPLO, const int* N, float* A, const int* LDA, int* INFO){
00153 spotri_(UPLO, N, A, LDA, INFO);
00154 }
00155
00156 inline void syev_(const char* JOBZ, const char* UPLO, int* N, double* A, int* lda, double* W, double* WORK, int* LWORK, int* INFO){
00157 dsyev_(JOBZ, UPLO, N, A, lda, W, WORK, LWORK, INFO);
00158 }
00159 inline void syev_(const char* JOBZ, const char* UPLO, int* N, float* A, int* lda, float* W, float* WORK, int* LWORK, int* INFO){
00160 ssyev_(JOBZ, UPLO, N, A, lda, W, WORK, LWORK, INFO);
00161 }
00162
00163
00164 inline void geqp3_(int* M, int* N, float* A, int* LDA, int* JPVT, float* TAU, float* WORK, int* LWORK, int* INFO )
00165 {
00166 sgeqp3_(M, N, A, LDA, JPVT, TAU, WORK, LWORK, INFO);
00167 }
00168
00169 inline void geqp3_(int* M, int* N, double* A, int* LDA, int* JPVT, double* TAU, double* WORK, int* LWORK, int* INFO )
00170 {
00171 dgeqp3_(M, N, A, LDA, JPVT, TAU, WORK, LWORK, INFO);
00172 }
00173
00174 inline void orgqr_(int* M,int* N,int* K, float* A, int* LDA, float* TAU, float* WORK, int* LWORK, int* INFO )
00175 {
00176 sorgqr_(M, N, K, A, LDA, TAU, WORK, LWORK, INFO);
00177 }
00178
00179 inline void orgqr_(int* M,int* N,int* K, double* A, int* LDA, double* TAU, double* WORK, int* LWORK, int* INFO )
00180 {
00181 dorgqr_(M, N, K, A, LDA, TAU, WORK, LWORK, INFO);
00182 }
00183
00184
00185 inline void geev_(const char* JOBVL, const char* JOBVR, int* N, double* A, int* lda, double* WR, double* WI, double* VL, int* LDVL, double* VR, int* LDVR , double* WORK, int* LWORK, int* INFO){
00186 dgeev_(JOBVL, JOBVR, N, A, lda, WR, WI, VL, LDVL, VR, LDVR , WORK, LWORK, INFO);
00187 }
00188
00189 inline void geev_(const char* JOBVL, const char* JOBVR, int* N, float* A, int* lda, float* WR, float* WI, float* VL, int* LDVL, float* VR, int* LDVR , float* WORK, int* LWORK, int* INFO){
00190 sgeev_(JOBVL, JOBVR, N, A, lda, WR, WI, VL, LDVL, VR, LDVR , WORK, LWORK, INFO);
00191 }
00192 }
00193 #endif