| 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 |
|
|
|
5 |
*/
|
|
|
6 |
#if !defined(_SLEPCBLASLAPACK_H)
|
|
|
7 |
#define _SLEPCBLASLAPACK_H
|
|
|
8 |
#include "petscblaslapack.h"
|
| 476 |
dsic.upv.es!antodo |
9 |
PETSC_EXTERN_CXX_BEGIN
|
| 6 |
dsic.upv.es!jroman |
10 |
|
| 489 |
dsic.upv.es!antodo |
11 |
#define SLEPC_CONCAT(a,b) a##b
|
| 495 |
dsic.upv.es!antodo |
12 |
#define SLEPC_CONCAT3(a,b,c) a##b##c
|
| 6 |
dsic.upv.es!jroman |
13 |
|
| 495 |
dsic.upv.es!antodo |
14 |
#if defined(PETSC_HAVE_FORTRAN_UNDERSCORE)
|
| 489 |
dsic.upv.es!antodo |
15 |
#define SLEPC_FORTRAN(lcase,ucase) SLEPC_CONCAT(lcase,_)
|
| 6 |
dsic.upv.es!jroman |
16 |
#elif defined(PETSC_HAVE_FORTRAN_CAPS)
|
| 489 |
dsic.upv.es!antodo |
17 |
#define SLEPC_FORTRAN(lcase,ucase) ucase
|
| 6 |
dsic.upv.es!jroman |
18 |
#else
|
| 489 |
dsic.upv.es!antodo |
19 |
#define SLEPC_FORTRAN(lcase,ucase) lcase
|
| 6 |
dsic.upv.es!jroman |
20 |
#endif
|
|
|
21 |
|
| 495 |
dsic.upv.es!antodo |
22 |
#if defined(PETSC_BLASLAPACK_F2C)
|
|
|
23 |
|
| 489 |
dsic.upv.es!antodo |
24 |
#if !defined(PETSC_USE_COMPLEX)
|
| 495 |
dsic.upv.es!antodo |
25 |
/* real numbers */
|
|
|
26 |
#if defined(PETSC_USES_FORTRAN_SINGLE) || defined(PETSC_USE_SINGLE)
|
|
|
27 |
/* single precision */
|
|
|
28 |
#define SLEPC_BLASLAPACK(lcase,ucase) SLEPC_CONCAT3(s,lcase,_)
|
|
|
29 |
#else
|
|
|
30 |
/* double precision */
|
|
|
31 |
#define SLEPC_BLASLAPACK(lcase,ucase) SLEPC_CONCAT3(d,lcase,_)
|
|
|
32 |
#endif
|
|
|
33 |
#else
|
|
|
34 |
/* complex numbers */
|
|
|
35 |
#if defined(PETSC_USES_FORTRAN_SINGLE) || defined(PETSC_USE_SINGLE)
|
|
|
36 |
/* single precision */
|
|
|
37 |
#define SLEPC_BLASLAPACK(lcase,ucase) SLEPC_CONCAT3(c,lcase,_)
|
|
|
38 |
#else
|
|
|
39 |
/* double precision */
|
|
|
40 |
#define SLEPC_BLASLAPACK(lcase,ucase) SLEPC_CONCAT3(z,lcase,_)
|
|
|
41 |
#endif
|
|
|
42 |
#endif
|
| 489 |
dsic.upv.es!antodo |
43 |
|
| 495 |
dsic.upv.es!antodo |
44 |
#else
|
|
|
45 |
|
|
|
46 |
#if !defined(PETSC_USE_COMPLEX)
|
| 489 |
dsic.upv.es!antodo |
47 |
/* real numbers */
|
|
|
48 |
#if defined(PETSC_USES_FORTRAN_SINGLE) || defined(PETSC_USE_SINGLE)
|
|
|
49 |
/* single precision */
|
|
|
50 |
#define SLEPC_BLASLAPACK(lcase,ucase) SLEPC_FORTRAN(SLEPC_CONCAT(s,lcase),SLEPC_CONCAT(S,ucase))
|
| 6 |
dsic.upv.es!jroman |
51 |
#else
|
| 489 |
dsic.upv.es!antodo |
52 |
/* double precision */
|
|
|
53 |
#define SLEPC_BLASLAPACK(lcase,ucase) SLEPC_FORTRAN(SLEPC_CONCAT(d,lcase),SLEPC_CONCAT(D,ucase))
|
| 6 |
dsic.upv.es!jroman |
54 |
#endif
|
|
|
55 |
#else
|
| 489 |
dsic.upv.es!antodo |
56 |
/* complex numbers */
|
|
|
57 |
#if defined(PETSC_USES_FORTRAN_SINGLE) || defined(PETSC_USE_SINGLE)
|
|
|
58 |
/* single precision */
|
| 502 |
dsic.upv.es!antodo |
59 |
#define SLEPC_BLASLAPACK(lcase,ucase) SLEPC_FORTRAN(SLEPC_CONCAT(c,lcase),SLEPC_CONCAT(C,ucase))
|
| 489 |
dsic.upv.es!antodo |
60 |
#else
|
|
|
61 |
/* double precision */
|
|
|
62 |
#define SLEPC_BLASLAPACK(lcase,ucase) SLEPC_FORTRAN(SLEPC_CONCAT(z,lcase),SLEPC_CONCAT(Z,ucase))
|
| 6 |
dsic.upv.es!jroman |
63 |
#endif
|
| 495 |
dsic.upv.es!antodo |
64 |
#endif
|
| 6 |
dsic.upv.es!jroman |
65 |
|
|
|
66 |
#endif
|
|
|
67 |
|
| 489 |
dsic.upv.es!antodo |
68 |
#define LAlaev2_ SLEPC_BLASLAPACK(laev2,LAEV2)
|
|
|
69 |
#define LAgehrd_ SLEPC_BLASLAPACK(gehrd,GEHRD)
|
|
|
70 |
#if !defined(PETSC_USE_COMPLEX)
|
|
|
71 |
#define LAorghr_ SLEPC_BLASLAPACK(orghr,ORGHR)
|
|
|
72 |
#else
|
|
|
73 |
#define LAorghr_ SLEPC_BLASLAPACK(unghr,UNGHR)
|
|
|
74 |
#endif
|
|
|
75 |
#define LAlanhs_ SLEPC_BLASLAPACK(lanhs,LANHS)
|
|
|
76 |
#define LAlange_ SLEPC_BLASLAPACK(lange,LANGE)
|
|
|
77 |
#define LAgetri_ SLEPC_BLASLAPACK(getri,GETRI)
|
|
|
78 |
#define LAhseqr_ SLEPC_BLASLAPACK(hseqr,HSEQR)
|
|
|
79 |
#define LAtrexc_ SLEPC_BLASLAPACK(trexc,TREXC)
|
|
|
80 |
#define LAtrevc_ SLEPC_BLASLAPACK(trevc,TREVC)
|
|
|
81 |
|
| 6 |
dsic.upv.es!jroman |
82 |
EXTERN_C_BEGIN
|
|
|
83 |
|
| 460 |
dsic.upv.es!antodo |
84 |
EXTERN void LAlaev2_(PetscScalar*,PetscScalar*,PetscScalar*,PetscReal*,PetscReal*,PetscReal*,PetscScalar*);
|
| 476 |
dsic.upv.es!antodo |
85 |
EXTERN void LAgehrd_(PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*);
|
|
|
86 |
EXTERN void LAorghr_(PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*);
|
|
|
87 |
EXTERN PetscReal LAlanhs_(const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt);
|
|
|
88 |
EXTERN PetscReal LAlange_(const char*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt);
|
|
|
89 |
EXTERN void LAgetri_(PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*);
|
| 460 |
dsic.upv.es!antodo |
90 |
|
| 6 |
dsic.upv.es!jroman |
91 |
#if !defined(PETSC_USE_COMPLEX)
|
| 476 |
dsic.upv.es!antodo |
92 |
EXTERN void LAhseqr_(const char*,const char*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt,PetscBLASInt);
|
|
|
93 |
EXTERN void LAtrexc_(const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt);
|
|
|
94 |
EXTERN void LAtrevc_(const char*,const char*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt,PetscBLASInt);
|
| 6 |
dsic.upv.es!jroman |
95 |
#else
|
| 476 |
dsic.upv.es!antodo |
96 |
EXTERN void LAhseqr_(const char*,const char*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt,PetscBLASInt);
|
|
|
97 |
EXTERN void LAtrexc_(const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt);
|
|
|
98 |
EXTERN void LAtrevc_(const char*,const char*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscReal*,PetscBLASInt*,PetscBLASInt,PetscBLASInt);
|
| 6 |
dsic.upv.es!jroman |
99 |
#endif
|
|
|
100 |
|
|
|
101 |
EXTERN_C_END
|
|
|
102 |
|
| 476 |
dsic.upv.es!antodo |
103 |
PETSC_EXTERN_CXX_END
|
| 6 |
dsic.upv.es!jroman |
104 |
#endif
|