Actual source code: slepcblaslapack.h

  1: /*

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


  6:    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  7:       SLEPc - Scalable Library for Eigenvalue Problem Computations
  8:       Copyright (c) 2002-2007, Universidad Politecnica de Valencia, Spain

 10:       This file is part of SLEPc. See the README file for conditions of use
 11:       and additional information.
 12:    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 13: */

 17: #include "petscblaslapack.h"


 21: #if defined(PETSC_HAVE_FORTRAN_UNDERSCORE) || defined(PETSC_BLASLAPACK_UNDERSCORE)
 22: #if defined(PETSC_USE_SINGLE)
 23: #define SLEPC_BLASLAPACKREAL(lcase,ucase) s##lcase##_
 24: #if defined(PETSC_USE_COMPLEX)
 25: #define SLEPC_BLASLAPACK(lcase,ucase) c##lcase##_
 26: #else
 27: #define SLEPC_BLASLAPACK(lcase,ucase) s##lcase##_
 28: #endif
 29: #else
 30: #define SLEPC_BLASLAPACKREAL(lcase,ucase) d##lcase##_
 31: #if defined(PETSC_USE_COMPLEX)
 32: #define SLEPC_BLASLAPACK(lcase,ucase) z##lcase##_
 33: #else
 34: #define SLEPC_BLASLAPACK(lcase,ucase) d##lcase##_
 35: #endif
 36: #endif

 38: #elif defined(PETSC_HAVE_FORTRAN_CAPS)
 39: #if defined(PETSC_USE_SINGLE)
 40: #define SLEPC_BLASLAPACKREAL(lcase,ucase) S##ucase
 41: #if defined(PETSC_USE_COMPLEX)
 42: #define SLEPC_BLASLAPACK(lcase,ucase) C##ucase
 43: #else
 44: #define SLEPC_BLASLAPACK(lcase,ucase) S##ucase
 45: #endif
 46: #else
 47: #define SLEPC_BLASLAPACKREAL(lcase,ucase) D##ucase
 48: #if defined(PETSC_USE_COMPLEX)
 49: #define SLEPC_BLASLAPACK(lcase,ucase) Z##ucase
 50: #else
 51: #define SLEPC_BLASLAPACK(lcase,ucase) D##ucase
 52: #endif
 53: #endif

 55: #else
 56: #if defined(PETSC_USE_SINGLE)
 57: #define SLEPC_BLASLAPACKREAL(lcase,ucase) s##lcase
 58: #if defined(PETSC_USE_COMPLEX)
 59: #define SLEPC_BLASLAPACK(lcase,ucase) c##lcase
 60: #else
 61: #define SLEPC_BLASLAPACK(lcase,ucase) s##lcase
 62: #endif
 63: #else
 64: #define SLEPC_BLASLAPACKREAL(lcase,ucase) d##lcase
 65: #if defined(PETSC_USE_COMPLEX)
 66: #define SLEPC_BLASLAPACK(lcase,ucase) z##lcase
 67: #else
 68: #define SLEPC_BLASLAPACK(lcase,ucase) d##lcase
 69: #endif
 70: #endif

 72: #endif

 74: #define BLAStrsm_    SLEPC_BLASLAPACK(trsm,TRSM)
 75: #define LAPACKlaev2_ SLEPC_BLASLAPACK(laev2,LAEV2)
 76: #define LAPACKgehrd_ SLEPC_BLASLAPACK(gehrd,GEHRD)
 77: #define LAPACKlanhs_ SLEPC_BLASLAPACK(lanhs,LANHS)
 78: #define LAPACKlange_ SLEPC_BLASLAPACK(lange,LANGE)
 79: #define LAPACKgetri_ SLEPC_BLASLAPACK(getri,GETRI)
 80: #define LAPACKhseqr_ SLEPC_BLASLAPACK(hseqr,HSEQR)
 81: #define LAPACKtrexc_ SLEPC_BLASLAPACK(trexc,TREXC)
 82: #define LAPACKtrevc_ SLEPC_BLASLAPACK(trevc,TREVC)
 83: #define LAPACKgeevx_ SLEPC_BLASLAPACK(geevx,GEEVX)
 84: #define LAPACKggevx_ SLEPC_BLASLAPACK(ggevx,GGEVX)
 85: #define LAPACKgelqf_ SLEPC_BLASLAPACK(gelqf,GELQF)
 86: #define LAPACKgesdd_ SLEPC_BLASLAPACK(gesdd,GESDD)

 88: #if !defined(PETSC_USE_COMPLEX)
 89: #define LAPACKorghr_ SLEPC_BLASLAPACK(orghr,ORGHR)
 90: #define LAPACKsyevr_ SLEPC_BLASLAPACK(syevr,SYEVR)
 91: #define LAPACKsygvd_ SLEPC_BLASLAPACK(sygvd,SYGVD)
 92: #define LAPACKormlq_ SLEPC_BLASLAPACK(ormlq,ORMLQ)
 93: #else
 94: #define LAPACKorghr_ SLEPC_BLASLAPACK(unghr,UNGHR)
 95: #define LAPACKsyevr_ SLEPC_BLASLAPACK(heevr,HEEVR)
 96: #define LAPACKsygvd_ SLEPC_BLASLAPACK(hegvd,HEGVD)
 97: #define LAPACKormlq_ SLEPC_BLASLAPACK(unmlq,UNMLQ)
 98: #endif

100: #define LAPACKlamch_ SLEPC_BLASLAPACKREAL(lamch,LAMCH)
101: #define LAPACKstevr_ SLEPC_BLASLAPACKREAL(stevr,STEVR)
102: #define LAPACKbdsdc_ SLEPC_BLASLAPACKREAL(bdsdc,BDSDC)


106: EXTERN PetscReal LAPACKlamch_(const char*,PetscBLASInt);
107: EXTERN PetscReal LAPACKlanhs_(const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt);
108: EXTERN PetscReal LAPACKlange_(const char*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt);
109: EXTERN void      LAPACKlaev2_(PetscScalar*,PetscScalar*,PetscScalar*,PetscReal*,PetscReal*,PetscReal*,PetscScalar*);
110: EXTERN void      LAPACKgehrd_(PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*);
111: EXTERN void      LAPACKorghr_(PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*);
112: EXTERN void      LAPACKgetri_(PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*);
113: 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);
114: EXTERN void      LAPACKgelqf_(PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*);
115: EXTERN void      BLAStrsm_(const char*,const char*,const char*,const char*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt,PetscBLASInt,PetscBLASInt,PetscBLASInt);
116: EXTERN void      LAPACKormlq_(const char*,const char*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt,PetscBLASInt);
117: EXTERN void      LAPACKbdsdc_(const char*,const char*,PetscBLASInt*,PetscReal*,PetscReal*,PetscReal*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt,PetscBLASInt);

119: #if !defined(PETSC_USE_COMPLEX)
120: EXTERN void      LAPACKhseqr_(const char*,const char*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt,PetscBLASInt);
121: EXTERN void      LAPACKtrexc_(const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt);
122: EXTERN void      LAPACKtrevc_(const char*,const char*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt,PetscBLASInt);
123: 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);
124: 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);
125: 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);
126: EXTERN void      LAPACKsygvd_(PetscBLASInt*,const char*,const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt,PetscBLASInt);
127: EXTERN void      LAPACKgesdd_(const char*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt);
128: #else
129: EXTERN void      LAPACKhseqr_(const char*,const char*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt,PetscBLASInt);
130: EXTERN void      LAPACKtrexc_(const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt);
131: EXTERN void      LAPACKtrevc_(const char*,const char*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscReal*,PetscBLASInt*,PetscBLASInt,PetscBLASInt);
132: 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);
133: 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);
134: 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);
135: EXTERN void      LAPACKsygvd_(PetscBLASInt*,const char*,const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt,PetscBLASInt);
136: EXTERN void      LAPACKgesdd_(const char*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt);
137: #endif



143: #endif