Skip to content

Commit aed4873

Browse files
committed
add support for typeclass
Signed-off-by: Howard Pritchard <[email protected]>
1 parent 017ed80 commit aed4873

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

ompi/mpi/bindings/ompi_bindings/c_type.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3212,4 +3212,21 @@ def type_text(self, enable_count=False):
32123212
def argument(self):
32133213
return f'{self.name}'
32143214

3215+
@Type.add_type('TYPECLASS', abi_type=['ompi'])
3216+
class TypeClass(Type):
3217+
3218+
def type_text(self, enable_count=False):
3219+
return 'int'
3220+
3221+
@Type.add_type('TYPECLASS', abi_type=['standard'])
3222+
class TypeClassStandard(StandardABIType):
3223+
3224+
@property
3225+
def init_code(self):
3226+
return [f'int {self.tmpname} = {ConvertFuncs.TYPECLASS}({self.name});']
3227+
3228+
def type_text(self, enable_count=False):
3229+
return 'int'
3230+
3231+
32153232

ompi/mpi/c/type_match_size.c.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
1313
* Copyright (c) 2015 Research Organization for Information Science
1414
* and Technology (RIST). All rights reserved.
15-
* Copyright (c) 2024 Triad National Security, LLC. All rights
15+
* Copyright (c) 2024-2025 Triad National Security, LLC. All rights
1616
* reserved.
1717
* $COPYRIGHT$
1818
*
@@ -30,7 +30,7 @@
3030
#include "ompi/datatype/ompi_datatype.h"
3131
#include "ompi/datatype/ompi_datatype_internal.h"
3232

33-
PROTOTYPE ERROR_CLASS type_match_size(INT typeclass, INT size, DATATYPE_OUT type)
33+
PROTOTYPE ERROR_CLASS type_match_size(TYPECLASS typeclass, INT size, DATATYPE_OUT type)
3434
{
3535
if (MPI_PARAM_CHECK) {
3636
OMPI_ERR_INIT_FINALIZE(FUNC_NAME);

0 commit comments

Comments
 (0)