Actual source code: slepcblaslapack.h

  1: /*

  3:   Necessary routines in BLAS and LAPACK not included in petscblaslapack.f

  5: */
  8: #include "petscblaslapack.h"


 12: #if defined(PETSC_HAVE_FORTRAN_UNDERSCORE) || defined(PETSC_BLASLAPACK_UNDERSCORE)
 13: #if defined(PETSC_USE_SINGLE)
 14: #define SLEPC_BLASLAPACKREAL(lcase,ucase) s##lcase##_
 15: #if defined(PETSC_USE_COMPLEX)
 16: #define SLEPC_BLASLAPACK(lcase,ucase) c##lcase##_
 17: #else
 18: #define SLEPC_BLASLAPACK(lcase,ucase) s##lcase##_
 19: #endif
 20: #else
 21: #define SLEPC_BLASLAPACKREAL(lcase,ucase) d##lcase##_
 22: #if defined(PETSC_USE_COMPLEX)
 23: #define SLEPC_BLASLAPACK(lcase,ucase) z##lcase##_
 24: #else
 25: #define SLEPC_BLASLAPACK(lcase,ucase) d##lcase##_
 26: #endif
 27: #endif

 29: #elif defined(PETSC_HAVE_FORTRAN_CAPS)
 30: #if defined(PETSC_USE_SINGLE)
 31: #define SLEPC_BLASLAPACKREAL(lcase,ucase) S##ucase
 32: #if defined(PETSC_USE_COMPLEX)
 33: #define SLEPC_BLASLAPACK(lcase,ucase) C##ucase
 34: #else
 35: #define SLEPC_BLASLAPACK(lcase,ucase) S##ucase
 36: #endif
 37: #else
 38: #define SLEPC_BLASLAPACKREAL(lcase,ucase) D##ucase
 39: #if defined(PETSC_USE_COMPLEX)
 40: #define SLEPC_BLASLAPACK(lcase,ucase) Z##ucase
 41: #else
 42: #define SLEPC_BLASLAPACK(lcase,ucase) D##ucase
 43: #endif
 44: #endif

 46: #else
 47: #if defined(PETSC_USE_SINGLE)
 48: #define SLEPC_BLASLAPACKREAL(lcase,ucase) s##lcase
 49: #if defined(PETSC_USE_COMPLEX)
 50: #define SLEPC_BLASLAPACK(lcase,ucase) c##lcase
 51: #else
 52: #define SLEPC_BLASLAPACK(lcase,ucase) s##lcase
 53: #endif
 54: #else
 55: #define SLEPC_BLASLAPACKREAL(lcase,ucase) d##lcase
 56: #if defined(PETSC_USE_COMPLEX)
 57: #define SLEPC_BLASLAPACK(lcase,ucase) z##lcase
 58: #else
 59: #define SLEPC_BLASLAPACK(lcase,ucase) d##lcase
 60: #endif
 61: #endif

 63: #endif

 65: #define BLAStrsm_    SLEPC_BLASLAPACK(trsm,TRSM)
 66: #define LAPACKlaev2_ SLEPC_BLASLAPACK(laev2,LAEV2)
 67: #define LAPACKgehrd_ SLEPC_BLASLAPACK(gehrd,GEHRD)
 68: #define LAPACKlanhs_ SLEPC_BLASLAPACK(lanhs,LANHS)
 69: #define LAPACKlange_ SLEPC_BLASLAPACK(lange,LANGE)
 70: #define LAPACKgetri_ SLEPC_BLASLAPACK(getri,GETRI)
 71: #define LAPACKhseqr_ SLEPC_BLASLAPACK(hseqr,HSEQR)
 72: #define LAPACKtrexc_ SLEPC_BLASLAPACK(trexc,TREXC)
 73: #define LAPACKtrevc_ SLEPC_BLASLAPACK(trevc,TREVC)
 74: #define LAPACKgeevx_ SLEPC_BLASLAPACK(geevx,GEEVX)
 75: #define LAPACKggevx_ SLEPC_BLASLAPACK(ggevx,GGEVX)
 76: #define LAPACKgelqf_ SLEPC_BLASLAPACK(gelqf,GELQF)

 78: #if !defined(PETSC_USE_COMPLEX)
 79: #define LAPACKorghr_ SLEPC_BLASLAPACK(orghr,ORGHR)
 80: #define LAPACKsyevr_ SLEPC_BLASLAPACK(syevr,SYEVR)
 81: #define LAPACKsygvd_ SLEPC_BLASLAPACK(sygvd,SYGVD)
 82: #define LAPACKormlq_ SLEPC_BLASLAPACK(ormlq,ORMLQ)
 83: #else
 84: #define LAPACKorghr_ SLEPC_BLASLAPACK(unghr,UNGHR)
 85: #define LAPACKsyevr_ SLEPC_BLASLAPACK(heevr,HEEVR)
 86: #define LAPACKsygvd_ SLEPC_BLASLAPACK(hegvd,HEGVD)
 87: #define LAPACKormlq_ SLEPC_BLASLAPACK(unmlq,UNMLQ)
 88: #endif

 90: #define LAPACKlamch_ SLEPC_BLASLAPACKREAL(lamch,LAMCH)
 91: #define LAPACKstevr_ SLEPC_BLASLAPACKREAL(stevr,STEVR)


 95: EXTERN PetscReal LAPACKlamch_(const char*,PetscBLASInt);
 96: EXTERN PetscReal LAPACKlanhs_(const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt);
 97: EXTERN PetscReal LAPACKlange_(const char*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt);
 98: EXTERN void      LAPACKlaev2_(PetscScalar*,PetscScalar*,PetscScalar*,PetscReal*,PetscReal*,PetscReal*,PetscScalar*);
 99: EXTERN void      LAPACKgehrd_(PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*);
100: EXTERN void      LAPACKorghr_(PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*);
101: EXTERN void      LAPACKgetri_(PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*);
102: EXTERN void      LAPACKstevr_(const char*,const char*,PetscBLASInt*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscReal*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt,PetscBLASInt);
103: EXTERN void      LAPACKgelqf_(PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*);
104: EXTERN void      BLAStrsm_(const char*,const char*,const char*,const char*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt,PetscBLASInt,PetscBLASInt,PetscBLASInt);
105: EXTERN void      LAPACKormlq_(const char*,const char*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt,PetscBLASInt);

107: #if !defined(PETSC_USE_COMPLEX)
108: EXTERN void      LAPACKhseqr_(const char*,const char*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt,PetscBLASInt);
109: EXTERN void      LAPACKtrexc_(const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt);
110: EXTERN void      LAPACKtrevc_(const char*,const char*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt,PetscBLASInt);
111: EXTERN void      LAPACKgeevx_(const char*,const char*,const char*,const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt,PetscBLASInt,PetscBLASInt,PetscBLASInt);
112: EXTERN void      LAPACKggevx_(const char*,const char*,const char*,const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt,PetscBLASInt,PetscBLASInt,PetscBLASInt);
113: EXTERN void      LAPACKsyevr_(const char*,const char*,const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt,PetscBLASInt,PetscBLASInt);
114: EXTERN void      LAPACKsygvd_(PetscBLASInt*,const char*,const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt,PetscBLASInt);
115: #else
116: EXTERN void      LAPACKhseqr_(const char*,const char*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt,PetscBLASInt);
117: EXTERN void      LAPACKtrexc_(const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt);
118: EXTERN void      LAPACKtrevc_(const char*,const char*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscReal*,PetscBLASInt*,PetscBLASInt,PetscBLASInt);
119: EXTERN void      LAPACKgeevx_(const char*,const char*,const char*,const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt,PetscBLASInt,PetscBLASInt,PetscBLASInt);
120: EXTERN void      LAPACKggevx_(const char*,const char*,const char*,const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*, PetscBLASInt*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscScalar*, PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt,PetscBLASInt,PetscBLASInt,PetscBLASInt);
121: EXTERN void      LAPACKsyevr_(const char *,const char*,const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscReal*,PetscScalar*,PetscBLASInt*,PetscBLASInt*, PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt,PetscBLASInt,PetscBLASInt);
122: EXTERN void      LAPACKsygvd_(PetscBLASInt*,const char*,const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt,PetscBLASInt);
123: #endif



129: #endif