@@ -118,14 +118,14 @@ int main(int argc, char *argv[])
118118 types [1 ] = & ompi_mpi_int .dt ;
119119 types [2 ] = & ompi_mpi_int .dt ;
120120 types [3 ] = & ompi_mpi_int .dt ;
121- ret = ompi_datatype_create_struct (4 , blen , disp , types , & struct_type );
121+ ret = ompi_datatype_create_struct (4 , OMPI_COUNT_ARRAY_CREATE ( blen ), OMPI_DISP_ARRAY_CREATE ( disp ) , types , & struct_type );
122122 if (ret != 0 )
123123 goto cleanup ;
124124
125125 {
126126 int count = 4 ;
127- const int * a_i [2 ] = {& count , blen };
128- ret = ompi_datatype_set_args (struct_type , count + 1 , a_i , count , disp , count , types ,
127+ const ompi_count_array_t a_i [2 ] = {OMPI_COUNT_ARRAY_CREATE ( & count ), OMPI_COUNT_ARRAY_CREATE ( blen ) };
128+ ret = ompi_datatype_set_args (struct_type , count + 1 , 0 , a_i , count , OMPI_DISP_ARRAY_CREATE ( disp ) , count , types ,
129129 MPI_COMBINER_STRUCT );
130130 if (ret != 0 )
131131 goto cleanup ;
@@ -190,9 +190,11 @@ int main(int argc, char *argv[])
190190 int count = 2 ;
191191 int blocklength = 1 ;
192192 int stride = 1 ;
193- const int * a_i [3 ] = {& count , & blocklength , & stride };
193+ const ompi_count_array_t a_i [3 ] = {OMPI_COUNT_ARRAY_CREATE (& count ),
194+ OMPI_COUNT_ARRAY_CREATE (& blocklength ),
195+ OMPI_COUNT_ARRAY_CREATE (& stride )};
194196 ompi_datatype_t * type = & ompi_mpi_int .dt ;
195- ret = ompi_datatype_set_args (vec_type , 3 , a_i , 0 , NULL , 1 , & type , MPI_COMBINER_VECTOR );
197+ ret = ompi_datatype_set_args (vec_type , 3 , 0 , a_i , 0 , OMPI_DISP_ARRAY_NULL , 1 , & type , MPI_COMBINER_VECTOR );
196198 if (ret != 0 )
197199 goto cleanup ;
198200 }
@@ -251,16 +253,18 @@ int main(int argc, char *argv[])
251253 blen [0 ] = 0 ;
252254 blen [1 ] = 20 * sizeof (double );
253255
254- ret = ompi_datatype_create_indexed_block (2 , 10 , blen , & ompi_mpi_double .dt , & newType );
256+ ret = ompi_datatype_create_indexed_block (2 , 10 , OMPI_COUNT_ARRAY_CREATE ( blen ) , & ompi_mpi_double .dt , & newType );
255257 if (ret != 0 )
256258 goto cleanup ;
257259
258260 {
259261 int count = 2 ;
260262 int blocklength = 10 ;
261- const int * a_i [3 ] = {& count , & blocklength , blen };
263+ const ompi_count_array_t a_i [3 ] = {OMPI_COUNT_ARRAY_CREATE (& count ),
264+ OMPI_COUNT_ARRAY_CREATE (& blocklength ),
265+ OMPI_COUNT_ARRAY_CREATE (blen )};
262266 ompi_datatype_t * oldtype = & ompi_mpi_double .dt ;
263- ompi_datatype_set_args (newType , 2 + count , a_i , 0 , NULL , 1 , & oldtype ,
267+ ompi_datatype_set_args (newType , 2 + count , 0 , a_i , 0 , OMPI_DISP_ARRAY_NULL , 1 , & oldtype ,
264268 MPI_COMBINER_INDEXED_BLOCK );
265269 if (ret != 0 )
266270 goto cleanup ;
@@ -322,15 +326,16 @@ int main(int argc, char *argv[])
322326 disp [0 ] = 0 ;
323327 disp [1 ] = 20 * sizeof (double );
324328
325- ret = ompi_datatype_create_hindexed (2 , blen , disp , & ompi_mpi_double .dt , & newType );
329+ ret = ompi_datatype_create_hindexed (2 , OMPI_COUNT_ARRAY_CREATE (blen ),
330+ OMPI_DISP_ARRAY_CREATE (disp ), & ompi_mpi_double .dt , & newType );
326331 if (ret != 0 )
327332 goto cleanup ;
328333
329334 {
330335 int count = 2 ;
331- const int * a_i [2 ] = {& count , blen };
336+ const ompi_count_array_t a_i [2 ] = {OMPI_COUNT_ARRAY_CREATE ( & count ), OMPI_COUNT_ARRAY_CREATE ( blen ) };
332337 ompi_datatype_t * oldtype = & ompi_mpi_double .dt ;
333- ret = ompi_datatype_set_args (newType , count + 1 , a_i , count , disp , 1 , & oldtype ,
338+ ret = ompi_datatype_set_args (newType , count + 1 , 0 , a_i , count , OMPI_DISP_ARRAY_CREATE ( disp ) , 1 , & oldtype ,
334339 MPI_COMBINER_HINDEXED );
335340 if (ret != 0 )
336341 goto cleanup ;
@@ -388,14 +393,14 @@ int main(int argc, char *argv[])
388393 disp [1 ] = 64 ;
389394 types [0 ] = & ompi_mpi_int .dt ;
390395 types [1 ] = newType ;
391- ret = ompi_datatype_create_struct (2 , blen , disp , types , & struct_type );
396+ ret = ompi_datatype_create_struct (2 , OMPI_COUNT_ARRAY_CREATE ( blen ), OMPI_DISP_ARRAY_CREATE ( disp ) , types , & struct_type );
392397 if (ret != 0 )
393398 goto cleanup ;
394399
395400 {
396401 int count = 2 ;
397- const int * a_i [2 ] = {& count , blen };
398- ret = ompi_datatype_set_args (struct_type , count + 1 , a_i , count , disp , count , types ,
402+ const ompi_count_array_t a_i [2 ] = {OMPI_COUNT_ARRAY_CREATE ( & count ), OMPI_COUNT_ARRAY_CREATE ( blen ) };
403+ ret = ompi_datatype_set_args (struct_type , count + 1 , 0 , a_i , count , OMPI_DISP_ARRAY_CREATE ( disp ) , count , types ,
399404 MPI_COMBINER_STRUCT );
400405 if (ret != 0 )
401406 goto cleanup ;
@@ -461,7 +466,7 @@ int main(int argc, char *argv[])
461466 if (ret != 0 )
462467 goto cleanup ;
463468 ompi_datatype_t * type = & ompi_mpi_int .dt ;
464- ret = ompi_datatype_set_args (dup_type , 0 , NULL , 0 , NULL , 1 , & type , MPI_COMBINER_DUP );
469+ ret = ompi_datatype_set_args (dup_type , 0 , 0 , NULL , 0 , OMPI_DISP_ARRAY_NULL , 1 , & type , MPI_COMBINER_DUP );
465470 if (ret != 0 )
466471 goto cleanup ;
467472 packed_ddt_len = ompi_datatype_pack_description_length (dup_type );
0 commit comments