Eigenvalue SoLvers for Petaflop-Applications (ELPA)
2021.11.001
elpa
elpa_generic.h
Go to the documentation of this file.
1
#pragma once
2
12
#define elpa_set(e, name, value, error) _Generic((value), \
13
int: \
14
elpa_set_integer, \
15
\
16
double: \
17
elpa_set_double \
18
)(e, name, value, error)
19
20
30
#define elpa_get(e, name, value, error) _Generic((value), \
31
int*: \
32
elpa_get_integer, \
33
\
34
double*: \
35
elpa_get_double \
36
)(e, name, value, error)
37
38
49
#define elpa_eigenvectors(handle, a, ev, q, error) _Generic((a), \
50
double*: \
51
elpa_eigenvectors_all_host_arrays_d, \
52
\
53
float*: \
54
elpa_eigenvectors_all_host_arrays_f, \
55
\
56
double complex*: \
57
elpa_eigenvectors_all_host_arrays_dc, \
58
\
59
float complex*: \
60
elpa_eigenvectors_all_host_arrays_fc \
61
)(handle, a, ev, q, error)
62
73
#define elpa_eigenvectors_double(handle, a, ev, q, error) _Generic((a), \
74
double*: \
75
elpa_eigenvectors_device_pointer_d \
76
)(handle, a, ev, q, error)
77
88
#define elpa_eigenvectors_float(handle, a, ev, q, error) _Generic((a), \
89
float*: \
90
elpa_eigenvectors_device_pointer_f \
91
)(handle, a, ev, q, error)
92
103
#define elpa_eigenvectors_double_complex(handle, a, ev, q, error) _Generic((a), \
104
double complex*: \
105
elpa_eigenvectors_device_pointer_dc \
106
)(handle, a, ev, q, error)
107
118
#define elpa_eigenvectors_float_complex(handle, a, ev, q, error) _Generic((a), \
119
float complex*: \
120
elpa_eigenvectors_device_pointer_fc \
121
)(handle, a, ev, q, error)
122
133
#define elpa_skew_eigenvectors(handle, a, ev, q, error) _Generic((a), \
134
double*: \
135
elpa_eigenvectors_all_host_arrays_d, \
136
\
137
float*: \
138
elpa_eigenvectors_all_host_arrays_f \
139
)(handle, a, ev, q, error)
140
151
#define elpa_skew_eigenvectors_double(handle, a, ev, q, error) _Generic((a), \
152
double*: \
153
elpa_eigenvectors_device_pointer_d \
154
)(handle, a, ev, q, error)
155
166
#define elpa_skew_eigenvectors_float(handle, a, ev, q, error) _Generic((a), \
167
float*: \
168
elpa_eigenvectors_device_pointer_f \
169
)(handle, a, ev, q, error)
170
183
#define elpa_generalized_eigenvectors(handle, a, b, ev, q, is_already_decomposed, error) _Generic((a), \
184
double*: \
185
elpa_generalized_eigenvectors_d, \
186
\
187
float*: \
188
elpa_generalized_eigenvectors_f, \
189
\
190
double complex*: \
191
elpa_generalized_eigenvectors_dc, \
192
\
193
float complex*: \
194
elpa_generalized_eigenvectors_fc \
195
)(handle, a, b, ev, q, is_already_decomposed, error)
196
197
207
#define elpa_eigenvalues(handle, a, ev, error) _Generic((a), \
208
double*: \
209
elpa_eigenvalues_all_host_arrays_d, \
210
\
211
float*: \
212
elpa_eigenvalues_all_host_arrays_f, \
213
\
214
double complex*: \
215
elpa_eigenvalues_all_host_arrays_dc, \
216
\
217
float complex*: \
218
elpa_eigenvalues_all_host_arrays_fc \
219
)(handle, a, ev, error)
220
230
#define elpa_eigenvalues_double(handle, a, ev, error) _Generic((a), \
231
double*: \
232
elpa_eigenvalues_device_pointer_d \
233
)(handle, a, ev, error)
234
244
#define elpa_eigenvalues_float(handle, a, ev, error) _Generic((a), \
245
float*: \
246
elpa_eigenvalues_device_pointer_f \
247
)(handle, a, ev, error)
248
258
#define elpa_eigenvalues_double_complex(handle, a, ev, error) _Generic((a), \
259
double complex*: \
260
elpa_eigenvalues_device_pointer_dc \
261
)(handle, a, ev, error)
262
272
#define elpa_eigenvalues_float_complex(handle, a, ev, error) _Generic((a), \
273
float complex*: \
274
elpa_eigenvalues_device_pointer_fc \
275
)(handle, a, ev, error)
276
286
#define elpa_skew_eigenvalues(handle, a, ev, error) _Generic((a), \
287
double*: \
288
elpa_eigenvalues_all_host_arrays_d, \
289
\
290
float*: \
291
elpa_eigenvalues_all_host_arrays_f, \
292
)(handle, a, ev, error)
293
303
#define elpa_skew_eigenvalues_double(handle, a, ev, error) _Generic((a), \
304
double*: \
305
elpa_eigenvalues_device_pointer_d \
306
)(handle, a, ev, error)
307
317
#define elpa_skew_eigenvalues_float(handle, a, ev, error) _Generic((a), \
318
float*: \
319
elpa_eigenvalues_device_pointer_f \
320
)(handle, a, ev, error)
321
322
323
/* \brief generic C method for elpa_cholesky
324
*
325
* \details
326
* \param handle handle of the ELPA object, which defines the problem
327
* \param a float/double float complex/double complex pointer to matrix a, for which
328
* the cholesky factorizaion will be computed
329
* \param error on return the error code, which can be queried with elpa_strerr()
330
* \result void
331
*/
332
#define elpa_cholesky(handle, a, error) _Generic((a), \
333
double*: \
334
elpa_cholesky_d, \
335
\
336
float*: \
337
elpa_cholesky_f, \
338
\
339
double complex*: \
340
elpa_cholesky_dc, \
341
\
342
float complex*: \
343
elpa_cholesky_fc \
344
)(handle, a, error)
345
346
364
#define elpa_hermitian_multiply(handle, uplo_a, uplo_c, ncb, a, b, nrows_b, ncols_b, c, nrows_c, ncols_c, error) _Generic((a), \
365
double*: \
366
elpa_hermitian_multiply_d, \
367
\
368
float*: \
369
elpa_hermitian_multiply_f, \
370
\
371
double complex*: \
372
elpa_hermitian_multiply_dc, \
373
\
374
float complex*: \
375
elpa_hermitian_multiply_fc \
376
)(handle, a, error)
377
378
388
#define elpa_invert_triangular(handle, a, error) _Generic((a), \
389
double*: \
390
elpa_invert_trm_d, \
391
\
392
float*: \
393
elpa_invert_trm_f, \
394
\
395
double complex*: \
396
elpa_invert_trm_dc, \
397
\
398
float complex*: \
399
elpa_invert_trm_fc \
400
)(handle, a, error)
Generated by
1.9.2