Skip to content

Commit e00da70

Browse files
committed
Add MPI_Datarep and MPI_Session functions
Signed-off-by: Jake Tronge <[email protected]>
1 parent cecbbe1 commit e00da70

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

ompi/mpi/bindings/ompi_bindings/c_type.py

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -878,6 +878,45 @@ class TypeGrequestCancelFunctionStandard(Type):
878878
pass
879879

880880

881+
@Type.add_type('DATAREP_CONVERSION_FUNCTION', abi_type=['ompi'])
882+
class TypeDatarepConversionFunction(Type):
883+
884+
def type_text(self, enable_count=False):
885+
return 'MPI_Datarep_conversion_function *'
886+
887+
888+
@Type.add_type('DATAREP_CONVERSION_FUNCTION', abi_type=['standard'])
889+
class TypeDatarepConversionFunctionStandard(Type):
890+
# TODO: This may require a special function to wrap the callback
891+
pass
892+
893+
894+
@Type.add_type('DATAREP_EXTENT_FUNCTION', abi_type=['ompi'])
895+
class TypeDatarepExtentFunction(Type):
896+
897+
def type_text(self, enable_count=False):
898+
return 'MPI_Datarep_extent_function *'
899+
900+
901+
@Type.add_type('DATAREP_EXTENT_FUNCTION', abi_type=['standard'])
902+
class TypeDatarepExtentFunctionStandard(Type):
903+
# TODO: This may require a special function to wrap the callback
904+
pass
905+
906+
907+
@Type.add_type('SESSION_ERRHANDLER_FUNCTION', abi_type=['ompi'])
908+
class TypeSessionErrhandlerFunction(Type):
909+
910+
def type_text(self, enable_count=False):
911+
return 'MPI_Session_errhandler_function *'
912+
913+
914+
@Type.add_type('SESSION_ERRHANDLER_FUNCTION', abi_type=['standard'])
915+
class TypeSessionErrhandlerFunctionStandard(Type):
916+
# TODO: This may require a special function to wrap the callback
917+
pass
918+
919+
881920
@Type.add_type('ERRHANDLER', abi_type=['ompi'])
882921
class TypeErrhandler(Type):
883922

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

958997

998+
@Type.add_type('SESSION_OUT', abi_type=['ompi'])
999+
class TypeSessionOut(Type):
1000+
1001+
def type_text(self, enable_count=False):
1002+
return 'MPI_Session *'
1003+
1004+
1005+
@Type.add_type('SESSION_OUT', abi_type=['standard'])
1006+
class TypeSessionOutStandard(Type):
1007+
1008+
# TODO: This will require some conversion code for the ABI
1009+
@property
1010+
def argument(self):
1011+
return f'(MPI_Session *) {self.name}'
1012+
1013+
def type_text(self):
1014+
type_name = self.mangle_name('MPI_Session')
1015+
return f'{type_name} *'
1016+
1017+
9591018
@Type.add_type('SESSION', abi_type=['ompi'])
9601019
class TypeSession(Type):
9611020

0 commit comments

Comments
 (0)