lapack_bones.hpp
Go to the documentation of this file.
00001 // Copyright (C) 2008-2011 NICTA (www.nicta.com.au)
00002 // Copyright (C) 2008-2011 Conrad Sanderson
00003 // Copyright (C)      2009 Edmund Highcock
00004 // Copyright (C)      2011 James Sanders
00005 // 
00006 // This file is part of the Armadillo C++ library.
00007 // It is provided without any warranty of fitness
00008 // for any purpose. You can redistribute this file
00009 // and/or modify it under the terms of the GNU
00010 // Lesser General Public License (LGPL) as published
00011 // by the Free Software Foundation, either version 3
00012 // of the License or (at your option) any later version.
00013 // (see http://www.opensource.org/licenses for more info)
00014 
00015 
00016 
00017 #ifdef ARMA_USE_LAPACK
00018 
00019 
00020 #if !defined(ARMA_BLAS_CAPITALS)
00021   
00022   #define arma_sgetrf sgetrf
00023   #define arma_dgetrf dgetrf
00024   #define arma_cgetrf cgetrf
00025   #define arma_zgetrf zgetrf
00026   
00027   #define arma_sgetri sgetri
00028   #define arma_dgetri dgetri
00029   #define arma_cgetri cgetri
00030   #define arma_zgetri zgetri
00031   
00032   #define arma_strtri strtri
00033   #define arma_dtrtri dtrtri
00034   #define arma_ctrtri ctrtri
00035   #define arma_ztrtri ztrtri
00036   
00037   #define arma_ssyev  ssyev
00038   #define arma_dsyev  dsyev
00039   
00040   #define arma_cheev  cheev
00041   #define arma_zheev  zheev
00042   
00043   #define arma_sgeev  sgeev
00044   #define arma_dgeev  dgeev
00045   
00046   #define arma_cgeev  cgeev
00047   #define arma_zgeev  zgeev
00048   
00049   #define arma_spotrf spotrf
00050   #define arma_dpotrf dpotrf
00051   #define arma_cpotrf cpotrf
00052   #define arma_zpotrf zpotrf
00053   
00054   #define arma_spotri spotri
00055   #define arma_dpotri dpotri
00056   #define arma_cpotri cpotri
00057   #define arma_zpotri zpotri
00058   
00059   #define arma_sgeqrf sgeqrf
00060   #define arma_dgeqrf dgeqrf
00061   #define arma_cgeqrf cgeqrf
00062   #define arma_zgeqrf zgeqrf
00063   
00064   #define arma_sorgqr sorgqr
00065   #define arma_dorgqr dorgqr
00066   
00067   #define arma_cungqr cungqr
00068   #define arma_zungqr zungqr
00069   
00070   #define arma_sgesvd sgesvd
00071   #define arma_dgesvd dgesvd
00072   
00073   #define arma_cgesvd cgesvd
00074   #define arma_zgesvd zgesvd
00075   
00076   #define arma_sgesv  sgesv
00077   #define arma_dgesv  dgesv
00078   #define arma_cgesv  cgesv
00079   #define arma_zgesv  zgesv
00080   
00081   #define arma_sgels  sgels
00082   #define arma_dgels  dgels
00083   #define arma_cgels  cgels
00084   #define arma_zgels  zgels
00085   
00086   #define arma_strtrs strtrs
00087   #define arma_dtrtrs dtrtrs
00088   #define arma_ctrtrs ctrtrs
00089   #define arma_ztrtrs ztrtrs
00090 
00091   #define arma_sgees  sgees
00092   #define arma_dgees  dgees
00093   #define arma_cgees  cgees
00094   #define arma_zgees  zgees
00095   
00096   #define arma_strsyl strsyl
00097   #define arma_dtrsyl dtrsyl
00098   #define arma_ctrsyl ctrsyl
00099   #define arma_ztrsyl ztrsyl
00100   
00101   #define arma_ssytrf ssytrf
00102   #define arma_dsytrf dsytrf
00103   #define arma_csytrf csytrf
00104   #define arma_zsytrf zsytrf
00105   
00106   #define arma_ssytri ssytri
00107   #define arma_dsytri dsytri
00108   #define arma_csytri csytri
00109   #define arma_zsytri zsytri
00110   
00111 #else
00112   
00113   #define arma_sgetrf SGETRF
00114   #define arma_dgetrf DGETRF
00115   #define arma_cgetrf CGETRF
00116   #define arma_zgetrf ZGETRF
00117   
00118   #define arma_sgetri SGETRI
00119   #define arma_dgetri DGETRI
00120   #define arma_cgetri CGETRI
00121   #define arma_zgetri ZGETRI
00122   
00123   #define arma_strtri STRTRI
00124   #define arma_dtrtri DTRTRI
00125   #define arma_ctrtri CTRTRI
00126   #define arma_ztrtri ZTRTRI
00127   
00128   #define arma_ssyev  SSYEV
00129   #define arma_dsyev  DSYEV
00130   
00131   #define arma_cheev  CHEEV
00132   #define arma_zheev  ZHEEV
00133   
00134   #define arma_sgeev  SGEEV
00135   #define arma_dgeev  DGEEV
00136   
00137   #define arma_cgeev  CGEEV
00138   #define arma_zgeev  ZGEEV
00139   
00140   #define arma_spotrf SPOTRF
00141   #define arma_dpotrf DPOTRF
00142   #define arma_cpotrf CPOTRF
00143   #define arma_zpotrf ZPOTRF
00144   
00145   #define arma_spotri SPOTRI
00146   #define arma_dpotri DPOTRI
00147   #define arma_cpotri CPOTRI
00148   #define arma_zpotri ZPOTRI
00149   
00150   #define arma_sgeqrf SGEQRF
00151   #define arma_dgeqrf DGEQRF
00152   #define arma_cgeqrf CGEQRF
00153   #define arma_zgeqrf ZGEQRF
00154   
00155   #define arma_sorgqr SORGQR
00156   #define arma_dorgqr DORGQR
00157   
00158   #define arma_cungqr CUNGQR
00159   #define arma_zungqr ZUNGQR
00160   
00161   #define arma_sgesvd SGESVD
00162   #define arma_dgesvd DGESVD
00163   
00164   #define arma_cgesvd CGESVD
00165   #define arma_zgesvd ZGESVD
00166   
00167   #define arma_sgesv  SGESV
00168   #define arma_dgesv  DGESV
00169   #define arma_cgesv  CGESV
00170   #define arma_zgesv  ZGESV
00171   
00172   #define arma_sgels  SGELS
00173   #define arma_dgels  DGELS
00174   #define arma_cgels  CGELS
00175   #define arma_zgels  ZGELS
00176   
00177   #define arma_strtrs STRTRS
00178   #define arma_dtrtrs DTRTRS
00179   #define arma_ctrtrs CTRTRS
00180   #define arma_ztrtrs ZTRTRS
00181 
00182   #define arma_sgees  SGEES
00183   #define arma_dgees  DGEES
00184   #define arma_cgees  CGEES
00185   #define arma_zgees  ZGEES
00186 
00187   #define arma_strsyl STRSYL
00188   #define arma_dtrsyl DTRSYL
00189   #define arma_ctrsyl CTRSYL
00190   #define arma_ztrsyl ZTRSYL
00191   
00192   #define arma_ssytrf SSYTRF
00193   #define arma_dsytrf DSYTRF
00194   #define arma_csytrf CSYTRF
00195   #define arma_zsytrf ZSYTRF
00196   
00197   #define arma_ssytri SSYTRI
00198   #define arma_dsytri DSYTRI
00199   #define arma_csytri CSYTRI
00200   #define arma_zsytri ZSYTRI
00201   
00202 #endif
00203 
00204 
00205 
00206 extern "C"
00207   {
00208   // LU factorisation
00209   void arma_fortran(arma_sgetrf)(blas_int* m, blas_int* n,  float* a, blas_int* lda, blas_int* ipiv, blas_int* info);
00210   void arma_fortran(arma_dgetrf)(blas_int* m, blas_int* n, double* a, blas_int* lda, blas_int* ipiv, blas_int* info);
00211   void arma_fortran(arma_cgetrf)(blas_int* m, blas_int* n,   void* a, blas_int* lda, blas_int* ipiv, blas_int* info);
00212   void arma_fortran(arma_zgetrf)(blas_int* m, blas_int* n,   void* a, blas_int* lda, blas_int* ipiv, blas_int* info);
00213   
00214   // matrix inversion (using LU factorisation result)
00215   void arma_fortran(arma_sgetri)(blas_int* n,  float* a, blas_int* lda, blas_int* ipiv,  float* work, blas_int* lwork, blas_int* info);
00216   void arma_fortran(arma_dgetri)(blas_int* n, double* a, blas_int* lda, blas_int* ipiv, double* work, blas_int* lwork, blas_int* info);
00217   void arma_fortran(arma_cgetri)(blas_int* n,  void*  a, blas_int* lda, blas_int* ipiv,   void* work, blas_int* lwork, blas_int* info);
00218   void arma_fortran(arma_zgetri)(blas_int* n,  void*  a, blas_int* lda, blas_int* ipiv,   void* work, blas_int* lwork, blas_int* info);
00219   
00220   // matrix inversion (triangular matrices)
00221   void arma_fortran(arma_strtri)(char* uplo, char* diag, blas_int* n,  float* a, blas_int* lda, blas_int* info);
00222   void arma_fortran(arma_dtrtri)(char* uplo, char* diag, blas_int* n, double* a, blas_int* lda, blas_int* info);
00223   void arma_fortran(arma_ctrtri)(char* uplo, char* diag, blas_int* n,   void* a, blas_int* lda, blas_int* info);
00224   void arma_fortran(arma_ztrtri)(char* uplo, char* diag, blas_int* n,   void* a, blas_int* lda, blas_int* info);
00225   
00226   // eigenvector decomposition of symmetric real matrices
00227   void arma_fortran(arma_ssyev)(char* jobz, char* uplo, blas_int* n,  float* a, blas_int* lda,  float* w,  float* work, blas_int* lwork, blas_int* info);
00228   void arma_fortran(arma_dsyev)(char* jobz, char* uplo, blas_int* n, double* a, blas_int* lda, double* w, double* work, blas_int* lwork, blas_int* info);
00229   
00230   // eigenvector decomposition of hermitian matrices (complex)
00231   void arma_fortran(arma_cheev)(char* jobz, char* uplo, blas_int* n,   void* a, blas_int* lda,  float* w,   void* work, blas_int* lwork,  float* rwork, blas_int* info);
00232   void arma_fortran(arma_zheev)(char* jobz, char* uplo, blas_int* n,   void* a, blas_int* lda, double* w,   void* work, blas_int* lwork, double* rwork, blas_int* info);
00233   
00234   // eigenvector decomposition of general real matrices
00235   void arma_fortran(arma_sgeev)(char* jobvl, char* jobvr, blas_int* n,  float* a, blas_int* lda,  float* wr,  float* wi,  float* vl, blas_int* ldvl,  float* vr, blas_int* ldvr,  float* work, blas_int* lwork, blas_int* info);
00236   void arma_fortran(arma_dgeev)(char* jobvl, char* jobvr, blas_int* n, double* a, blas_int* lda, double* wr, double* wi, double* vl, blas_int* ldvl, double* vr, blas_int* ldvr, double* work, blas_int* lwork, blas_int* info);
00237   
00238   // eigenvector decomposition of general complex matrices
00239   void arma_fortran(arma_cgeev)(char* jobvl, char* jobvr, blas_int* n, void* a, blas_int* lda, void* w, void* vl, blas_int* ldvl, void* vr, blas_int* ldvr, void* work, blas_int* lwork,  float* rwork, blas_int* info);
00240   void arma_fortran(arma_zgeev)(char* jobvl, char* jobvr, blas_int* n, void* a, blas_int* lda, void* w, void* vl, blas_int* ldvl, void* vr, blas_int* ldvr, void* work, blas_int* lwork, double* rwork, blas_int* info);
00241   
00242   // Cholesky decomposition
00243   void arma_fortran(arma_spotrf)(char* uplo, blas_int* n,  float* a, blas_int* lda, blas_int* info);
00244   void arma_fortran(arma_dpotrf)(char* uplo, blas_int* n, double* a, blas_int* lda, blas_int* info);
00245   void arma_fortran(arma_cpotrf)(char* uplo, blas_int* n,   void* a, blas_int* lda, blas_int* info);
00246   void arma_fortran(arma_zpotrf)(char* uplo, blas_int* n,   void* a, blas_int* lda, blas_int* info);
00247   
00248   // matrix inversion (using Cholesky decomposition result)
00249   void arma_fortran(arma_spotri)(char* uplo, blas_int* n,  float* a, blas_int* lda, blas_int* info);
00250   void arma_fortran(arma_dpotri)(char* uplo, blas_int* n, double* a, blas_int* lda, blas_int* info);
00251   void arma_fortran(arma_cpotri)(char* uplo, blas_int* n,   void* a, blas_int* lda, blas_int* info);
00252   void arma_fortran(arma_zpotri)(char* uplo, blas_int* n,   void* a, blas_int* lda, blas_int* info);
00253   
00254   // QR decomposition
00255   void arma_fortran(arma_sgeqrf)(blas_int* m, blas_int* n,  float* a, blas_int* lda,  float* tau,  float* work, blas_int* lwork, blas_int* info);
00256   void arma_fortran(arma_dgeqrf)(blas_int* m, blas_int* n, double* a, blas_int* lda, double* tau, double* work, blas_int* lwork, blas_int* info);
00257   void arma_fortran(arma_cgeqrf)(blas_int* m, blas_int* n,   void* a, blas_int* lda,   void* tau,   void* work, blas_int* lwork, blas_int* info);
00258   void arma_fortran(arma_zgeqrf)(blas_int* m, blas_int* n,   void* a, blas_int* lda,   void* tau,   void* work, blas_int* lwork, blas_int* info);
00259   
00260   // Q matrix calculation from QR decomposition (real matrices)
00261   void arma_fortran(arma_sorgqr)(blas_int* m, blas_int* n, blas_int* k,  float* a, blas_int* lda,  float* tau,  float* work, blas_int* lwork, blas_int* info);
00262   void arma_fortran(arma_dorgqr)(blas_int* m, blas_int* n, blas_int* k, double* a, blas_int* lda, double* tau, double* work, blas_int* lwork, blas_int* info);
00263   
00264   // Q matrix calculation from QR decomposition (complex matrices)
00265   void arma_fortran(arma_cungqr)(blas_int* m, blas_int* n, blas_int* k,   void* a, blas_int* lda,   void* tau,   void* work, blas_int* lwork, blas_int* info);
00266   void arma_fortran(arma_zungqr)(blas_int* m, blas_int* n, blas_int* k,   void* a, blas_int* lda,   void* tau,   void* work, blas_int* lwork, blas_int* info);
00267   
00268   // SVD (real matrices)
00269   void arma_fortran(arma_sgesvd)(char* jobu, char* jobvt, blas_int* m, blas_int* n, float*  a, blas_int* lda, float*  s, float*  u, blas_int* ldu, float*  vt, blas_int* ldvt, float*  work, blas_int* lwork, blas_int* info);
00270   void arma_fortran(arma_dgesvd)(char* jobu, char* jobvt, blas_int* m, blas_int* n, double* a, blas_int* lda, double* s, double* u, blas_int* ldu, double* vt, blas_int* ldvt, double* work, blas_int* lwork, blas_int* info);
00271   
00272   // SVD (complex matrices)
00273   void arma_fortran(arma_cgesvd)(char* jobu, char* jobvt, blas_int* m, blas_int* n, void*   a, blas_int* lda, float*  s, void*   u, blas_int* ldu, void*   vt, blas_int* ldvt, void*   work, blas_int* lwork, float*  rwork, blas_int* info);
00274   void arma_fortran(arma_zgesvd)(char* jobu, char* jobvt, blas_int* m, blas_int* n, void*   a, blas_int* lda, double* s, void*   u, blas_int* ldu, void*   vt, blas_int* ldvt, void*   work, blas_int* lwork, double* rwork, blas_int* info);
00275   
00276   // solve system of linear equations, using LU decomposition
00277   void arma_fortran(arma_sgesv)(blas_int* n, blas_int* nrhs, float*  a, blas_int* lda, blas_int* ipiv, float*  b, blas_int* ldb, blas_int* info);
00278   void arma_fortran(arma_dgesv)(blas_int* n, blas_int* nrhs, double* a, blas_int* lda, blas_int* ipiv, double* b, blas_int* ldb, blas_int* info);
00279   void arma_fortran(arma_cgesv)(blas_int* n, blas_int* nrhs, void*   a, blas_int* lda, blas_int* ipiv, void*   b, blas_int* ldb, blas_int* info);
00280   void arma_fortran(arma_zgesv)(blas_int* n, blas_int* nrhs, void*   a, blas_int* lda, blas_int* ipiv, void*   b, blas_int* ldb, blas_int* info);
00281   
00282   // solve over/underdetermined system of linear equations
00283   void arma_fortran(arma_sgels)(char* trans, blas_int* m, blas_int* n, blas_int* nrhs, float*  a, blas_int* lda, float*  b, blas_int* ldb, float*  work, blas_int* lwork, blas_int* info);
00284   void arma_fortran(arma_dgels)(char* trans, blas_int* m, blas_int* n, blas_int* nrhs, double* a, blas_int* lda, double* b, blas_int* ldb, double* work, blas_int* lwork, blas_int* info);
00285   void arma_fortran(arma_cgels)(char* trans, blas_int* m, blas_int* n, blas_int* nrhs, void*   a, blas_int* lda, void*   b, blas_int* ldb, void*   work, blas_int* lwork, blas_int* info);
00286   void arma_fortran(arma_zgels)(char* trans, blas_int* m, blas_int* n, blas_int* nrhs, void*   a, blas_int* lda, void*   b, blas_int* ldb, void*   work, blas_int* lwork, blas_int* info);
00287   
00288   // solve a triangular system of linear equations
00289   void arma_fortran(arma_strtrs)(char* uplo, char* trans, char* diag, blas_int* n, blas_int* nrhs, const float*  a, blas_int* lda, float*  b, blas_int* ldb, blas_int* info);
00290   void arma_fortran(arma_dtrtrs)(char* uplo, char* trans, char* diag, blas_int* n, blas_int* nrhs, const double* a, blas_int* lda, double* b, blas_int* ldb, blas_int* info);
00291   void arma_fortran(arma_ctrtrs)(char* uplo, char* trans, char* diag, blas_int* n, blas_int* nrhs, const void*   a, blas_int* lda, void*   b, blas_int* ldb, blas_int* info);
00292   void arma_fortran(arma_ztrtrs)(char* uplo, char* trans, char* diag, blas_int* n, blas_int* nrhs, const void*   a, blas_int* lda, void*   b, blas_int* ldb, blas_int* info);
00293   
00294   // Schur decomposition (real matrices)
00295   void arma_fortran(arma_sgees)(char* jobvs, char* sort, blas_int* select, blas_int* n, float*  a, blas_int* lda, blas_int* sdim, float*  wr, float*  wi, float*  vs, blas_int* ldvs, float*  work, blas_int* lwork, blas_int* bwork, blas_int* info);
00296   void arma_fortran(arma_dgees)(char* jobvs, char* sort, blas_int* select, blas_int* n, double* a, blas_int* lda, blas_int* sdim, double* wr, double* wi, double* vs, blas_int* ldvs, double* work, blas_int* lwork, blas_int* bwork, blas_int* info);
00297   
00298   // Schur decomposition (complex matrices)
00299   void arma_fortran(arma_cgees)(char* jobvs, char* sort, blas_int* select, blas_int* n, void* a, blas_int* lda, blas_int* sdim, void* w, void* vs, blas_int* ldvs, void* work, blas_int* lwork, float*  rwork, blas_int* bwork, blas_int* info);
00300   void arma_fortran(arma_zgees)(char* jobvs, char* sort, blas_int* select, blas_int* n, void* a, blas_int* lda, blas_int* sdim, void* w, void* vs, blas_int* ldvs, void* work, blas_int* lwork, double* rwork, blas_int* bwork, blas_int* info);
00301   
00302   // solve a Sylvester equation ax + xb = c, with a and b assumed to be in Schur form
00303   void arma_fortran(arma_strsyl)(char* transa, char* transb, blas_int* isgn, blas_int* m, blas_int* n, const float*  a, blas_int* lda, const float*  b, blas_int* ldb, float*  c, blas_int* ldc, float*  scale, blas_int* info);
00304   void arma_fortran(arma_dtrsyl)(char* transa, char* transb, blas_int* isgn, blas_int* m, blas_int* n, const double* a, blas_int* lda, const double* b, blas_int* ldb, double* c, blas_int* ldc, double* scale, blas_int* info);
00305   void arma_fortran(arma_ctrsyl)(char* transa, char* transb, blas_int* isgn, blas_int* m, blas_int* n, const void*   a, blas_int* lda, const void*   b, blas_int* ldb, void*   c, blas_int* ldc, float*  scale, blas_int* info);
00306   void arma_fortran(arma_ztrsyl)(char* transa, char* transb, blas_int* isgn, blas_int* m, blas_int* n, const void*   a, blas_int* lda, const void*   b, blas_int* ldb, void*   c, blas_int* ldc, double* scale, blas_int* info);
00307   
00308   void arma_fortran(arma_ssytrf)(char* uplo, blas_int* n, float*  a, blas_int* lda, blas_int* ipiv, float*  work, blas_int* lwork, blas_int* info);
00309   void arma_fortran(arma_dsytrf)(char* uplo, blas_int* n, double* a, blas_int* lda, blas_int* ipiv, double* work, blas_int* lwork, blas_int* info);
00310   void arma_fortran(arma_csytrf)(char* uplo, blas_int* n, void*   a, blas_int* lda, blas_int* ipiv, void*   work, blas_int* lwork, blas_int* info);
00311   void arma_fortran(arma_zsytrf)(char* uplo, blas_int* n, void*   a, blas_int* lda, blas_int* ipiv, void*   work, blas_int* lwork, blas_int* info);
00312   
00313   void arma_fortran(arma_ssytri)(char* uplo, blas_int* n, float*  a, blas_int* lda, blas_int* ipiv, float*  work, blas_int* info);
00314   void arma_fortran(arma_dsytri)(char* uplo, blas_int* n, double* a, blas_int* lda, blas_int* ipiv, double* work, blas_int* info);
00315   void arma_fortran(arma_csytri)(char* uplo, blas_int* n, void*   a, blas_int* lda, blas_int* ipiv, void*   work, blas_int* info);
00316   void arma_fortran(arma_zsytri)(char* uplo, blas_int* n, void*   a, blas_int* lda, blas_int* ipiv, void*   work, blas_int* info);
00317   
00318   // void arma_fortran(arma_dgeqp3)(blas_int* m, blas_int* n, double* a, blas_int* lda, blas_int* jpvt, double* tau, double* work, blas_int* lwork, blas_int* info);
00319   // void arma_fortran(arma_dormqr)(char* side, char* trans, blas_int* m, blas_int* n, blas_int* k, double* a, blas_int* lda, double* tau, double* c, blas_int* ldc, double* work, blas_int* lwork, blas_int* info);
00320   // void  arma_fortran(arma_dposv)(char* uplo, blas_int* n, blas_int* nrhs, double* a, blas_int* lda, double* b, blas_int* ldb, blas_int* info);
00321   }
00322 
00323 
00324 #endif


armadillo_matrix
Author(s): Conrad Sanderson - NICTA (www.nicta.com.au), (Wrapper by Sjoerd van den Dries)
autogenerated on Tue Jan 7 2014 11:42:04