Subversion Repositories slepc-dev

Rev

Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
6 dsic.upv.es!jroman 1
/*
460 dsic.upv.es!antodo 2
 
6 dsic.upv.es!jroman 3
  Necessary routines in BLAS and LAPACK not included in petscblaslapack.f
4
 
1376 slepc 5
 
6
   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
7
      SLEPc - Scalable Library for Eigenvalue Problem Computations
8
      Copyright (c) 2002-2007, Universidad Politecnica de Valencia, Spain
9
 
10
      This file is part of SLEPc. See the README file for conditions of use
11
      and additional information.
12
   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
6 dsic.upv.es!jroman 13
*/
1376 slepc 14
 
1131 slepc 15
#if !defined(__SLEPCBLASLAPACK_H)
16
#define __SLEPCBLASLAPACK_H
6 dsic.upv.es!jroman 17
#include "petscblaslapack.h"
476 dsic.upv.es!antodo 18
PETSC_EXTERN_CXX_BEGIN
6 dsic.upv.es!jroman 19
 
895 dsic.upv.es!antodo 20
 
806 dsic.upv.es!antodo 21
#if defined(PETSC_HAVE_FORTRAN_UNDERSCORE) || defined(PETSC_BLASLAPACK_UNDERSCORE)
895 dsic.upv.es!antodo 22
#if defined(PETSC_USE_SINGLE)
23
#define SLEPC_BLASLAPACKREAL(lcase,ucase) s##lcase##_
806 dsic.upv.es!antodo 24
#if defined(PETSC_USE_COMPLEX)
25
#define SLEPC_BLASLAPACK(lcase,ucase) c##lcase##_
6 dsic.upv.es!jroman 26
#else
895 dsic.upv.es!antodo 27
#define SLEPC_BLASLAPACK(lcase,ucase) s##lcase##_
6 dsic.upv.es!jroman 28
#endif
495 dsic.upv.es!antodo 29
#else
895 dsic.upv.es!antodo 30
#define SLEPC_BLASLAPACKREAL(lcase,ucase) d##lcase##_
31
#if defined(PETSC_USE_COMPLEX)
32
#define SLEPC_BLASLAPACK(lcase,ucase) z##lcase##_
806 dsic.upv.es!antodo 33
#else
34
#define SLEPC_BLASLAPACK(lcase,ucase) d##lcase##_
495 dsic.upv.es!antodo 35
#endif
806 dsic.upv.es!antodo 36
#endif
895 dsic.upv.es!antodo 37
 
806 dsic.upv.es!antodo 38
#elif defined(PETSC_HAVE_FORTRAN_CAPS)
895 dsic.upv.es!antodo 39
#if defined(PETSC_USE_SINGLE)
40
#define SLEPC_BLASLAPACKREAL(lcase,ucase) S##ucase
806 dsic.upv.es!antodo 41
#if defined(PETSC_USE_COMPLEX)
42
#define SLEPC_BLASLAPACK(lcase,ucase) C##ucase
495 dsic.upv.es!antodo 43
#else
895 dsic.upv.es!antodo 44
#define SLEPC_BLASLAPACK(lcase,ucase) S##ucase
806 dsic.upv.es!antodo 45
#endif
495 dsic.upv.es!antodo 46
#else
895 dsic.upv.es!antodo 47
#define SLEPC_BLASLAPACKREAL(lcase,ucase) D##ucase
48
#if defined(PETSC_USE_COMPLEX)
49
#define SLEPC_BLASLAPACK(lcase,ucase) Z##ucase
806 dsic.upv.es!antodo 50
#else
51
#define SLEPC_BLASLAPACK(lcase,ucase) D##ucase
495 dsic.upv.es!antodo 52
#endif
53
#endif
895 dsic.upv.es!antodo 54
 
495 dsic.upv.es!antodo 55
#else
895 dsic.upv.es!antodo 56
#if defined(PETSC_USE_SINGLE)
57
#define SLEPC_BLASLAPACKREAL(lcase,ucase) s##lcase
806 dsic.upv.es!antodo 58
#if defined(PETSC_USE_COMPLEX)
59
#define SLEPC_BLASLAPACK(lcase,ucase) c##lcase
6 dsic.upv.es!jroman 60
#else
895 dsic.upv.es!antodo 61
#define SLEPC_BLASLAPACK(lcase,ucase) s##lcase
6 dsic.upv.es!jroman 62
#endif
63
#else
895 dsic.upv.es!antodo 64
#define SLEPC_BLASLAPACKREAL(lcase,ucase) d##lcase
65
#if defined(PETSC_USE_COMPLEX)
66
#define SLEPC_BLASLAPACK(lcase,ucase) z##lcase
489 dsic.upv.es!antodo 67
#else
806 dsic.upv.es!antodo 68
#define SLEPC_BLASLAPACK(lcase,ucase) d##lcase
6 dsic.upv.es!jroman 69
#endif
495 dsic.upv.es!antodo 70
#endif
895 dsic.upv.es!antodo 71
 
6 dsic.upv.es!jroman 72
#endif
73
 
948 dsic.upv.es!jroman 74
#define BLAStrsm_    SLEPC_BLASLAPACK(trsm,TRSM)
784 dsic.upv.es!antodo 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)
977 slepc 84
#define LAPACKggevx_ SLEPC_BLASLAPACK(ggevx,GGEVX)
948 dsic.upv.es!jroman 85
#define LAPACKgelqf_ SLEPC_BLASLAPACK(gelqf,GELQF)
1283 slepc 86
#define LAPACKgesdd_ SLEPC_BLASLAPACK(gesdd,GESDD)
489 dsic.upv.es!antodo 87
 
646 dsic.upv.es!antodo 88
#if !defined(PETSC_USE_COMPLEX)
784 dsic.upv.es!antodo 89
#define LAPACKorghr_ SLEPC_BLASLAPACK(orghr,ORGHR)
90
#define LAPACKsyevr_ SLEPC_BLASLAPACK(syevr,SYEVR)
91
#define LAPACKsygvd_ SLEPC_BLASLAPACK(sygvd,SYGVD)
948 dsic.upv.es!jroman 92
#define LAPACKormlq_ SLEPC_BLASLAPACK(ormlq,ORMLQ)
646 dsic.upv.es!antodo 93
#else
784 dsic.upv.es!antodo 94
#define LAPACKorghr_ SLEPC_BLASLAPACK(unghr,UNGHR)
95
#define LAPACKsyevr_ SLEPC_BLASLAPACK(heevr,HEEVR)
96
#define LAPACKsygvd_ SLEPC_BLASLAPACK(hegvd,HEGVD)
948 dsic.upv.es!jroman 97
#define LAPACKormlq_ SLEPC_BLASLAPACK(unmlq,UNMLQ)
646 dsic.upv.es!antodo 98
#endif
99
 
895 dsic.upv.es!antodo 100
#define LAPACKlamch_ SLEPC_BLASLAPACKREAL(lamch,LAMCH)
900 dsic.upv.es!antodo 101
#define LAPACKstevr_ SLEPC_BLASLAPACKREAL(stevr,STEVR)
1341 slepc 102
#define LAPACKbdsdc_ SLEPC_BLASLAPACKREAL(bdsdc,BDSDC)
895 dsic.upv.es!antodo 103
 
6 dsic.upv.es!jroman 104
EXTERN_C_BEGIN
105
 
895 dsic.upv.es!antodo 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);
784 dsic.upv.es!antodo 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*);
977 slepc 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);
948 dsic.upv.es!jroman 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);
1341 slepc 117
EXTERN void      LAPACKbdsdc_(const char*,const char*,PetscBLASInt*,PetscReal*,PetscReal*,PetscReal*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt,PetscBLASInt);
460 dsic.upv.es!antodo 118
 
6 dsic.upv.es!jroman 119
#if !defined(PETSC_USE_COMPLEX)
784 dsic.upv.es!antodo 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);
1283 slepc 127
EXTERN void      LAPACKgesdd_(const char*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt);
6 dsic.upv.es!jroman 128
#else
784 dsic.upv.es!antodo 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);
1283 slepc 136
EXTERN void      LAPACKgesdd_(const char*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt);
6 dsic.upv.es!jroman 137
#endif
138
 
895 dsic.upv.es!antodo 139
 
6 dsic.upv.es!jroman 140
EXTERN_C_END
141
 
476 dsic.upv.es!antodo 142
PETSC_EXTERN_CXX_END
6 dsic.upv.es!jroman 143
#endif