protos_lapack.hpp 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. #ifndef protos_lapack__h
  2. #define protos_lapack__h
  3. // prototypes pour lapack et classe d'exception associée.
  4. namespace lapack_c
  5. {
  6. //! prototypes for lapack routines.
  7. extern "C"{
  8. void dgetrf_(int *n,int *m,double* a,int *lda,int *ipiv,int *info);
  9. }
  10. extern "C"{
  11. void zgetrf_(int *n,int *m,double* a,int *lda,int *ipiv,int *info);
  12. }
  13. extern "C"{
  14. void dgetrs_(const char *s,int *N,int *NRHS,double *A,int *LDA,int *IPIV,
  15. double *B,int *LDB,int *INFO );
  16. }
  17. extern "C"{
  18. void zgetrs_(const char *s,int *N,int *NRHS,double *A,int *LDA,int *IPIV,
  19. double *B,int *LDB,int *INFO );
  20. }
  21. extern "C"{
  22. void dgbtrf_(int *n,int *m,int *k1,int *k2,
  23. double* a,int *lda,int *ipiv,int *info);
  24. }
  25. extern "C"{
  26. void zgbtrf_(int *n,int *m,int *k1,int *k2,
  27. double* a,int *lda,int *ipiv,int *info);
  28. }
  29. extern "C"{
  30. void dgbtrs_(const char *s,int *N,int *k1,int *k2,
  31. int *NRHS,double *A,int *LDA,int *IPIV,
  32. double *B,int *LDB,int *INFO );
  33. }
  34. extern "C"{
  35. void zgbtrs_(const char *s,int *N,int *k1,int *k2,
  36. int *NRHS,double *A,int *LDA,int *IPIV,
  37. double *B,int *LDB,int *INFO );
  38. }
  39. extern "C"{
  40. void dlarnv_(int *idist,int iseed[],int *n,double *x);
  41. }
  42. extern "C"{
  43. void dgehrd_(int *n,int *ilo,int *ihi,double *a,int *lda,double tau[],
  44. double work[],int *lwork,int *info);
  45. }
  46. extern "C"{
  47. void dorghr_(int *n,int *ilo,int *ihi,double *a,int *lda,double tau[],
  48. double work[],int *lwork,int *info);
  49. }
  50. extern "C"{
  51. void dgeev_(const char *jobvl,const char *jobvr,int * n,double *a,
  52. int *lda,double *WR, double *WI,double *VL,int *LDVL,
  53. double *VR,int *LDVR,
  54. double *WORK,int *LWORK,int *INFO );
  55. }
  56. extern "C"{
  57. void dgesv_(int *n,int *nrhs,double *A,int *lda,int *ipiv, double *B,
  58. int *ldb,int *info);
  59. }
  60. extern "C"{
  61. void dgbmv_(const char *trans,int *m,int *n,int *kl,int *ku,double *alpha,
  62. double *A,int *lda,double *X,int *incx,double *beta,
  63. double *y, int *incy);
  64. }
  65. extern "C"{
  66. void dgemv_(const char *trans,int *m,int *n,double *alpha, double *A,
  67. int *lda,double *X,int *incx,double *beta,
  68. double *y, int *incy);
  69. }
  70. extern "C"{
  71. double dlange_(const char *norm,int *m,int *n, double *A,
  72. int *lda,double *work);
  73. }
  74. extern "C"{
  75. void dgecon_(const char *norm,int *n,double *a,int *lda,double *lanorme,
  76. double *rcond,double *work, int *iwork,int *info);
  77. }
  78. struct LapackException
  79. {
  80. int Info;
  81. LapackException(int info):Info(info){}
  82. int what(){return Info;}
  83. };
  84. }
  85. #endif