Eigenvalue SoLvers for Petaflop-Applications (ELPA)
2017.05.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_d, \
52
\
53
float*: \
54
elpa_eigenvectors_f, \
55
\
56
double complex*: \
57
elpa_eigenvectors_dc, \
58
\
59
float complex*: \
60
elpa_eigenvectors_fc \
61
)(handle, a, ev, q, error)
62
63
73
#define elpa_eigenvalues(handle, a, ev, error) _Generic((a), \
74
double*: \
75
elpa_eigenvalues_d, \
76
\
77
float*: \
78
elpa_eigenvalues_f, \
79
\
80
double complex*: \
81
elpa_eigenvalues_dc, \
82
\
83
float complex*: \
84
elpa_eigenvalues_fc \
85
)(handle, a, ev, error)
86
87
/* \brief generic C method for elpa_cholesky
88
*
89
* \details
90
* \param handle handle of the ELPA object, which defines the problem
91
* \param a float/double float complex/double complex pointer to matrix a, for which
92
* the cholesky factorizaion will be computed
93
* \param error on return the error code, which can be queried with elpa_strerr()
94
* \result void
95
*/
96
#define elpa_cholesky(handle, a, error) _Generic((a), \
97
double*: \
98
elpa_cholesky_d, \
99
\
100
float*: \
101
elpa_cholesky_f, \
102
\
103
double complex*: \
104
elpa_cholesky_dc, \
105
\
106
float complex*: \
107
elpa_cholesky_fc \
108
)(handle, a, error)
109
110
128
#define elpa_hermitian_multiply(handle, uplo_a, uplo_c, ncb, a, b, nrows_b, ncols_b, c, nrows_c, ncols_c, error) _Generic((a), \
129
double*: \
130
elpa_hermitian_multiply_d, \
131
\
132
float*: \
133
elpa_hermitian_multiply_f, \
134
\
135
double complex*: \
136
elpa_hermitian_multiply_dc, \
137
\
138
float complex*: \
139
elpa_hermitian_multiply_fc \
140
)(handle, a, error)
141
142
152
#define elpa_invert_triangular(handle, a, error) _Generic((a), \
153
double*: \
154
elpa_invert_trm_d, \
155
\
156
float*: \
157
elpa_invert_trm_f, \
158
\
159
double complex*: \
160
elpa_invert_trm_dc, \
161
\
162
float complex*: \
163
elpa_invert_trm_fc \
164
)(handle, a, error)
Generated by
1.8.13