File tree 1 file changed +25
-0
lines changed
1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -234,6 +234,31 @@ int MPIR_Datatype_builtintype_alignment(MPI_Datatype type)
234
234
if (type == MPI_DATATYPE_NULL )
235
235
return 1 ;
236
236
237
+ /* FIXME: set these alignment in configure */
238
+ switch (type ) {
239
+ case MPIR_SIGNED_INT1 :
240
+ case MPIR_UNSIGNED_INT1 :
241
+ return ALIGNOF_INT8_T ;
242
+ case MPIR_SIGNED_INT2 :
243
+ case MPIR_UNSIGNED_INT2 :
244
+ return ALIGNOF_INT16_T ;
245
+ case MPIR_SIGNED_INT4 :
246
+ case MPIR_UNSIGNED_INT4 :
247
+ return ALIGNOF_INT32_T ;
248
+ case MPIR_SIGNED_INT8 :
249
+ case MPIR_UNSIGNED_INT8 :
250
+ return ALIGNOF_INT64_T ;
251
+ case MPIR_FLOAT4 :
252
+ return ALIGNOF_FLOAT ;
253
+ case MPIR_FLOAT8 :
254
+ return ALIGNOF_DOUBLE ;
255
+ case MPIR_FLOAT16 :
256
+ return ALIGNOF_LONG_DOUBLE ;
257
+ default :
258
+ /* handle error cases? */
259
+ return 1 ;
260
+ }
261
+
237
262
int size = MPIR_Datatype_get_basic_size (type );
238
263
239
264
if (type == MPI_CHAR || type == MPI_UNSIGNED_CHAR || type == MPI_SIGNED_CHAR ) {
You can’t perform that action at this time.
0 commit comments