Skip to content

Commit

Permalink
Add RANGE_ARRAY and MPI_Session types
Browse files Browse the repository at this point in the history
Signed-off-by: Jake Tronge <[email protected]>
  • Loading branch information
jtronge committed Apr 18, 2024
1 parent 5127029 commit cecbbe1
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions ompi/mpi/bindings/ompi_bindings/c_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,16 @@ def parameter(self, enable_count=False, **kwargs):
return f'const int {self.name}[]'


@Type.add_type('RANGE_ARRAY')
class TypeRangeArray(Type):

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

def parameter(self, enable_count=False, **kwargs):
return f'int {self.name}[][3]'


@Type.add_type('OFFSET')
class TypeOffset(Type):

Expand Down Expand Up @@ -944,3 +954,22 @@ def type_text(self, enable_count=False):
@property
def argument(self):
return f'(MPI_Group *) {self.name}'


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

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


@Type.add_type('SESSION', abi_type=['standard'])
class TypeSessionStandard(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, enable_count=False):
return self.mangle_name('MPI_Session')

0 comments on commit cecbbe1

Please sign in to comment.