Skip to content

Commit cecbbe1

Browse files
committed
Add RANGE_ARRAY and MPI_Session types
Signed-off-by: Jake Tronge <[email protected]>
1 parent 5127029 commit cecbbe1

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

ompi/mpi/bindings/ompi_bindings/c_type.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,16 @@ def parameter(self, enable_count=False, **kwargs):
201201
return f'const int {self.name}[]'
202202

203203

204+
@Type.add_type('RANGE_ARRAY')
205+
class TypeRangeArray(Type):
206+
207+
def type_text(self, enable_count=False):
208+
return 'int *'
209+
210+
def parameter(self, enable_count=False, **kwargs):
211+
return f'int {self.name}[][3]'
212+
213+
204214
@Type.add_type('OFFSET')
205215
class TypeOffset(Type):
206216

@@ -944,3 +954,22 @@ def type_text(self, enable_count=False):
944954
@property
945955
def argument(self):
946956
return f'(MPI_Group *) {self.name}'
957+
958+
959+
@Type.add_type('SESSION', abi_type=['ompi'])
960+
class TypeSession(Type):
961+
962+
def type_text(self, enable_count=False):
963+
return 'MPI_Session'
964+
965+
966+
@Type.add_type('SESSION', abi_type=['standard'])
967+
class TypeSessionStandard(Type):
968+
969+
# TODO: This will require some conversion code for the ABI
970+
@property
971+
def argument(self):
972+
return f'(MPI_Session) {self.name}'
973+
974+
def type_text(self, enable_count=False):
975+
return self.mangle_name('MPI_Session')

0 commit comments

Comments
 (0)