Skip to content

Commit

Permalink
Add MPI_Datarep and MPI_Session functions
Browse files Browse the repository at this point in the history
  • Loading branch information
jtronge committed Apr 22, 2024
1 parent cecbbe1 commit 66909b4
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions ompi/mpi/bindings/ompi_bindings/c_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -878,6 +878,45 @@ class TypeGrequestCancelFunctionStandard(Type):
pass


@Type.add_type('DATAREP_CONVERSION_FUNCTION', abi_type=['ompi'])
class TypeDatarepConversionFunction(Type):

def type_text(self, enable_count=False):
return 'MPI_Datarep_conversion_function *'


@Type.add_type('DATAREP_CONVERSION_FUNCTION', abi_type=['standard'])
class TypeDatarepConversionFunctionStandard(Type):
# TODO: This may require a special function to wrap the callback
pass


@Type.add_type('DATAREP_EXTENT_FUNCTION', abi_type=['ompi'])
class TypeDatarepExtentFunction(Type):

def type_text(self, enable_count=False):
return 'MPI_Datarep_extent_function *'


@Type.add_type('DATAREP_EXTENT_FUNCTION', abi_type=['standard'])
class TypeDatarepExtentFunctionStandard(Type):
# TODO: This may require a special function to wrap the callback
pass


@Type.add_type('SESSION_ERRHANDLER_FUNCTION', abi_type=['ompi'])
class TypeSessionErrhandlerFunction(Type):

def type_text(self, enable_count=False):
return 'MPI_Session_errhandler_function *'


@Type.add_type('SESSION_ERRHANDLER_FUNCTION', abi_type=['standard'])
class TypeSessionErrhandlerFunctionStandard(Type):
# TODO: This may require a special function to wrap the callback
pass


@Type.add_type('ERRHANDLER', abi_type=['ompi'])
class TypeErrhandler(Type):

Expand Down Expand Up @@ -956,6 +995,26 @@ def argument(self):
return f'(MPI_Group *) {self.name}'


@Type.add_type('SESSION_OUT', abi_type=['ompi'])
class TypeSessionOut(Type):

def type_text(self, enable_count=False):
return 'MPI_Session *'


@Type.add_type('SESSION_OUT', abi_type=['standard'])
class TypeSessionOutStandard(Type):

# TODO: This will require some conversion code for the ABI
@property
def argument(self):
return f'(MPI_Session *) {self.name}'

def type_text(self):
type_name = self.mangle_name('MPI_Session')
return f'{type_name} *'


@Type.add_type('SESSION', abi_type=['ompi'])
class TypeSession(Type):

Expand Down

0 comments on commit 66909b4

Please sign in to comment.