elpa_generic.h 2.18 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
#pragma once

/**
 * \todo document elpa_set()
 */
#define elpa_set(e, name, value, error) _Generic((value), \
                int: \
                  elpa_set_integer, \
                \
                double: \
                  elpa_set_double \
        )(e, name, value, error)

14
15
16
17
18
19
20
21
22
23
24
25
/**
 * \todo document elpa_get()
 */
#define elpa_get(e, name, value, error) _Generic((value), \
                int*: \
                  elpa_get_integer, \
                \
                double*: \
                  elpa_get_double \
        )(e, name, value, error)


26
27
28
29
30
/**
 * \todo document elpa_solve()
 */
#define elpa_solve(handle, a, ev, q, error) _Generic((a), \
                double*: \
31
                  elpa_solve_d, \
32
33
                \
                float*: \
34
                  elpa_solve_f, \
35
36
                \
                double complex*: \
37
                  elpa_solve_dc, \
38
39
                \
                float complex*: \
40
                  elpa_solve_fc \
41
        )(handle, a, ev, q, error)
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78


/**
 * \todo document elpa_cholesky()
 */
#define elpa_cholesky(handle, a, error) _Generic((a), \
                double*: \
                  elpa_cholesky_d, \
                \
                float*: \
                  elpa_cholesky_f, \
                \
                double complex*: \
                  elpa_cholesky_dc, \
                \
                float complex*: \
                  elpa_cholesky_fc \
        )(handle, a, error)


/**
 * \todo document elpa_invert_triangular()
 */
#define elpa_invert_triangular(handle, a, error) _Generic((a), \
                double*: \
                  elpa_invert_trm_d, \
                \
                float*: \
                  elpa_invert_trm_f, \
                \
                double complex*: \
                  elpa_invert_trm_dc, \
                \
                float complex*: \
                  elpa_invert_trm_fc \
        )(handle, a, error)

79
80
81
82
83
84
85
86
87
88
/**
 * \todo document elpa_solve_tridi()
 */
#define elpa_solve_tridi(handle, d, e, q, error) _Generic((d), \
                double*: \
                  elpa_solve_tridi_d, \
                \
                float*: \
                  elpa_solve_tridi_f \
        )(handle, d, e, q, error)