We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3d2b84c commit 99e9992Copy full SHA for 99e9992
ompi/mpi/bindings/ompi_bindings/c_header.py
@@ -0,0 +1,20 @@
1
+import consts
2
+
3
+lines = []
4
5
+for value in consts.consts.values():
6
+ name = value["name"]
7
+ abi_value = value["abi_value"]
8
+ c_type = value["handle_types"]["c"]["type"]
9
+ if c_type is None:
10
+ continue
11
+ def_name = f"#define {name}"
12
+ if c_type == "int":
13
+ value = f"{abi_value}\n"
14
+ else:
15
+ value = f"(({c_type}) {abi_value})\n"
16
+ line = def_name + " " * (45 - len(def_name)) + value
17
+ lines.append(line)
18
19
+with open(consts.DIR / "mpi_abi.h", 'wt') as header:
20
+ header.writelines(lines)
0 commit comments