xref: /petsc/include/petscblaslapack.h (revision 71ef1302f39468adc67cf1bb1e6e5ad7e70a9250)
1 /*
2    This file provides some name space protection from LAPACK and BLAS and
3 allows the appropriate single or double precision version to be used.
4 This file also deals with different Fortran 77 naming conventions on machines.
5 
6    Another problem is character strings are represented differently on
7 on some machines in C and Fortran 77. This problem comes up on the
8 Cray T3D/T3E.
9 
10 */
11 #if !defined(_BLASLAPACK_H)
12 #define _BLASLAPACK_H
13 #include "petsc.h"
14 PETSC_EXTERN_CXX_BEGIN
15 
16 #if defined(PETSC_BLASLAPACK_MKL64_ONLY)
17 #define PETSC_MISSING_LAPACK_GESVD
18 #define PETSC_MISSING_LAPACK_GEEV
19 #define PETSC_MISSING_LAPACK_GETRF
20 #define PETSC_MISSING_LAPACK_POTRF
21 #define PETSC_MISSING_LAPACK_GETRS
22 #define PETSC_MISSING_LAPACK_POTRS
23 #elif defined(PETSC_BLASLAPACK_MKL_ONLY)
24 #define PETSC_MISSING_LAPACK_GESVD
25 #define PETSC_MISSING_LAPACK_GEEV
26 #elif defined(PETSC_BLASLAPACK_CRAY_ONLY)
27 #define PETSC_MISSING_LAPACK_GESVD
28 #elif defined(PETSC_BLASLAPACK_ESSL_ONLY)
29 #define PETSC_MISSING_LAPACK_GESVD
30 #define PETSC_MISSING_LAPACK_GETRF
31 #define PETSC_MISSING_LAPACK_GETRS
32 #define PETSC_MISSING_LAPACK_POTRF
33 #define PETSC_MISSING_LAPACK_POTRS
34 #endif
35 
36 /*
37    This include file on the Cray T3D/T3E defines the interface between
38   Fortran and C representations of character strings.
39 */
40 #if defined(PETSC_USES_CPTOFCD)
41 #include <fortran.h>
42 #endif
43 
44 #if !defined(PETSC_USE_COMPLEX)
45 
46 /*
47     These are real case with no character string arguments
48 */
49 
50 #if defined(PETSC_USES_FORTRAN_SINGLE)
51 /*
52    For these machines we must call the single precision Fortran version
53 */
54 #define DGEQRF   SGEQRF
55 #define DGETRF   SGETRF
56 #define DDOT     SDOT
57 #define DNRM2    SNRM2
58 #define DSCAL    SSCAL
59 #define DCOPY    SCOPY
60 #define DSWAP    SSWAP
61 #define DAXPY    SAXPY
62 #define DASUM    SASUM
63 #define DSORMQR  SORMQR
64 #define DTRTRS   STRTRS
65 #define DPOTRF   SPOTRF
66 #define DPOTRS   SPOTRS
67 #define DGEMV    SGEMV
68 #define DGETRS   SGETRS
69 #define DGETRS   SGETRS
70 #define DGEMM    SGEMM
71 #define DGESVD   SGESVD
72 #define DGEEV    SGEEV
73 #define DTRMV    STRMV
74 #define DTRSL    STRSL
75 #endif
76 
77 #if defined(PETSC_USE_SINGLE)
78 
79 #if defined(PETSC_HAVE_FORTRAN_UNDERSCORE) || defined(PETSC_BLASLAPACK_F2C)
80 #define LAPACKgeqrf_ sgeqrf_
81 #define LAPACKgetrf_ sgetrf_
82 #define LAPACKgetf2_ sgetf2_
83 #define BLASdot_     sdot_
84 #define BLASnrm2_    snrm2_
85 #define BLASscal_    sscal_
86 #define BLAScopy_    scopy_
87 #define BLASswap_    sswap_
88 #define BLASaxpy_    saxpy_
89 #define BLASasum_    sasum_
90 #elif defined(PETSC_HAVE_FORTRAN_CAPS)
91 #define LAPACKgeqrf_ SGEQRF
92 #define LAPACKgetrf_ SGETRF
93 #define LAPACKgetf2_ SGETF2
94 #define BLASdot_     SDOT
95 #define BLASnrm2_    SNRM2
96 #define BLASscal_    SSCAL
97 #define BLAScopy_    SCOPY
98 #define BLASswap_    SSWAP
99 #define BLASaxpy_    SAXPY
100 #define BLASasum_    SASUM
101 #else
102 #define LAPACKgeqrf_ sgeqrf
103 #define LAPACKgetrf_ sgetrf
104 #define LAPACKgetf2_ sgetf2
105 #define BLASdot_     sdot
106 #define BLASnrm2_    snrm2
107 #define BLASscal_    sscal
108 #define BLAScopy_    scopy
109 #define BLASswap_    sswap
110 #define BLASaxpy_    saxpy
111 #define BLASasum_    sasum
112 #endif
113 
114 #else
115 
116 #if defined(PETSC_HAVE_FORTRAN_UNDERSCORE) || defined(PETSC_BLASLAPACK_F2C)
117 #define LAPACKgeqrf_ dgeqrf_
118 #define LAPACKgetrf_ dgetrf_
119 #define LAPACKgetf2_ dgetf2_
120 #define BLASdot_     ddot_
121 #define BLASnrm2_    dnrm2_
122 #define BLASscal_    dscal_
123 #define BLAScopy_    dcopy_
124 #define BLASswap_    dswap_
125 #define BLASaxpy_    daxpy_
126 #define BLASasum_    dasum_
127 #elif defined(PETSC_HAVE_FORTRAN_CAPS)
128 #define LAPACKgeqrf_ DGEQRF
129 #define LAPACKgetrf_ DGETRF
130 #define LAPACKgetf2_ DGETF2
131 #define BLASdot_     DDOT
132 #define BLASnrm2_    DNRM2
133 #define BLASscal_    DSCAL
134 #define BLAScopy_    DCOPY
135 #define BLASswap_    DSWAP
136 #define BLASaxpy_    DAXPY
137 #define BLASasum_    DASUM
138 #else
139 #define LAPACKgeqrf_ dgeqrf
140 #define LAPACKgetrf_ dgetrf
141 #define LAPACKgetf2_ dgetf2
142 #define BLASdot_     ddot
143 #define BLASnrm2_    dnrm2
144 #define BLASscal_    dscal
145 #define BLAScopy_    dcopy
146 #define BLASswap_    dswap
147 #define BLASaxpy_    daxpy
148 #define BLASasum_    dasum
149 #endif
150 
151 #endif
152 
153 /*
154    Real with character string arguments.
155 */
156 #if defined(PETSC_USES_CPTOFCD)
157 /*
158    Note that this assumes that machines which use cptofcd() use
159   the PETSC_HAVE_FORTRAN_CAPS option. This is true on the Cray T3D/T3E.
160 */
161 #define LAPACKormqr_(a,b,c,d,e,f,g,h,i,j,k,l,m)   DORMQR(_cptofcd((a),1),_cptofcd((b),1),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m))
162 #define LAPACKtrtrs_(a,b,c,d,e,f,g,h,i,j)         DTRTRS(_cptofcd((a),1),_cptofcd((b),1),_cptofcd((c),1),(d),(e),(f),(g),(h),(i),(j))
163 #define LAPACKpotrf_(a,b,c,d,e)                   DPOTRF(_cptofcd((a),1),(b),(c),(d),(e))
164 #define LAPACKpotrs_(a,b,c,d,e,f,g,h)             DPOTRS(_cptofcd((a),1),(b),(c),(d),(e),(f),(g),(h))
165 #define BLASgemv_(a,b,c,d,e,f,g,h,i,j,k)        DGEMV(_cptofcd((a),1),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k))
166 #define LAPACKgetrs_(a,b,c,d,e,f,g,h,i)           DGETRS(_cptofcd((a),1),(b),(c),(d),(e),(f),(g),(h),(i))
167 #define BLASgemm_(a,b,c,d,e,f,g,h,i,j,k,l,m)    DGEMM(_cptofcd((a),1), _cptofcd((a),1),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m))
168 #define LAPACKgesvd_(a,b,c,d,e,f,g,h,i,j,k,l,m,n) DGESVD(_cptofcd((a),1),_cptofcd((a),1),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n))
169 #define LAPACKgeev_(a,b,c,d,e,f,g,h,i,j,k,l,m,n)  DGEEV(_cptofcd((a),1),_cptofcd((a),1),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n))
170 #define BLAStrmv_  DTRMV
171 #define LAPACKtrsl_  DTRSL
172 #define LAPACKgetrf_ DGETRF
173 
174 #elif defined(PETSC_USE_SINGLE)
175 
176 #if defined(PETSC_HAVE_FORTRAN_UNDERSCORE) || defined(PETSC_BLASLAPACK_F2C)
177 #define LAPACKormqr_ sormqr_
178 #define LAPACKtrtrs_ strtrs_
179 #define LAPACKpotrf_ spotrf_
180 #define LAPACKpotrs_ spotrs_
181 #define BLASgemv_  sgemv_
182 #define LAPACKgetrs_ sgetrs_
183 #define BLAStrmv_  strmv_
184 #define LAPACKtrsl_  strsl_
185 #define BLASgemm_  sgemm_
186 #define LAPACKgesvd_ sgesvd_
187 #define LAPACKgeev_  sgeev_
188 #elif defined(PETSC_HAVE_FORTRAN_CAPS)
189 #define LAPACKormqr_ SORMQR
190 #define LAPACKtrtrs_ STRTRS
191 #define LAPACKpotrf_ SPOTRF
192 #define LAPACKpotrs_ SPOTRS
193 #define BLASgemv_  SGEMV
194 #define LAPACKgetrs_ SGETRS
195 #define BLAStrmv_  STRMV
196 #define LAPACKtrsl_  STRSL
197 #define LAPACKgesvd_ SGESVD
198 #define LAPACKgeev_  SGEEV
199 #define BLASgemm_  SGEMM
200 #else
201 #define LAPACKormqr_ sormqr
202 #define LAPACKtrtrs_ strtrs
203 #define LAPACKpotrf_ spotrf
204 #define LAPACKpotrs_ spotrs
205 #define BLASgemv_  sgemv
206 #define LAPACKgetrs_ sgetrs
207 #define BLAStrmv_  strmv
208 #define LAPACKtrsl_  strsl
209 #define BLASgemm_  sgemm
210 #define LAPACKgesvd_ sgesvd
211 #define LAPACKgeev_  sgeev
212 #endif
213 
214 #else /* PETSC_USE_SINGLE */
215 
216 #if defined(PETSC_HAVE_FORTRAN_UNDERSCORE) || defined(PETSC_BLASLAPACK_F2C)
217 #define LAPACKormqr_ dormqr_
218 #define LAPACKtrtrs_ dtrtrs_
219 #define LAPACKpotrf_ dpotrf_
220 #define LAPACKpotrs_ dpotrs_
221 #define BLASgemv_  dgemv_
222 #define LAPACKgetrs_ dgetrs_
223 #define BLAStrmv_  dtrmv_
224 #define LAPACKtrsl_  dtrsl_
225 #define BLASgemm_  dgemm_
226 #define LAPACKgesvd_ dgesvd_
227 #define LAPACKgeev_  dgeev_
228 #elif defined(PETSC_HAVE_FORTRAN_CAPS)
229 #define LAPACKormqr_ DORMQR
230 #define LAPACKtrtrs_ DTRTRS
231 #define LAPACKpotrf_ DPOTRF
232 #define LAPACKpotrs_ DPOTRS
233 #define BLASgemv_  DGEMV
234 #define LAPACKgetrs_ DGETRS
235 #define BLAStrmv_  DTRMV
236 #define LAPACKtrsl_  DTRSL
237 #define LAPACKgesvd_ DGESVD
238 #define LAPACKgeev_  DGEEV
239 #define BLASgemm_  DGEMM
240 #else
241 #define LAPACKormqr_ dormqr
242 #define LAPACKtrtrs_ dtrtrs
243 #define LAPACKpotrf_ dpotrf
244 #define LAPACKpotrs_ dpotrs
245 #define BLASgemv_  dgemv
246 #define LAPACKgetrs_ dgetrs
247 #define BLAStrmv_  dtrmv
248 #define LAPACKtrsl_  dtrsl
249 #define BLASgemm_  dgemm
250 #define LAPACKgesvd_ dgesvd
251 #define LAPACKgeev_  dgeev
252 #endif
253 
254 #endif /* PETSC_USES_CPTOFCD */
255 
256 #else
257 /*
258    Complex with no character string arguments
259 */
260 #if defined(PETSC_USES_FORTRAN_SINGLE)
261 #define ZGEQRF  CGEQRF
262 #define ZDOTC   CDOTC
263 #define DZNRM2  SCNRM2
264 #define ZSCAL   CSCAL
265 #define ZCOPY   CCOPY
266 #define ZSWAP   CSWAP
267 #define ZAXPY   CAXPY
268 #define DZASUM  SCASUM
269 #define ZGETRF  CGETRF
270 #define ZTRTRS  CTRTRS
271 #define ZPOTRF  CPOTRF
272 #define ZPOTRS  CPOTRS
273 #define ZGEMV   CGEMV
274 #define ZGETRS  CGETRS
275 #define ZGEMM   SGEMM
276 #define ZTRMV   CTRMV
277 #define ZTRSL   CTRSL
278 #define ZGEEV   CGEEV
279 #endif
280 
281 #if defined(PETSC_HAVE_FORTRAN_UNDERSCORE) || defined(PETSC_BLASLAPACK_F2C)
282 #define LAPACKgeqrf_ zgeqrf_
283 #define LAPACKgetrf_ zgetrf_
284 #define LAPACKgetf2_ zgetf2_
285 #define BLASdot_     zdotc_
286 #define BLASnrm2_    dznrm2_
287 #define BLASscal_    zscal_
288 #define BLAScopy_    zcopy_
289 #define BLASswap_    zswap_
290 #define BLASaxpy_    zaxpy_
291 #define BLASasum_    dzasum_
292 #elif defined(PETSC_HAVE_FORTRAN_CAPS)
293 #define LAPACKgeqrf_ ZGEQRF
294 #define LAPACKgetrf_ ZGETRF
295 #define BLASdot_     ZDOTC
296 #define BLASnrm2_    DZNRM2
297 #define BLASscal_    ZSCAL
298 #define BLAScopy_    ZCOPY
299 #define BLASswap_    ZSWAP
300 #define BLASaxpy_    ZAXPY
301 #define BLASasum_    DZASUM
302 #else
303 #define LAPACKgeqrf_ zgeqrf
304 #define LAPACKgetrf_ zgetrf
305 #define LAPACKgetf2_ zgetf2
306 #define BLASdot_     zdotc
307 #define BLASnrm2_    dznrm2
308 #define BLASscal_    zscal
309 #define BLAScopy_    zcopy
310 #define BLASswap_    zswap
311 #define BLASaxpy_    zaxpy
312 #define BLASasum_    dzasum
313 #endif
314 
315 #if defined(PETSC_USES_CPTOFCD)
316 #define LAPACKtrtrs_(a,b,c,d,e,f,g,h,i,j)           ZTRTRS(_cptofcd((a),1),_cptofcd((b),1),_cptofcd((c),1),(d),(e),(f),(g),(h),(i),(j))
317 #define LAPACKpotrf_(a,b,c,d,e)                     ZPOTRF(_cptofcd((a),1),(b),(c),(d),(e))
318 #define LAPACKpotrs_(a,b,c,d,e,f,g,h)               ZPOTRS(_cptofcd((a),1),(b),(c),(d),(e),(f),(g),(h))
319 #define BLASgemv_(a,b,c,d,e,f,g,h,i,j,k)          ZGEMV(_cptofcd((a),1),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k))
320 #define LAPACKgetrs_(a,b,c,d,e,f,g,h,i)             ZGETRS(_cptofcd((a),1),(b),(c),(d),(e),(f),(g),(h),(i))
321 #define BLASgemm_(a,b,c,d,e,f,g,h,i,j,k,l,m)      ZGEMM(_cptofcd((a),1),_cptofcd((a),1),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m))
322 #define LAPACKgesvd_(a,b,c,d,e,f,g,h,i,j,k,l,m,n,p) ZGESVD(_cptofcd((a),1),_cptofcd((a),1),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(p))
323 #define LAPACKgeev_(a,b,c,d,e,f,g,h,i,j,k,l,m,n)    ZGEEV(_cptofcd((a),1),_cptofcd((a),1),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n))
324 #define BLAStrmv_    ZTRMV
325 #define LAPACKtrsl_  ZTRSL
326 #elif defined(PETSC_HAVE_FORTRAN_UNDERSCORE) || defined(PETSC_BLASLAPACK_F2C)
327 #define LAPACKtrtrs_ ztrtrs_
328 #define LAPACKpotrf_ zpotrf_
329 #define LAPACKpotrs_ zpotrs_
330 #define BLASgemv_    zgemv_
331 #define LAPACKgetrs_ zgetrs_
332 #define BLAStrmv_    ztrmv_
333 #define LAPACKtrsl_  ztrsl_
334 #define BLASgemm_    zgemm_
335 #define LAPACKgesvd_ zgesvd_
336 #define LAPACKgeev_  zgeev_
337 #elif defined(PETSC_HAVE_FORTRAN_CAPS)
338 #define LAPACKtrtrs_ ZTRTRS
339 #define LAPACKpotrf_ ZPOTRF
340 #define LAPACKpotrs_ ZPOTRS
341 #define BLASgemv_    ZGEMV
342 #define LAPACKgetrf_ ZGETRF
343 #define LAPACKgetf2_ ZGETF2
344 #define LAPACKgetrs_ ZGETRS
345 #define BLAStrmv_    ZTRMV
346 #define LAPACKtrsl_  ZTRSL
347 #define BLASgemm_    ZGEMM
348 #define LAPACKgesvd_ ZGESVD
349 #define LAPACKgeev_  ZGEEV
350 #else
351 #define LAPACKtrtrs_ ztrtrs
352 #define LAPACKpotrf_ zpotrf
353 #define LAPACKpotrs_ zpotrs
354 #define BLASgemv_    zgemv
355 #define LAPACKgetrs_ zgetrs
356 #define BLAStrmv_    ztrmv
357 #define LAPACKtrsl_  ztrsl
358 #define BLASgemm_    zgemm
359 #define LAPACKgesvd_ zgesvd
360 #define LAPACKgeev_  zgeev
361 #endif
362 
363 #endif
364 
365 EXTERN_C_BEGIN
366 
367 /*
368    BLASdot cannot be used with COMPLEX because it cannot
369    handle returing a double complex to C++.
370 */
371 EXTERN PetscReal BLASdot_(PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*);
372 EXTERN PetscReal BLASnrm2_(PetscBLASInt*,PetscScalar*,PetscBLASInt*);
373 EXTERN PetscReal BLASasum_(PetscBLASInt*,PetscScalar*,PetscBLASInt*);
374 EXTERN void      BLASscal_(PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*);
375 EXTERN void      BLAScopy_(PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*);
376 EXTERN void      BLASswap_(PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*);
377 EXTERN void      BLASaxpy_(PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*);
378 EXTERN void      LAPACKgetrf_(PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*);
379 EXTERN void      LAPACKgetf2_(PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*);
380 EXTERN void      LAPACKgeqrf_(PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*);
381 
382 #if defined(PETSC_USES_CPTOFCD)
383 
384 #if defined(PETSC_USE_COMPLEX)
385 EXTERN void   ZORMQR(_fcd,_fcd,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*);
386 EXTERN void   ZTRTRS(_fcd,_fcd,_fcd,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*);
387 EXTERN void   ZPOTRF(_fcd,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*);
388 EXTERN void   ZGEMV(_fcd,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar *,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*);
389 EXTERN void   ZPOTRS(_fcd,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*);
390 EXTERN void   ZGETRS(_fcd,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*);
391 EXTERN void   ZGEMM(_fcd,_fcd,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*);
392 EXTERN void   ZGESVD(_fcd,_fcd,PetscBLASInt *,PetscBLASInt*,PetscScalar *,PetscBLASInt*,PetscReal*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt*);
393 EXTERN void   ZGEEV(_fcd,_fcd,PetscBLASInt *,PetscScalar *,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt*);
394 #else
395 EXTERN void   DORMQR(_fcd,_fcd,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*);
396 EXTERN void   DTRTRS(_fcd,_fcd,_fcd,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*);
397 EXTERN void   DPOTRF(_fcd,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*);
398 EXTERN void   DGEMV(_fcd,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar *,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*);
399 EXTERN void   DPOTRS(_fcd,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*);
400 EXTERN void   DGETRS(_fcd,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*);
401 EXTERN void   DGEMM(_fcd,_fcd,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*);
402 EXTERN void   DGESVD(_fcd,_fcd,PetscBLASInt *,PetscBLASInt*,PetscScalar *,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*);
403 EXTERN void   DGEEV(_fcd,_fcd,PetscBLASInt *,PetscScalar *,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*);
404 #endif
405 
406 #else
407 EXTERN void   LAPACKormqr_(const char*,const char*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*);
408 EXTERN void   LAPACKtrtrs_(const char*,const char*,const char*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*);
409 EXTERN void   LAPACKpotrf_(const char*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*);
410 EXTERN void   BLASgemv_(const char*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar *,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*);
411 EXTERN void   LAPACKpotrs_(const char*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*);
412 EXTERN void   LAPACKgetrs_(const char*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*);
413 EXTERN void   BLASgemm_(const char*,const char*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*);
414 
415 /* ESSL uses a different calling sequence for dgeev(), zgeev() than LAPACK; */
416 #if defined(PETSC_HAVE_ESSL) && defined(PETSC_USE_COMPLEX)
417 EXTERN void   LAPACKgeev_(PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscReal*,PetscBLASInt*);
418 EXTERN void   LAPACKgesvd_(const char*,const char*,PetscBLASInt *,PetscBLASInt*,PetscScalar *,PetscBLASInt*,PetscReal*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt*);
419 #elif defined(PETSC_HAVE_ESSL)
420 EXTERN void   LAPACKgeev_(PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*,PetscReal*,PetscBLASInt*);
421 EXTERN void   LAPACKgesvd_(const char*,const char*,PetscBLASInt *,PetscBLASInt*,PetscScalar *,PetscBLASInt*,PetscReal*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*);
422 #elif !defined(PETSC_USE_COMPLEX)
423 EXTERN void   LAPACKgeev_(const char*,const char*,PetscBLASInt *,PetscScalar *,PetscBLASInt*,PetscReal*,PetscReal*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*);
424 EXTERN void   LAPACKgesvd_(const char*,const char*,PetscBLASInt *,PetscBLASInt*,PetscScalar *,PetscBLASInt*,PetscReal*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*);
425 #else
426 EXTERN void   LAPACKgeev_(const char*,const char*,PetscBLASInt *,PetscScalar *,PetscBLASInt*,PetscScalar*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt*);
427 EXTERN void   LAPACKgesvd_(const char*,const char*,PetscBLASInt *,PetscBLASInt*,PetscScalar *,PetscBLASInt*,PetscReal*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscReal*,PetscBLASInt*);
428 #endif
429 #endif
430 
431 EXTERN_C_END
432 PETSC_EXTERN_CXX_END
433 #endif
434