Skip to content

Commit

Permalink
Fix Python argument order
Browse files Browse the repository at this point in the history
Signed-off-by: Jake Tronge <[email protected]>
  • Loading branch information
jtronge committed Jul 26, 2024
1 parent 50c0377 commit 1c2c6e3
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions ompi/mpi/bindings/ompi_bindings/c.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,17 @@ def __init__(self, prototypes, out, external=False):
signatures = []
for prototype in prototypes:
base_name = util.mpi_fn_name_from_base_fn_name(prototype.name)
signatures.append(prototype.signature(abi_type='standard', base_name,
signatures.append(prototype.signature(base_name, abi_type='standard',
mangle_name=mangle_name))
# Profiling prototype
signatures.append(prototype.signature(abi_type='standard', f'P{base_name}',
signatures.append(prototype.signature(f'P{base_name}', abi_type='standard',
mangle_name=mangle_name))
if prototype.need_bigcount:
signatures.append(prototype.signature(abi_type='standard', f'{base_name}_c',
signatures.append(prototype.signature(f'{base_name}_c', abi_type='standard',
enable_count=True,
mangle_name=mangle_name))
# Profiling prototype
signatures.append(prototype.signature(abi_type='standard', f'P{base_name}_c',
signatures.append(prototype.signature(f'P{base_name}_c', abi_type='standard',
enable_count=True,
mangle_name=mangle_name))
self.signatures = signatures
Expand Down Expand Up @@ -296,14 +296,14 @@ def ompi_abi(base_name, template, out):
"""Generate the OMPI ABI functions."""
template.print_header(out)
print_profiling_header(base_name, out)
out.dump(template.prototype.signature(abi_type='ompi', base_name))
out.dump(template.prototype.signature(base_name, abi_type='ompi'))
template.print_body(func_name=base_name, out=out)
# Check if we need to generate the bigcount interface
if template.prototype.need_bigcount:
out.dump('#if OMPI_BIGCOUNT')
base_name_c = f'{base_name}_c'
print_profiling_header(base_name_c, out)
out.dump(template.prototype.signature(abi_type='ompi', base_name_c, enable_count=True))
out.dump(template.prototype.signature(base_name_c, abi_type='ompi', enable_count=True))
template.print_body(func_name=base_name_c, out=out)
out.dump('#endif /* OMPI_BIGCOUNT */')

Expand All @@ -318,7 +318,7 @@ def standard_abi(base_name, template, out):

# Static internal function (add a random component to avoid conflicts)
internal_name = f'ompi_abi_{template.prototype.name}'
internal_sig = template.prototype.signature(abi_type='ompi', internal_name,
internal_sig = template.prototype.signature(internal_name, abi_type='ompi',
enable_count=True)
out.dump(consts.INLINE_ATTRS, internal_sig)
template.print_body(func_name=base_name, out=out)
Expand All @@ -329,7 +329,7 @@ def generate_function(prototype, fn_name, internal_fn, enable_count=False):

# Handle type conversions and arguments
params = [param.construct(abi_type='standard') for param in prototype.params]
out.dump(prototype.signature(abi_type='standard', fn_name, enable_count=enable_count))
out.dump(prototype.signature(fn_name, abi_type='standard', enable_count=enable_count))
out.dump('{')
lines = []
return_type = prototype.return_type.construct(abi_type='standard')
Expand Down

0 comments on commit 1c2c6e3

Please sign in to comment.