Skip to content

Commit e80e431

Browse files
authored
Merge pull request #5703 from jsquyres/pr/v3.1.x/super-large-datatype-fix
v3.1.x: Allow OPAL DDT to receive size_t count argument.
2 parents 621a1cb + 50e6958 commit e80e431

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

ompi/datatype/ompi_datatype.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ OMPI_DECLSPEC int32_t ompi_datatype_destroy( ompi_datatype_t** type);
166166
* Datatype creation functions
167167
*/
168168
static inline int32_t
169-
ompi_datatype_add( ompi_datatype_t* pdtBase, const ompi_datatype_t* pdtAdd, uint32_t count,
169+
ompi_datatype_add( ompi_datatype_t* pdtBase, const ompi_datatype_t* pdtAdd, size_t count,
170170
ptrdiff_t disp, ptrdiff_t extent )
171171
{
172172
return opal_datatype_add( &pdtBase->super, &pdtAdd->super, count, disp, extent );

ompi/datatype/ompi_datatype_create_vector.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ int32_t ompi_datatype_create_vector( int count, int bLength, int stride,
4949

5050
pData = ompi_datatype_create( oldType->super.desc.used + 2 );
5151
if( (bLength == stride) || (1 >= count) ) { /* the elements are contiguous */
52-
ompi_datatype_add( pData, oldType, count * bLength, 0, extent );
52+
ompi_datatype_add( pData, oldType, (size_t)count * bLength, 0, extent );
5353
} else {
5454
if( 1 == bLength ) {
5555
ompi_datatype_add( pData, oldType, count, 0, extent * stride );

opal/datatype/opal_datatype.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ OPAL_DECLSPEC void opal_datatype_dump( const opal_datatype_t* pData );
230230
OPAL_DECLSPEC int32_t opal_datatype_clone( const opal_datatype_t * src_type, opal_datatype_t * dest_type );
231231
OPAL_DECLSPEC int32_t opal_datatype_create_contiguous( int count, const opal_datatype_t* oldType, opal_datatype_t** newType );
232232
OPAL_DECLSPEC int32_t opal_datatype_resize( opal_datatype_t* type, ptrdiff_t lb, ptrdiff_t extent );
233-
OPAL_DECLSPEC int32_t opal_datatype_add( opal_datatype_t* pdtBase, const opal_datatype_t* pdtAdd, uint32_t count,
233+
OPAL_DECLSPEC int32_t opal_datatype_add( opal_datatype_t* pdtBase, const opal_datatype_t* pdtAdd, size_t count,
234234
ptrdiff_t disp, ptrdiff_t extent );
235235

236236
static inline int32_t

opal/datatype/opal_datatype_add.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ static inline int IMAX( int a, int b ) { return ( a < b ? b : a ); }
103103
* set to ZERO if it's a empty datatype.
104104
*/
105105
int32_t opal_datatype_add( opal_datatype_t* pdtBase, const opal_datatype_t* pdtAdd,
106-
uint32_t count, ptrdiff_t disp, ptrdiff_t extent )
106+
size_t count, ptrdiff_t disp, ptrdiff_t extent )
107107
{
108108
uint32_t newLength, place_needed = 0, i;
109109
short localFlags = 0; /* no specific options yet */

0 commit comments

Comments
 (0)