Actual source code: slepcblaslapack.h

slepc-main 2024-11-09
Report Typos and Errors
  1: /*
  2:    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  3:    SLEPc - Scalable Library for Eigenvalue Problem Computations
  4:    Copyright (c) 2002-, Universitat Politecnica de Valencia, Spain

  6:    This file is part of SLEPc.
  7:    SLEPc is distributed under a 2-clause BSD license (see LICENSE).
  8:    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  9: */
 10: /*
 11:    Necessary routines in BLAS and LAPACK not included in petscblaslapack.h
 12: */

 14: #pragma once

 16: #include <petscblaslapack.h>

 18: /* Macro to check nonzero info after LAPACK call */
 19: #define SlepcCheckLapackInfo(routine,info) \
 20:   do { \
 21:     PetscCheck(!info,PETSC_COMM_SELF,PETSC_ERR_LIB,"Error in LAPACK subroutine %s: info=%" PetscBLASInt_FMT,routine,info); \
 22:   } while (0)

 24: /* LAPACK return type: we assume slange, etc. behave in the same way as snrm2 */
 25: #if defined(PETSC_USE_REAL_SINGLE) && defined(PETSC_BLASLAPACK_SNRM2_RETURNS_DOUBLE)
 26: #define SlepcLRT double
 27: #else
 28: #define SlepcLRT PetscReal
 29: #endif

 31: /* Special macro for srot, csrot, drot, zdrot (BLASMIXEDrot_) */
 32: #if !defined(PETSC_USE_COMPLEX)
 33: # define PETSC_BLASLAPACK_MIXEDPREFIX_ PETSC_BLASLAPACK_PREFIX_
 34: #else
 35: # if defined(PETSC_BLASLAPACK_CAPS)
 36: #  if defined(PETSC_USE_REAL_SINGLE)
 37: #   define PETSC_BLASLAPACK_MIXEDPREFIX_ CS
 38: #  elif defined(PETSC_USE_REAL_DOUBLE)
 39: #   define PETSC_BLASLAPACK_MIXEDPREFIX_ ZD
 40: #  elif defined(PETSC_USE_REAL___FLOAT128)
 41: #   define PETSC_BLASLAPACK_MIXEDPREFIX_ WQ
 42: #  else
 43: #   define PETSC_BLASLAPACK_MIXEDPREFIX_ KH
 44: #  endif
 45: # else
 46: #  if defined(PETSC_USE_REAL_SINGLE)
 47: #   define PETSC_BLASLAPACK_MIXEDPREFIX_ cs
 48: #  elif defined(PETSC_USE_REAL_DOUBLE)
 49: #   define PETSC_BLASLAPACK_MIXEDPREFIX_ zd
 50: #  elif defined(PETSC_USE_REAL___FLOAT128)
 51: #   define PETSC_BLASLAPACK_MIXEDPREFIX_ wq
 52: #  else
 53: #   define PETSC_BLASLAPACK_MIXEDPREFIX_ kh
 54: #  endif
 55: # endif
 56: #endif
 57: #if defined(PETSC_BLASLAPACK_CAPS)
 58: #  define PETSCBLASMIXED(x,X) PETSC_PASTE3(PETSC_BLASLAPACK_MIXEDPREFIX_, X, PETSC_BLASLAPACK_SUFFIX_)
 59: #else
 60: #  define PETSCBLASMIXED(x,X) PETSC_PASTE3(PETSC_BLASLAPACK_MIXEDPREFIX_, x, PETSC_BLASLAPACK_SUFFIX_)
 61: #endif

 63: #include <slepcblaslapack_mangle.h>

 65: /* LAPACK functions without string parameters */
 66: BLAS_EXTERN void     BLASrot_(PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscScalar*);
 67: BLAS_EXTERN void     BLASMIXEDrot_(PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscReal*);
 68: #if !defined(SLEPC_MISSING_LAPACK_LAEV2)
 69: BLAS_EXTERN void     LAPACKlaev2_(const PetscScalar*,const PetscScalar*,const PetscScalar*,PetscReal*,PetscReal*,PetscReal*,PetscScalar*);
 70: #else
 71: #define LAPACKlaev2_(a,b,c,d,e,f,g) PetscMissingLapack("LAEV2",a,b,c,d,e,f,g);
 72: #endif
 73: #if !defined(SLEPC_MISSING_LAPACK_GEHRD)
 74: BLAS_EXTERN void     LAPACKgehrd_(const PetscBLASInt*,const PetscBLASInt*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscScalar*,PetscScalar*,const PetscBLASInt*,PetscBLASInt*);
 75: #else
 76: #define LAPACKgehrd_(a,b,c,d,e,f,g,h,i) PetscMissingLapack("GEHRD",a,b,c,d,e,f,g,h,i);
 77: #endif
 78: #if !defined(SLEPC_MISSING_LAPACK_GEBRD)
 79: BLAS_EXTERN void     LAPACKgebrd_(const PetscBLASInt*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscReal*,PetscReal*,PetscScalar*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*);
 80: #else
 81: #define LAPACKgebrd_(a,b,c,d,e,f,g,h,i,j,k) PetscMissingLapack("GEBRD",a,b,c,d,e,f,g,h,i,j,k);
 82: #endif
 83: #if !defined(SLEPC_MISSING_LAPACK_LARFG)
 84: BLAS_EXTERN void     LAPACKlarfg_(const PetscBLASInt*,PetscScalar*,PetscScalar*,const PetscBLASInt*,PetscScalar*);
 85: #else
 86: #define LAPACKlarfg_(a,b,c,d,e) PetscMissingLapack("LARFG",a,b,c,d,e);
 87: #endif
 88: #if !defined(SLEPC_MISSING_LAPACK_LAG2)
 89: BLAS_EXTERN void     LAPACKlag2_(const PetscReal*,const PetscBLASInt*,const PetscReal*,const PetscBLASInt*,const PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscReal*);
 90: #else
 91: #define LAPACKlag2_(a,b,c,d,e,f,g,h,i,j) PetscMissingLapack("LAG2",a,b,c,d,e,f,g,h,i,j);
 92: #endif
 93: #if !defined(SLEPC_MISSING_LAPACK_LASV2)
 94: BLAS_EXTERN void     LAPACKlasv2_(const PetscReal*,const PetscReal*,const PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscReal*);
 95: #else
 96: #define LAPACKlasv2_(a,b,c,d,e,f,g,h,i) PetscMissingLapack("LASV2",a,b,c,d,e,f,g,h,i);
 97: #endif
 98: #if !defined(SLEPC_MISSING_LAPACK_LARTG)
 99: BLAS_EXTERN void     LAPACKlartg_(const PetscScalar*,const PetscScalar*,PetscReal*,PetscScalar*,PetscScalar*);
100: BLAS_EXTERN void     LAPACKREALlartg_(const PetscReal*,const PetscReal*,PetscReal*,PetscReal*,PetscReal*);
101: #else
102: #define LAPACKlartg_(a,b,c,d,e) PetscMissingLapack("LARTG",a,b,c,d,e);
103: #define LAPACKREALlartg_(a,b,c,d,e) PetscMissingLapack("LARTG",a,b,c,d,e);
104: #endif
105: #if !defined(SLEPC_MISSING_LAPACK_LAED4)
106: BLAS_EXTERN void     LAPACKlaed4_(const PetscBLASInt*,const PetscBLASInt*,const PetscReal*,const PetscReal*,PetscReal*,const PetscReal*,PetscReal*,PetscBLASInt*);
107: #else
108: #define LAPACKlaed4_(a,b,c,d,e,f,g,h) PetscMissingLapack("LAED4",a,b,c,d,e,f,g,h);
109: #endif
110: #if !defined(SLEPC_MISSING_LAPACK_LAMRG)
111: BLAS_EXTERN void     LAPACKlamrg_(const PetscBLASInt*,const PetscBLASInt*,const PetscReal*,const PetscBLASInt*,const PetscBLASInt*,PetscBLASInt*);
112: #else
113: #define LAPACKlamrg_(a,b,c,d,e,f) PetscMissingLapack("LAMRG",a,b,c,d,e,f);
114: #endif
115: #if !defined(SLEPC_MISSING_LAPACK_ORGHR)
116: BLAS_EXTERN void     LAPACKorghr_(const PetscBLASInt*,const PetscBLASInt*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,const PetscScalar*,PetscScalar*,const PetscBLASInt*,PetscBLASInt*);
117: #else
118: #define LAPACKorghr_(a,b,c,d,e,f,g,h,i) PetscMissingLapack("ORGHR",a,b,c,d,e,f,g,h,i);
119: #endif
120: #if !defined(PETSC_USE_COMPLEX)
121: #if !defined(SLEPC_MISSING_LAPACK_TGEXC)
122: BLAS_EXTERN void     LAPACKtgexc_(const PetscBLASInt*,const PetscBLASInt*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscBLASInt*);
123: #else
124: #define LAPACKtgexc_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p) PetscMissingLapack("TGEXC",a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p);
125: #endif
126: BLAS_EXTERN void     LAPACKgeqp3_(const PetscBLASInt*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscScalar*,const PetscBLASInt*,PetscBLASInt*);
127: #else
128: #if !defined(SLEPC_MISSING_LAPACK_TGEXC)
129: BLAS_EXTERN void     LAPACKtgexc_(const PetscBLASInt*,const PetscBLASInt*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,const PetscBLASInt*,PetscBLASInt*);
130: #else
131: #define LAPACKtgexc_(a,b,c,d,e,f,g,h,i,j,k,l,m,n) PetscMissingLapack("TGEXC",a,b,c,d,e,f,g,h,i,j,k,l,m,n);
132: #endif
133: BLAS_EXTERN void     LAPACKgeqp3_(const PetscBLASInt*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscScalar*,const PetscBLASInt*,PetscReal*,PetscBLASInt*);
134: #endif

136: /* LAPACK functions with string parameters */

138: /* same name for real and complex */
139: BLAS_EXTERN void     BLAStrmm_(const char*,const char*,const char*,const char*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*);
140: BLAS_EXTERN SlepcLRT LAPACKlange_(const char*,const PetscBLASInt*,const PetscBLASInt*,const PetscScalar*,const PetscBLASInt*,PetscReal*);
141: #if !defined(SLEPC_MISSING_LAPACK_LANHS)
142: BLAS_EXTERN SlepcLRT LAPACKlanhs_(const char*,const PetscBLASInt*,const PetscScalar*,const PetscBLASInt*,PetscReal*);
143: #else
144: static inline SlepcLRT LAPACKlanhs_(const char *norm,const PetscBLASInt *n,const PetscScalar *A,const PetscBLASInt *lda,PetscReal *work) {return LAPACKlange_(norm,n,n,A,lda,work);}
145: #endif
146: #if !defined(SLEPC_MISSING_LAPACK_LARF)
147: BLAS_EXTERN void     LAPACKlarf_(const char*,const PetscBLASInt*,const PetscBLASInt*,const PetscScalar*,const PetscBLASInt*,const PetscScalar*,PetscScalar*,const PetscBLASInt*,PetscScalar*);
148: #else
149: #define LAPACKlarf_(a,b,c,d,e,f,g,h,i) PetscMissingLapack("LARF",a,b,c,d,e,f,g,h,i);
150: #endif
151: BLAS_EXTERN SlepcLRT LAPACKlansy_(const char*,const char*,const PetscBLASInt*,const PetscScalar*,const PetscBLASInt*,PetscReal*);
152: #if !defined(SLEPC_MISSING_LAPACK_TRSYL)
153: BLAS_EXTERN void     LAPACKtrsyl_(const char*,const char*,const PetscBLASInt*,const PetscBLASInt*,const PetscBLASInt*,const PetscScalar*,const PetscBLASInt*,const PetscScalar*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscReal*,PetscBLASInt*);
154: #else
155: #define LAPACKtrsyl_(a,b,c,d,e,f,g,h,i,j,k,l,m) PetscMissingLapack("TRSYL",a,b,c,d,e,f,g,h,i,j,k,l,m);
156: #endif
157: #if !defined(SLEPC_MISSING_LAPACK_BDSQR)
158: BLAS_EXTERN void     LAPACKbdsqr_(const char*,const PetscBLASInt*,const PetscBLASInt*,const PetscBLASInt*,const PetscBLASInt*,PetscReal*,PetscReal*,PetscScalar*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscReal*,PetscBLASInt*);
159: #else
160: #define LAPACKbdsqr_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o) PetscMissingLapack("BDSQR",a,b,c,d,e,f,g,h,i,j,k,l,m,n,o);
161: #endif

163: /* subroutines in which we use only the real version, do not care whether they have different name */
164: #if !defined(SLEPC_MISSING_LAPACK_STEVR)
165: BLAS_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*);
166: #else
167: #define LAPACKstevr_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t) PetscMissingLapack("STEVR",a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t);
168: #endif
169: #if !defined(SLEPC_MISSING_LAPACK_BDSDC)
170: BLAS_EXTERN void     LAPACKbdsdc_(const char*,const char*,PetscBLASInt*,PetscReal*,PetscReal*,PetscReal*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*);
171: #else
172: #define LAPACKbdsdc_(a,b,c,d,e,f,g,h,i,j,k,l,m,n) PetscMissingLapack("BDSDC",a,b,c,d,e,f,g,h,i,j,k,l,m,n);
173: #endif
174: BLAS_EXTERN SlepcLRT LAPACKlamch_(const char*);
175: BLAS_EXTERN SlepcLRT LAPACKlamc3_(PetscReal*,PetscReal*);

177: /* subroutines with different name in real/complex */
178: #if !defined(SLEPC_MISSING_LAPACK_ORGTR)
179: BLAS_EXTERN void     LAPACKorgtr_(const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*);
180: #else
181: #define LAPACKorgtr_(a,b,c,d,e,f,g,h) PetscMissingLapack("ORGTR",a,b,c,d,e,f,g,h);
182: #endif
183: #if !defined(SLEPC_MISSING_LAPACK_ORMBR)
184: BLAS_EXTERN void     LAPACKormbr_(const char*,const char*,const char*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*);
185: #else
186: #define LAPACKormbr_(a,b,c,d,e,f,g,h,i,j,k,l,m,n) PetscMissingLapack("ORMBR",a,b,c,d,e,f,g,h,i,j,k,l,m,n);
187: #endif
188: #if !defined(SLEPC_MISSING_LAPACK_SYTRD)
189: BLAS_EXTERN void     LAPACKsytrd_(const char*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscReal*,PetscReal*,PetscScalar*,PetscScalar*,const PetscBLASInt*,PetscBLASInt*);
190: #else
191: #define LAPACKsytrd_(a,b,c,d,e,f,g,h,i,j) PetscMissingLapack("SYTRD",a,b,c,d,e,f,g,h,i,j);
192: #endif
193: #if !defined(PETSC_USE_COMPLEX)
194: BLAS_EXTERN void     LAPACKsyevd_(const char*,const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*);
195: BLAS_EXTERN void     LAPACKsygvd_(PetscBLASInt*,const char*,const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*);
196: #else
197: BLAS_EXTERN void     LAPACKsyevd_(const char*,const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*);
198: BLAS_EXTERN void     LAPACKsygvd_(PetscBLASInt*,const char*,const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*);
199: #endif

201: /* subroutines with different signature in real/complex */
202: #if !defined(PETSC_USE_COMPLEX)
203: BLAS_EXTERN void     LAPACKggev_(const char*,const char*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscBLASInt*);
204: #if !defined(SLEPC_MISSING_LAPACK_GGEV3)
205: BLAS_EXTERN void     LAPACKggev3_(const char*,const char*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscBLASInt*);
206: #else
207: #define LAPACKggev3_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q) PetscMissingLapack("GGEV3",a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q);
208: #endif
209: #if !defined(SLEPC_MISSING_LAPACK_GGES3)
210: BLAS_EXTERN void     LAPACKgges3_(const char*,const char*,const char*,PetscBLASInt(*)(void),const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscBLASInt*,PetscBLASInt*);
211: #else
212: #define LAPACKgges3_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u) PetscMissingLapack("GGES3",a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u)
213: #endif
214: #if !defined(SLEPC_MISSING_LAPACK_GGSVD)
215: BLAS_EXTERN void     LAPACKggsvd_(const char*,const char*,const char*,const PetscBLASInt*,const PetscBLASInt*,const PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscReal*,PetscReal*,PetscScalar*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*);
216: #else
217: #define LAPACKggsvd_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w) PetscMissingLapack("GGSVD",a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w);
218: #endif
219: #if !defined(SLEPC_MISSING_LAPACK_GGSVD3)
220: BLAS_EXTERN void     LAPACKggsvd3_(const char*,const char*,const char*,const PetscBLASInt*,const PetscBLASInt*,const PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscReal*,PetscReal*,PetscScalar*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscBLASInt*,PetscBLASInt*);
221: #else
222: #define LAPACKggsvd3_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x) PetscMissingLapack("GGSVD3",a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x);
223: #endif
224: #if !defined(SLEPC_MISSING_LAPACK_TREVC)
225: BLAS_EXTERN void     LAPACKtrevc_(const char*,const char*,PetscBLASInt*,const PetscBLASInt*,const PetscScalar*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,const PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*);
226: #else
227: #define LAPACKtrevc_(a,b,c,d,e,f,g,h,i,j,k,l,m,n) PetscMissingLapack("TREVC",a,b,c,d,e,f,g,h,i,j,k,l,m,n);
228: #endif
229: BLAS_EXTERN void     LAPACKgeevx_(const char*,const char*,const char*,const char*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscScalar*,PetscScalar*,PetscScalar*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,const PetscBLASInt*,PetscBLASInt*,PetscBLASInt*);
230: BLAS_EXTERN void     LAPACKgees_(const char*,const char*,PetscBLASInt(*)(PetscReal,PetscReal),const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscScalar*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscBLASInt*,PetscBLASInt*);
231: #if !defined(SLEPC_MISSING_LAPACK_TREXC)
232: BLAS_EXTERN void     LAPACKtrexc_(const char*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*);
233: #else
234: #define LAPACKtrexc_(a,b,c,d,e,f,g,h,i,j) PetscMissingLapack("TREXC",a,b,c,d,e,f,g,h,i,j);
235: #endif
236: BLAS_EXTERN void     LAPACKgesdd_(const char*,const PetscBLASInt*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscReal*,PetscScalar*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscBLASInt*,PetscBLASInt*);
237: #if !defined(SLEPC_MISSING_LAPACK_TGEVC)
238: BLAS_EXTERN void     LAPACKtgevc_(const char*,const char*,const PetscBLASInt*,const PetscBLASInt*,const PetscScalar*,const PetscBLASInt*,const PetscScalar*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,const PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*);
239: #else
240: #define LAPACKtgevc_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p) PetscMissingLapack("TGEVC",a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p);
241: #endif
242: #if !defined(SLEPC_MISSING_LAPACK_HSEIN)
243: BLAS_EXTERN void     LAPACKhsein_(const char*,const char*,const char*,PetscBLASInt*,const PetscBLASInt*,const PetscScalar*,const PetscBLASInt*,PetscScalar*,const PetscScalar*,PetscScalar*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,const PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*);
244: #else
245: #define LAPACKhsein_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s) PetscMissingLapack("HSEIN",a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s);
246: #endif
247: #if !defined(SLEPC_MISSING_LAPACK_STEDC)
248: BLAS_EXTERN void     LAPACKstedc_(const char*,const PetscBLASInt*,PetscReal*,PetscReal*,PetscScalar*,const PetscBLASInt*,PetscReal*,const PetscBLASInt*,PetscBLASInt*,const PetscBLASInt*,PetscBLASInt*);
249: #else
250: #define LAPACKstedc_(a,b,c,d,e,f,g,h,i,j,k) PetscMissingLapack("STEDC",a,b,c,d,e,f,g,h,i,j,k);
251: #endif
252: #if !defined(SLEPC_MISSING_LAPACK_LASCL)
253: BLAS_EXTERN void     LAPACKlascl_(const char*,const PetscBLASInt*,const PetscBLASInt*,const PetscScalar*,const PetscScalar*,const PetscBLASInt*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscBLASInt*);
254: #else
255: #define LAPACKlascl_(a,b,c,d,e,f,g,h,i,j) PetscMissingLapack("LASCL",a,b,c,d,e,f,g,h,i,j);
256: #endif
257: #else
258: BLAS_EXTERN void     LAPACKggev_(const char*,const char*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscScalar*,PetscScalar*,PetscScalar*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscReal*,PetscBLASInt*);
259: #if !defined(SLEPC_MISSING_LAPACK_GGEV3)
260: BLAS_EXTERN void     LAPACKggev3_(const char*,const char*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscScalar*,PetscScalar*,PetscScalar*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscReal*,PetscBLASInt*);
261: #else
262: #define LAPACKggev3_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q) PetscMissingLapack("GGEV3",a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q);
263: #endif
264: #if !defined(SLEPC_MISSING_LAPACK_GGES3)
265: BLAS_EXTERN void     LAPACKgges3_(const char*,const char*,const char*,PetscBLASInt(*)(void),const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscScalar*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*);
266: #else
267: #define LAPACKgges3_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u) PetscMissingLapack("GGES3",a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u)
268: #endif
269: #if !defined(SLEPC_MISSING_LAPACK_GGSVD)
270: BLAS_EXTERN void     LAPACKggsvd_(const char*,const char*,const char*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscReal*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscReal*,PetscBLASInt*,PetscBLASInt*);
271: #else
272: #define LAPACKggsvd_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x) PetscMissingLapack("GGSVD",a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x);
273: #endif
274: #if !defined(SLEPC_MISSING_LAPACK_GGSVD3)
275: BLAS_EXTERN void     LAPACKggsvd3_(const char*,const char*,const char*,const PetscBLASInt*,const PetscBLASInt*,const PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscReal*,PetscReal*,PetscScalar*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*);
276: #else
277: #define LAPACKggsvd3_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y) PetscMissingLapack("GGSVD3",a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y);
278: #endif
279: #if !defined(SLEPC_MISSING_LAPACK_TREVC)
280: BLAS_EXTERN void     LAPACKtrevc_(const char*,const char*,const PetscBLASInt*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,const PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscReal*,PetscBLASInt*);
281: #else
282: #define LAPACKtrevc_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o) PetscMissingLapack("TREVC",a,b,c,d,e,f,g,h,i,j,k,l,m,n,o);
283: #endif
284: BLAS_EXTERN void     LAPACKgeevx_(const char*,const char*,const char*,const char*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscScalar*,PetscScalar*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscScalar*,const PetscBLASInt*,PetscReal*,PetscBLASInt*);
285: BLAS_EXTERN void     LAPACKgees_(const char*,const char*,PetscBLASInt(*)(PetscScalar),const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscScalar*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*);
286: #if !defined(SLEPC_MISSING_LAPACK_TREXC)
287: BLAS_EXTERN void     LAPACKtrexc_(const char*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,const PetscBLASInt*,const PetscBLASInt*,PetscBLASInt*);
288: #else
289: #define LAPACKtrexc_(a,b,c,d,e,f,g,h,i) PetscMissingLapack("TREXC",a,b,c,d,e,f,g,h,i);
290: #endif
291: BLAS_EXTERN void     LAPACKgesdd_(const char*,const PetscBLASInt*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscReal*,PetscScalar*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*);
292: #if !defined(SLEPC_MISSING_LAPACK_TGEVC)
293: BLAS_EXTERN void     LAPACKtgevc_(const char*,const char*,const PetscBLASInt*,const PetscBLASInt*,const PetscScalar*,const PetscBLASInt*,const PetscScalar*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,const PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscReal*,PetscBLASInt*);
294: #else
295: #define LAPACKtgevc_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q) PetscMissingLapack("TGEVC",a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q);
296: #endif
297: #if !defined(SLEPC_MISSING_LAPACK_HSEIN)
298: BLAS_EXTERN void     LAPACKhsein_(const char*,const char*,const char*,const PetscBLASInt*,const PetscBLASInt*,const PetscScalar*,const PetscBLASInt*,PetscScalar*,PetscScalar*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,const PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*);
299: #else
300: #define LAPACKhsein_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s) PetscMissingLapack("HSEIN",a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s);
301: #endif
302: #if !defined(SLEPC_MISSING_LAPACK_STEDC)
303: BLAS_EXTERN void     LAPACKstedc_(const char*,const PetscBLASInt*,PetscReal*,PetscReal*,PetscScalar*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscReal*,const PetscBLASInt*,PetscBLASInt*,const PetscBLASInt*,PetscBLASInt*);
304: #else
305: #define LAPACKstedc_(a,b,c,d,e,f,g,h,i,j,k,l,m) PetscMissingLapack("STEDC",a,b,c,d,e,f,g,h,i,j,k,l,m);
306: #endif
307: #if !defined(SLEPC_MISSING_LAPACK_LASCL)
308: BLAS_EXTERN void     LAPACKlascl_(const char*,const PetscBLASInt*,const PetscBLASInt*,const PetscReal*,const PetscReal*,const PetscBLASInt*,const PetscBLASInt*,PetscScalar*,const PetscBLASInt*,PetscBLASInt*);
309: #else
310: #define LAPACKlascl_(a,b,c,d,e,f,g,h,i,j) PetscMissingLapack("LASCL",a,b,c,d,e,f,g,h,i,j);
311: #endif
312: #endif

314: #if defined(PETSC_HAVE_COMPLEX)
315: /* complex subroutines to be called with scalar-type=real */
316: BLAS_EXTERN void BLASCOMPLEXgemm_(const char*,const char*,const PetscBLASInt*,const PetscBLASInt*,const PetscBLASInt*,const PetscComplex*,const PetscComplex*,const PetscBLASInt*,const PetscComplex*,const PetscBLASInt*,const PetscComplex*,PetscComplex*,const PetscBLASInt*);
317: BLAS_EXTERN void BLASCOMPLEXscal_(const PetscBLASInt*,const PetscComplex*,PetscComplex*,const PetscBLASInt*);
318: BLAS_EXTERN void LAPACKCOMPLEXgesv_(const PetscBLASInt*,const PetscBLASInt*,PetscComplex*,const PetscBLASInt*,PetscBLASInt*,PetscComplex*,const PetscBLASInt*,PetscBLASInt*);
319: #endif