-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgenerate-datatype-table.sh
executable file
·92 lines (91 loc) · 1.74 KB
/
generate-datatype-table.sh
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
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#!/bin/bash
let c=0
for t in \
MPI_DATATYPE_NULL \
MPI_CHAR \
MPI_SHORT \
MPI_INT \
MPI_LONG \
MPI_LONG_LONG_INT \
MPI_LONG_LONG \
MPI_SIGNED_CHAR \
MPI_UNSIGNED_CHAR \
MPI_UNSIGNED_SHORT \
MPI_UNSIGNED \
MPI_UNSIGNED_LONG \
MPI_UNSIGNED_LONG_LONG \
MPI_FLOAT \
MPI_DOUBLE \
MPI_LONG_DOUBLE \
MPI_WCHAR \
MPI_C_BOOL \
MPI_INT8_T \
MPI_INT16_T \
MPI_INT32_T \
MPI_INT64_T \
MPI_UINT8_T \
MPI_UINT16_T \
MPI_UINT32_T \
MPI_UINT64_T \
MPI_AINT \
MPI_COUNT \
MPI_OFFSET \
MPI_C_COMPLEX \
MPI_C_FLOAT_COMPLEX \
MPI_C_DOUBLE_COMPLEX \
MPI_C_LONG_DOUBLE_COMPLEX \
MPI_BYTE \
MPI_PACKED \
MPI_CXX_BOOL \
MPI_CXX_FLOAT_COMPLEX \
MPI_CXX_DOUBLE_COMPLEX \
MPI_CXX_LONG_DOUBLE_COMPLEX \
MPI_INTEGER \
MPI_REAL \
MPI_DOUBLE_PRECISION \
MPI_COMPLEX \
MPI_LOGICAL \
MPI_CHARACTER \
MPI_DOUBLE_COMPLEX \
MPI_INTEGER1 \
MPI_INTEGER2 \
MPI_INTEGER4 \
MPI_INTEGER8 \
MPI_INTEGER16 \
MPI_REAL2 \
MPI_REAL4 \
MPI_REAL8 \
MPI_REAL16 \
MPI_COMPLEX4 \
MPI_COMPLEX8 \
MPI_COMPLEX16 \
MPI_COMPLEX32 \
MPI_FLOAT_INT \
MPI_DOUBLE_INT \
MPI_LONG_INT \
MPI_2INT \
MPI_SHORT_INT \
MPI_LONG_DOUBLE_INT \
MPI_2REAL \
MPI_2DOUBLE_PRECISION \
MPI_2INTEGER \
MPI_LB \
MPI_UB \
; do
#echo "#define ${t} ((MPI_Datatype)${c})"
u=$(echo "$t" | sed "s/MPI/MUK/")
#echo "${t} ${u}"
# FORWARD
# echo "#ifdef ${t}
# else if (datatype.ip == (intptr_t)${u}) {
# return ${t};
# }
##endif"
# BACKWARD
echo "#ifdef ${t}
else if (datatype == ${t}) {
wrap.ip = (intptr_t)${u};
}
#endif"
let c++
done