precision_macros.h 15.7 KB
Newer Older
Andreas Marek's avatar
Andreas Marek committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#if 0
!    Copyright 2016, P. Kus
!
!    This file is part of ELPA.
!
!    The ELPA library was originally created by the ELPA consortium,
!    consisting of the following organizations:
!
!    - Max Planck Computing and Data Facility (MPCDF), formerly known as
!      Rechenzentrum Garching der Max-Planck-Gesellschaft (RZG),
!    - Bergische Universität Wuppertal, Lehrstuhl für angewandte
!      Informatik,
!    - Technische Universität München, Lehrstuhl für Informatik mit
!      Schwerpunkt Wissenschaftliches Rechnen ,
!    - Fritz-Haber-Institut, Berlin, Abt. Theorie,
!    - Max-Plack-Institut für Mathematik in den Naturwissenschaften,
!      Leipzig, Abt. Komplexe Strukutren in Biologie und Kognition,
!      and
!    - IBM Deutschland GmbH
!
!    This particular source code file contains additions, changes and
!    enhancements authored by Intel Corporation which is not part of
!    the ELPA consortium.
!
!    More information can be found here:
!    http://elpa.mpcdf.mpg.de/
!
!    ELPA is free software: you can redistribute it and/or modify
!    it under the terms of the version 3 of the license of the
!    GNU Lesser General Public License as published by the Free
!    Software Foundation.
!
!    ELPA is distributed in the hope that it will be useful,
!    but WITHOUT ANY WARRANTY; without even the implied warranty of
!    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
!    GNU Lesser General Public License for more details.
!
!    You should have received a copy of the GNU Lesser General Public License
!    along with ELPA.  If not, see <http://www.gnu.org/licenses/>
!
!    ELPA reflects a substantial effort on the part of the original
!    ELPA consortium, and we ask you to respect the spirit of the
!    license that we chose: i.e., please contribute any changes you
!    may have back to the original ELPA library distribution, and keep
!    any derivatives of ELPA under the same license that we chose for
!    the original distribution, the GNU Lesser General Public License.
!
!
#endif

51
#ifdef REALCASE
52
#undef DOUBLE_PRECISION_REAL
53
#undef SINGLE_PRECSION_REAL
54
#undef  MATH_DATATYPE
55
#undef  BLAS_TRANS_OR_CONJ
Pavel Kus's avatar
Pavel Kus committed
56
57
#undef  BLAS_CHAR
#undef  BLAS_CHAR_AND_SY_OR_HE
58
#undef  PRECISION
Andreas Marek's avatar
Andreas Marek committed
59
#undef  SPECIAL_COMPLEX_DATATYPE
Pavel Kus's avatar
Pavel Kus committed
60
#undef  PRECISION_STR
61
#undef  REAL_DATATYPE
Andreas Marek's avatar
Andreas Marek committed
62
#undef  C_REAL_DATATYPE
Andreas Marek's avatar
Andreas Marek committed
63

64
65
66
67
68
#undef C_GEMM
#undef C_LACPY
#undef C_PLACPY
#undef C_PTRAN

69
#undef  PRECISION_TRTRI
Andreas Marek's avatar
Andreas Marek committed
70
71
#undef  PRECISION_POTRF
#undef  PRECISION_TRSM
72
73
74
75
76
77
78
79
#undef  PRECISION_GEMV
#undef  PRECISION_TRMV
#undef  PRECISION_GEMM
#undef  PRECISION_TRMM
#undef  PRECISION_HERK
#undef  PRECISION_SYRK
#undef  PRECISION_SYMV
#undef  PRECISION_SYMM
80
81
#undef  PRECISION_HEMV
#undef  PRECISION_HER2
82
83
84
85
86
87
88
89
90
91
#undef  PRECISION_SYR2
#undef  PRECISION_SYR2K
#undef  PRECISION_GEQRF
#undef  PRECISION_STEDC
#undef  PRECISION_STEQR
#undef  PRECISION_LAMRG
#undef  PRECISION_LAMCH
#undef  PRECISION_LAPY2
#undef  PRECISION_LAED4
#undef  PRECISION_LAED5
Pavel Kus's avatar
Pavel Kus committed
92
#undef  PRECISION_NRM2
Pavel Kus's avatar
Pavel Kus committed
93
#undef  PRECISION_LASET
Andreas Marek's avatar
Andreas Marek committed
94
95
96
97
#undef  PRECISION_SCAL
#undef  PRECISION_COPY
#undef  PRECISION_AXPY
#undef  PRECISION_GER
Andreas Marek's avatar
Andreas Marek committed
98
99
100
101
#undef  gpublas_PRECISION_GEMM
#undef  gpublas_PRECISION_TRMM
#undef  gpublas_PRECISION_GEMV
#undef  gpublas_PRECISION_SYMV
102
103
104
#undef  cublas_PRECISION_GEMM
#undef  cublas_PRECISION_TRMM
#undef  cublas_PRECISION_GEMV
Pavel Kus's avatar
Pavel Kus committed
105
#undef  cublas_PRECISION_SYMV
106
107
108
#undef  mkl_offload_PRECISION_GEMM
#undef  mkl_offload_PRECISION_GEMV
#undef  mkl_offload_PRECISION_TRMM
109
#undef  scal_PRECISION_GEMM
Pavel Kus's avatar
Pavel Kus committed
110
#undef  scal_PRECISION_NRM2
Pavel Kus's avatar
Pavel Kus committed
111
#undef  scal_PRECISION_LASET
112
#undef  scal_PRECISION_GEMR2D
113
#undef  PRECISION_SUFFIX
Pavel Kus's avatar
Pavel Kus committed
114
#undef  ELPA_IMPL_SUFFIX
Andreas Marek's avatar
Andreas Marek committed
115

Andreas Marek's avatar
Andreas Marek committed
116
117
118
#undef ELPA_PRECISION_SSMV
#undef ELPA_PRECISION_SSR2

119
#undef  MPI_REAL_PRECISION
120
#undef  MPI_MATH_DATATYPE_PRECISION
121
#undef  MPI_MATH_DATATYPE_PRECISION_C
122
#undef  MPI_MATH_DATATYPE_PRECISION_EXPL
123
#undef  C_DATATYPE_KIND
Andreas Marek's avatar
Andreas Marek committed
124

Andreas Marek's avatar
Andreas Marek committed
125

126
#if 0
Andreas Marek's avatar
Andreas Marek committed
127
/* General definitions needed in single and double case */
128
129
130
/* the if 0 bracket is just to make the IBM Fortran compiler happy */
#endif

131
#define  MATH_DATATYPE real
132
#define  BLAS_TRANS_OR_CONJ 'T'
133

134
#ifdef DOUBLE_PRECISION
135
#define DOUBLE_PRECISION_REAL
136
#define  PRECISION double
Pavel Kus's avatar
Pavel Kus committed
137
#define  PRECISION_STR 'double'
Andreas Marek's avatar
Andreas Marek committed
138
#define  PRECISION_SUFFIX "_double"
Pavel Kus's avatar
Pavel Kus committed
139
#define  ELPA_IMPL_SUFFIX d
140
#define  REAL_DATATYPE rk8
Andreas Marek's avatar
Andreas Marek committed
141
#define  C_REAL_DATATYPE c_double
Pavel Kus's avatar
Pavel Kus committed
142
143
#define  BLAS_CHAR D
#define BLAS_CHAR_AND_SY_OR_HE DSY
Andreas Marek's avatar
Andreas Marek committed
144
#define  SPECIAL_COMPLEX_DATATYPE ck8
145
146

#define  PRECISION_TRTRI DTRTRI
Andreas Marek's avatar
Andreas Marek committed
147
148
#define  PRECISION_POTRF DPOTRF
#define  PRECISION_TRSM DTRSM
149
150
151
152
153
154
155
156
#define  PRECISION_GEMV DGEMV
#define  PRECISION_TRMV DTRMV
#define  PRECISION_GEMM DGEMM
#define  PRECISION_TRMM DTRMM
#define  PRECISION_HERK DHERK
#define  PRECISION_SYRK DSYRK
#define  PRECISION_SYMV DSYMV
#define  PRECISION_SYMM DSYMM
157
158
#define  PRECISION_HEMV DHEMV
#define  PRECISION_HER2 DHER2
159
160
161
162
163
164
165
166
167
168
#define  PRECISION_SYR2 DSYR2
#define  PRECISION_SYR2K DSYR2K
#define  PRECISION_GEQRF DGEQRF
#define  PRECISION_STEDC DSTEDC
#define  PRECISION_STEQR DSTEQR
#define  PRECISION_LAMRG DLAMRG
#define  PRECISION_LAMCH DLAMCH
#define  PRECISION_LAPY2 DLAPY2
#define  PRECISION_LAED4 DLAED4
#define  PRECISION_LAED5 DLAED5
Pavel Kus's avatar
Pavel Kus committed
169
#define  PRECISION_NRM2 DNRM2
Pavel Kus's avatar
Pavel Kus committed
170
#define  PRECISION_LASET DLASET
Andreas Marek's avatar
Andreas Marek committed
171
172
173
174
#define  PRECISION_GER DGER
#define  PRECISION_SCAL DSCAL
#define  PRECISION_COPY DCOPY
#define  PRECISION_AXPY DAXPY
Andreas Marek's avatar
Andreas Marek committed
175
176
177
178
#define  gpublas_PRECISION_GEMM gpublas_DGEMM
#define  gpublas_PRECISION_TRMM gpublas_DTRMM
#define  gpublas_PRECISION_GEMV gpublas_DGEMV
#define  gpublas_PRECISION_SYMV gpublas_DSYMV
179
180
181
#define  cublas_PRECISION_GEMM cublas_DGEMM
#define  cublas_PRECISION_TRMM cublas_DTRMM
#define  cublas_PRECISION_GEMV cublas_DGEMV
Pavel Kus's avatar
Pavel Kus committed
182
#define  cublas_PRECISION_SYMV cublas_DSYMV
183
184
185
#define  mkl_offload_PRECISION_GEMM mkl_offload_DGEMM
#define  mkl_offload_PRECISION_GEMV mkl_offload_DGEMV
#define  mkl_offload_PRECISION_TRMM mkl_offload_DTRMM
186
#define  scal_PRECISION_GEMM PDGEMM
Pavel Kus's avatar
Pavel Kus committed
187
#define  scal_PRECISION_NRM2 PDNRM2
Pavel Kus's avatar
Pavel Kus committed
188
#define  scal_PRECISION_LASET PDLASET
189
#define  scal_PRECISION_GEMR2D PDGEMR2D
190
#define  MPI_REAL_PRECISION MPI_REAL8
191
#define  MPI_MATH_DATATYPE_PRECISION MPI_REAL8
192
#define  MPI_MATH_DATATYPE_PRECISION_C MPI_DOUBLE
193
#define  MPI_MATH_DATATYPE_PRECISION_EXPL MPI_REAL8
194
#define  C_DATATYPE_KIND c_double
195

Andreas Marek's avatar
Andreas Marek committed
196
197
198
#define ELPA_PRECISION_SSMV elpa_dssmv
#define ELPA_PRECISION_SSR2 elpa_dssr2

199
200
201
202
203
#define C_GEMM dgemm_
#define C_LACPY dlacpy_
#define C_PLACPY pdlacpy_
#define C_PTRAN pdtran_

204
#endif /* DOUBLE_PRECISION */
Andreas Marek's avatar
Andreas Marek committed
205

206
#ifdef SINGLE_PRECISION
207

208
209
#define SINGLE_PRECISION_REAL

210
#define  PRECISION single
Pavel Kus's avatar
Pavel Kus committed
211
#define  PRECISION_STR 'single'
Andreas Marek's avatar
Andreas Marek committed
212
#define  PRECISION_SUFFIX "_single"
Pavel Kus's avatar
Pavel Kus committed
213
#define  ELPA_IMPL_SUFFIX f
214
#define  REAL_DATATYPE rk4
Andreas Marek's avatar
Andreas Marek committed
215
#define  C_REAL_DATATYPE c_float
Pavel Kus's avatar
Pavel Kus committed
216
217
#define  BLAS_CHAR S
#define  BLAS_CHAR_AND_SY_OR_HE SSY
Andreas Marek's avatar
Andreas Marek committed
218
#define  SPECIAL_COMPLEX_DATATYPE ck4
Andreas Marek's avatar
Andreas Marek committed
219

220
#define  PRECISION_TRTRI STRTRI
Andreas Marek's avatar
Andreas Marek committed
221
222
#define  PRECISION_POTRF SPOTRF
#define  PRECISION_TRSM STRSM
223
224
225
226
227
228
229
230
#define  PRECISION_GEMV SGEMV
#define  PRECISION_TRMV STRMV
#define  PRECISION_GEMM SGEMM
#define  PRECISION_TRMM STRMM
#define  PRECISION_HERK SHERK
#define  PRECISION_SYRK SSYRK
#define  PRECISION_SYMV SSYMV
#define  PRECISION_SYMM SSYMM
231
232
#define  PRECISION_HEMV SHEMV
#define  PRECISION_HER2 SHER2
233
234
235
236
237
238
239
240
241
242
#define  PRECISION_SYR2 SSYR2
#define  PRECISION_SYR2K SSYR2K
#define  PRECISION_GEQRF SGEQRF
#define  PRECISION_STEDC SSTEDC
#define  PRECISION_STEQR SSTEQR
#define  PRECISION_LAMRG SLAMRG
#define  PRECISION_LAMCH SLAMCH
#define  PRECISION_LAPY2 SLAPY2
#define  PRECISION_LAED4 SLAED4
#define  PRECISION_LAED5 SLAED5
Pavel Kus's avatar
Pavel Kus committed
243
#define  PRECISION_NRM2 SNRM2
Pavel Kus's avatar
Pavel Kus committed
244
#define  PRECISION_LASET SLASET
Andreas Marek's avatar
Andreas Marek committed
245
#define  PRECISION_GER SGER
Andreas Marek's avatar
Andreas Marek committed
246
#define  PRECISION_SCAL SSCAL
Andreas Marek's avatar
Andreas Marek committed
247
248
#define  PRECISION_COPY SCOPY
#define  PRECISION_AXPY SAXPY
Andreas Marek's avatar
Andreas Marek committed
249
250
251
252
#define  gpublas_PRECISION_GEMM gpublas_SGEMM
#define  gpublas_PRECISION_TRMM gpublas_STRMM
#define  gpublas_PRECISION_GEMV gpublas_SGEMV
#define  gpublas_PRECISION_SYMV gpublas_SSYMV
253
254
255
#define  cublas_PRECISION_GEMM cublas_SGEMM
#define  cublas_PRECISION_TRMM cublas_STRMM
#define  cublas_PRECISION_GEMV cublas_SGEMV
Pavel Kus's avatar
Pavel Kus committed
256
#define  cublas_PRECISION_SYMV cublas_SSYMV
257
258
259
#define  mkl_offload_PRECISION_GEMM mkl_offload_SGEMM
#define  mkl_offload_PRECISION_GEMV mkl_offload_SGEMV
#define  mkl_offload_PRECISION_TRMM mkl_offload_STRMM
260
#define  scal_PRECISION_GEMM PSGEMM
Pavel Kus's avatar
Pavel Kus committed
261
#define  scal_PRECISION_NRM2 PSNRM2
Pavel Kus's avatar
Pavel Kus committed
262
#define  scal_PRECISION_LASET PSLASET
263
#define  scal_PRECISION_GEMR2D PSGEMR2D
264
#define  MPI_REAL_PRECISION MPI_REAL4
265
#define  MPI_MATH_DATATYPE_PRECISION MPI_REAL4
266
#define  MPI_MATH_DATATYPE_PRECISION_C MPI_FLOAT
267
#define  MPI_MATH_DATATYPE_PRECISION_EXPL MPI_REAL4
268
#define  C_DATATYPE_KIND c_float
269

Andreas Marek's avatar
Andreas Marek committed
270
271
272
#define ELPA_PRECISION_SSMV elpa_sssmv
#define ELPA_PRECISION_SSR2 elpa_sssr2

273
274
275
276
277
#define C_GEMM sgemm_
#define C_LACPY slacpy_
#define C_PLACPY pslacpy_
#define C_PTRAN pstran_

278
279
280
#endif /* SINGLE_PRECISION */

#endif /* REALCASE */
Andreas Marek's avatar
Andreas Marek committed
281

282
#ifdef COMPLEXCASE
283
284

#undef DOUBLE_PRECISION_COMPLEX
285
#undef SINGLE_PRECISION_COMPLEX
286
#undef  MATH_DATATYPE
287
#undef  BLAS_TRANS_OR_CONJ
Pavel Kus's avatar
Pavel Kus committed
288
289
#undef  BLAS_CHAR
#undef  BLAS_CHAR_AND_SY_OR_HE
290
#undef  PRECISION
291
#undef COMPLEX_DATATYPE
292
293

#if 0
294
/* in the complex case also sometime real valued variables are needed */
295
296
297
/* the if 0 bracket is just to make the IBM Fortran compiler happy */
#endif

298
#undef REAL_DATATYPE
Andreas Marek's avatar
Andreas Marek committed
299
#undef C_REAL_DATATYPE
300

301
302
303
304
305
#undef C_GEMM
#undef C_LACPY
#undef C_PLACPY
#undef C_PTRAN

306
#undef  PRECISION_TRTRI
Andreas Marek's avatar
Andreas Marek committed
307
308
#undef  PRECISION_POTRF
#undef  PRECISION_TRSM
Pavel Kus's avatar
Pavel Kus committed
309
#undef  PRECISION_STR
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
#undef  PRECISION_GEMV
#undef  PRECISION_TRMV
#undef  PRECISION_GEMM
#undef  PRECISION_TRMM
#undef  PRECISION_HERK
#undef  PRECISION_SYRK
#undef  PRECISION_SYMV
#undef  PRECISION_SYMM
#undef  PRECISION_HEMV
#undef  PRECISION_HER2
#undef  PRECISION_SYR2
#undef  PRECISION_SYR2K
#undef  PRECISION_GEQRF
#undef  PRECISION_STEDC
#undef  PRECISION_STEQR
#undef  PRECISION_LAMRG
#undef  PRECISION_LAMCH
#undef  PRECISION_LAPY2
#undef  PRECISION_LAED4
#undef  PRECISION_LAED5
Pavel Kus's avatar
Pavel Kus committed
330
#undef  PRECISION_DOTC
Pavel Kus's avatar
Pavel Kus committed
331
#undef  PRECISION_LASET
Andreas Marek's avatar
Andreas Marek committed
332
333
334
335
#undef  PRECISION_GER
#undef  PRECISION_SCAL
#undef  PRECISION_COPY
#undef  PRECISION_AXPY
Andreas Marek's avatar
Andreas Marek committed
336
337
338
339
#undef  gpublas_PRECISION_GEMM
#undef  gpublas_PRECISION_TRMM
#undef  gpublas_PRECISION_GEMV
#undef  gpublas_PRECISION_SYMV
340
341
342
#undef  cublas_PRECISION_GEMM
#undef  cublas_PRECISION_TRMM
#undef  cublas_PRECISION_GEMV
Pavel Kus's avatar
Pavel Kus committed
343
#undef  cublas_PRECISION_SYMV
344
345
346
#undef  mkl_offload_PRECISION_GEMM 
#undef  mkl_offload_PRECISION_GEMV 
#undef  mkl_offload_PRECISION_TRMM 
347
#undef  scal_PRECISION_GEMM
Pavel Kus's avatar
Pavel Kus committed
348
#undef  scal_PRECISION_DOTC
Pavel Kus's avatar
Pavel Kus committed
349
#undef  scal_PRECISION_LASET
350
#undef  scal_PRECISION_GEMR2D
351
#undef  PRECISION_SUFFIX
Pavel Kus's avatar
Pavel Kus committed
352
#undef  ELPA_IMPL_SUFFIX
353
#undef  MPI_COMPLEX_PRECISION
354
#undef  MPI_MATH_DATATYPE_PRECISION
355
#undef  MPI_MATH_DATATYPE_PRECISION_C
356
#undef  MPI_MATH_DATATYPE_PRECISION_EXPL
357
358
359
360
361
362
#undef  MPI_COMPLEX_EXPLICIT_PRECISION
#undef  MPI_REAL_PRECISION
#undef  KIND_PRECISION
#undef  PRECISION_CMPLX
#undef  PRECISION_IMAG
#undef  PRECISION_REAL
363
#undef  C_DATATYPE_KIND
364

Andreas Marek's avatar
Andreas Marek committed
365
366
#undef ELPA_PRECISION_SSMV
#undef ELPA_PRECISION_SSR2
Pavel Kus's avatar
Pavel Kus committed
367

Andreas Marek's avatar
Andreas Marek committed
368

369
#if 0
370
/* General definitions needed in single and double case */
371
372
373
/* the if 0 bracket is just to make the IBM Fortran compiler happy */
#endif

374
#define  MATH_DATATYPE complex
375
#define  BLAS_TRANS_OR_CONJ 'C'
376
#ifdef DOUBLE_PRECISION
377
378

#define DOUBLE_PRECISION_COMPLEX
379
#define  PRECISION double
Pavel Kus's avatar
Pavel Kus committed
380
#define  PRECISION_STR 'double'
Andreas Marek's avatar
Andreas Marek committed
381
#define  PRECISION_SUFFIX "_double"
Pavel Kus's avatar
Pavel Kus committed
382
#define  ELPA_IMPL_SUFFIX dc
383
#define COMPLEX_DATATYPE CK8
Pavel Kus's avatar
Pavel Kus committed
384
385
#define BLAS_CHAR Z
#define BLAS_CHAR_AND_SY_OR_HE ZHE
386
#define REAL_DATATYPE RK8
Andreas Marek's avatar
Andreas Marek committed
387
#define C_REAL_DATATYPE c_double
388

389
390
391
#define C_GEMM zgemm_
#define C_LACPY zlacpy_
#define C_PLACPY pzlacpy_
392
#define C_PTRAN pztranc_
393

394
#define  PRECISION_TRTRI ZTRTRI
Andreas Marek's avatar
Andreas Marek committed
395
396
#define  PRECISION_POTRF ZPOTRF
#define  PRECISION_TRSM ZTRSM
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
#define  PRECISION_GEMV ZGEMV
#define  PRECISION_TRMV ZTRMV
#define  PRECISION_GEMM ZGEMM
#define  PRECISION_TRMM ZTRMM
#define  PRECISION_HERK ZHERK
#define  PRECISION_SYRK ZSYRK
#define  PRECISION_SYMV ZSYMV
#define  PRECISION_SYMM ZSYMM
#define  PRECISION_HEMV ZHEMV
#define  PRECISION_HER2 ZHER2
#define  PRECISION_SYR2 ZSYR2
#define  PRECISION_SYR2K ZSYR2K
#define  PRECISION_GEQRF ZGEQRF
#define  PRECISION_STEDC ZSTEDC
#define  PRECISION_STEQR ZSTEQR
#define  PRECISION_LAMRG ZLAMRG
#define  PRECISION_LAMCH ZLAMCH
#define  PRECISION_LAPY2 ZLAPY2
#define  PRECISION_LAED4 ZLAED4
#define  PRECISION_LAED5 ZLAED5
Pavel Kus's avatar
Pavel Kus committed
417
#define  PRECISION_DOTC ZDOTC
Pavel Kus's avatar
Pavel Kus committed
418
#define  PRECISION_LASET ZLASET
Andreas Marek's avatar
Andreas Marek committed
419
420
421
422
#define  PRECISION_GER ZGER
#define  PRECISION_SCAL ZSCAL
#define  PRECISION_COPY ZCOPY
#define  PRECISION_AXPY ZAXPY
Andreas Marek's avatar
Andreas Marek committed
423
424
425
426
#define  gpublas_PRECISION_GEMM gpublas_ZGEMM
#define  gpublas_PRECISION_TRMM gpublas_ZTRMM
#define  gpublas_PRECISION_GEMV gpublas_ZGEMV
#define  gpublas_PRECISION_SYMV gpublas_ZSYMV
427
428
429
#define  cublas_PRECISION_GEMM cublas_ZGEMM
#define  cublas_PRECISION_TRMM cublas_ZTRMM
#define  cublas_PRECISION_GEMV cublas_ZGEMV
Pavel Kus's avatar
Pavel Kus committed
430
#define  cublas_PRECISION_SYMV cublas_ZSYMV
431
432
433
#define  mkl_offload_PRECISION_GEMM mkl_offload_ZGEMM
#define  mkl_offload_PRECISION_GEMV mkl_offload_ZGEMV
#define  mkl_offload_PRECISION_TRMM mkl_offload_ZTRMM
434
#define  scal_PRECISION_GEMM PZGEMM
Pavel Kus's avatar
Pavel Kus committed
435
#define  scal_PRECISION_DOTC PZDOTC
Pavel Kus's avatar
Pavel Kus committed
436
#define  scal_PRECISION_LASET PZLASET
437
#define  scal_PRECISION_GEMR2D PZGEMR2D
438
#define  MPI_COMPLEX_PRECISION MPI_DOUBLE_COMPLEX
439
#define  MPI_MATH_DATATYPE_PRECISION MPI_DOUBLE_COMPLEX
440
#define  MPI_MATH_DATATYPE_PRECISION_C MPI_DOUBLE_COMPLEX
441
#define  MPI_MATH_DATATYPE_PRECISION_EXPL MPI_COMPLEX16
442
443
444
445
446
447
#define  MPI_COMPLEX_EXPLICIT_PRECISION MPI_COMPLEX16
#define  MPI_REAL_PRECISION MPI_REAL8
#define  KIND_PRECISION rk8
#define  PRECISION_CMPLX DCMPLX
#define  PRECISION_IMAG DIMAG
#define  PRECISION_REAL DREAL
448
#define  C_DATATYPE_KIND c_double
449

Andreas Marek's avatar
Andreas Marek committed
450
451
452
#define ELPA_PRECISION_SSMV elpa_zssmv
#define ELPA_PRECISION_SSR2 elpa_zssr2

453
454
#endif /* DOUBLE PRECISION */

455
#ifdef SINGLE_PRECISION
456
#define SINGLE_PRECISION_COMPLEX
457
#define  PRECISION single
Pavel Kus's avatar
Pavel Kus committed
458
#define  PRECISION_STR 'single'
Andreas Marek's avatar
Andreas Marek committed
459
#define  PRECISION_SUFFIX "_single"
Pavel Kus's avatar
Pavel Kus committed
460
#define  ELPA_IMPL_SUFFIX fc
461
#define COMPLEX_DATATYPE CK4
Pavel Kus's avatar
Pavel Kus committed
462
463
#define BLAS_CHAR C
#define BLAS_CHAR_AND_SY_OR_HE CHE
464
#define REAL_DATATYPE RK4
Andreas Marek's avatar
Andreas Marek committed
465
#define C_REAL_DATATYPE c_float
466

467
468
469
#define C_GEMM cgemm_
#define C_LACPY clacpy_
#define C_PLACPY pclacpy_
470
#define C_PTRAN pctranc_
471

472
#define  PRECISION_TRTRI CTRTRI
Andreas Marek's avatar
Andreas Marek committed
473
474
#define  PRECISION_POTRF CPOTRF
#define  PRECISION_TRSM CTRSM
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
#define  PRECISION_GEMV CGEMV
#define  PRECISION_TRMV CTRMV
#define  PRECISION_GEMM CGEMM
#define  PRECISION_TRMM CTRMM
#define  PRECISION_HERK CHERK
#define  PRECISION_SYRK CSYRK
#define  PRECISION_SYMV CSYMV
#define  PRECISION_SYMM CSYMM
#define  PRECISION_HEMV CHEMV
#define  PRECISION_HER2 CHER2
#define  PRECISION_SYR2 CSYR2
#define  PRECISION_SYR2K CSYR2K
#define  PRECISION_GEQRF CGEQRF
#define  PRECISION_STEDC CSTEDC
#define  PRECISION_STEQR CSTEQR
#define  PRECISION_LAMRG CLAMRG
#define  PRECISION_LAMCH CLAMCH
#define  PRECISION_LAPY2 CLAPY2
#define  PRECISION_LAED4 CLAED4
#define  PRECISION_LAED5 CLAED5
Pavel Kus's avatar
Pavel Kus committed
495
#define  PRECISION_DOTC CDOTC
Pavel Kus's avatar
Pavel Kus committed
496
#define  PRECISION_LASET CLASET
Andreas Marek's avatar
Andreas Marek committed
497
498
499
500
#define  PRECISION_SCAL CSCAL
#define  PRECISION_COPY CCOPY
#define  PRECISION_AXPY CAXPY
#define  PRECISION_GER CGER
Andreas Marek's avatar
Andreas Marek committed
501
502
503
504
#define  gpublas_PRECISION_GEMM gpublas_CGEMM
#define  gpublas_PRECISION_TRMM gpublas_CTRMM
#define  gpublas_PRECISION_GEMV gpublas_CGEMV
#define  gpublas_PRECISION_SYMV gpublas_CSYMV
505
506
507
#define  cublas_PRECISION_GEMM cublas_CGEMM
#define  cublas_PRECISION_TRMM cublas_CTRMM
#define  cublas_PRECISION_GEMV cublas_CGEMV
Pavel Kus's avatar
Pavel Kus committed
508
#define  cublas_PRECISION_SYMV cublas_CSYMV
509
510
511
#define  mkl_offload_PRECISION_GEMM mkl_offload_CGEMM
#define  mkl_offload_PRECISION_GEMV mkl_offload_CGEMV
#define  mkl_offload_PRECISION_TRMM mkl_offload_CTRMM
512
#define  scal_PRECISION_GEMM PCGEMM
Pavel Kus's avatar
Pavel Kus committed
513
#define  scal_PRECISION_DOTC PCDOTC
Pavel Kus's avatar
Pavel Kus committed
514
#define  scal_PRECISION_LASET PCLASET
515
#define  scal_PRECISION_GEMR2D PCGEMR2D
516
#define  MPI_COMPLEX_PRECISION MPI_COMPLEX
517
#define  MPI_MATH_DATATYPE_PRECISION MPI_COMPLEX
518
#define  MPI_MATH_DATATYPE_PRECISION_C MPI_COMPLEX
519
#define  MPI_MATH_DATATYPE_PRECISION_EXPL MPI_COMPLEX8
520
521
522
523
524
525
#define  MPI_COMPLEX_EXPLICIT_PRECISION MPI_COMPLEX8
#define  MPI_REAL_PRECISION MPI_REAL4
#define  KIND_PRECISION rk4
#define  PRECISION_CMPLX CMPLX
#define  PRECISION_IMAG AIMAG
#define  PRECISION_REAL REAL
526
#define  C_DATATYPE_KIND c_float
527

Andreas Marek's avatar
Andreas Marek committed
528
529
530
#define ELPA_PRECISION_SSMV elpa_cssmv
#define ELPA_PRECISION_SSR2 elpa_cssr2

531
532
533
#endif /* SINGLE PRECISION */

#endif /* COMPLEXCASE */