File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
ompi/mpi/bindings/ompi_bindings Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -64,8 +64,23 @@ def output_constant(const, use_enum):
6464 output .append (line )
6565
6666# ============================= Function Prototypes ============================
67+ # TODO: we need to add/fix/figure out the pympistandard's way for properly
68+ # defining callback functions
69+ def cb_declaration (proc_expression ):
70+ func_str = str (proc_expression ).replace (r"\ldots" , "..." )
71+ func_str_list = func_str .split ()
72+ func_name , arg_1 = func_str_list [2 ].split ("(" )
73+ return f"{ ' ' .join (func_str_list [:2 ])} ({ func_name } )({ arg_1 } { ' ' .join (func_str_list [3 :])} ;\n "
74+
6775std .use_api_version ()
6876
77+ output .append ("\n " )
78+ output .append ("/* Callback functions */\n " )
79+ for proc in std .CALLBACKS .values ():
80+ output .append (cb_declaration (proc .express .iso_c ))
81+ if proc .has_embiggenment ():
82+ output .append (cb_declaration (proc .express .embiggen .iso_c ))
83+
6984output .append ("\n " )
7085output .append ("/* MPI API */\n " )
7186for proc in std .all_iso_c_procedures ():
You can’t perform that action at this time.
0 commit comments