15
15
* reserved.
16
16
* Copyright (c) 2015-2016 Research Organization for Information Science
17
17
* and Technology (RIST). All rights reserved.
18
+ * Copyright (c) 2025 Triad National Security, LLC. All rights reserved.
18
19
* $COPYRIGHT$
19
20
*
20
21
* Additional copyrights may follow
29
30
#include "ompi/datatype/ompi_datatype.h"
30
31
#include "opal/datatype/opal_convertor.h"
31
32
32
- int ompi_datatype_pack_external (const char datarep [], const void * inbuf , int incount ,
33
+ int ompi_datatype_pack_external (const char datarep [], const void * inbuf , size_t incount ,
33
34
ompi_datatype_t * datatype , void * outbuf ,
34
35
MPI_Aint outsize , MPI_Aint * position )
35
36
{
@@ -73,7 +74,7 @@ int ompi_datatype_pack_external(const char datarep[], const void *inbuf, int inc
73
74
}
74
75
75
76
int ompi_datatype_unpack_external (const char datarep [], const void * inbuf , MPI_Aint insize ,
76
- MPI_Aint * position , void * outbuf , int outcount ,
77
+ MPI_Aint * position , void * outbuf , size_t outcount ,
77
78
ompi_datatype_t * datatype )
78
79
{
79
80
int rc = MPI_SUCCESS ;
@@ -92,7 +93,7 @@ int ompi_datatype_unpack_external (const char datarep[], const void *inbuf, MPI_
92
93
93
94
/* Check for truncation */
94
95
opal_convertor_get_packed_size ( & local_convertor , & size );
95
- if ( (* position + size ) > ( unsigned int ) insize ) {
96
+ if ( (* position + ( MPI_Aint ) size ) > insize ) {
96
97
OBJ_DESTRUCT ( & local_convertor );
97
98
return MPI_ERR_TRUNCATE ;
98
99
}
@@ -112,7 +113,7 @@ int ompi_datatype_unpack_external (const char datarep[], const void *inbuf, MPI_
112
113
return (rc == 1 ) ? OMPI_SUCCESS : MPI_ERR_UNKNOWN ;
113
114
}
114
115
115
- int ompi_datatype_pack_external_size (const char datarep [], int incount ,
116
+ int ompi_datatype_pack_external_size (const char datarep [], size_t incount ,
116
117
ompi_datatype_t * datatype , MPI_Aint * size )
117
118
{
118
119
opal_convertor_t local_convertor ;
0 commit comments