Skip to content

Commit 6f85fd7

Browse files
hzhoudalcinl
andcommitted
datatype: complete cases in MPIR_Datatype_builtintype_alignment
Complete the switch cases in MPIR_Datatype_builtintype_alignment for all internal types. Co-Authored-by: Lisandro Dalcin <[email protected]>
1 parent e39ebe0 commit 6f85fd7

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/mpi/datatype/typeutil.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,27 +165,41 @@ int MPIR_Datatype_builtintype_alignment(MPI_Datatype type)
165165
case MPIR_INT8:
166166
case MPIR_UINT8:
167167
case MPIR_FLOAT8:
168+
case MPIR_COMPLEX8:
169+
case MPIR_FORTRAN_LOGICAL8:
168170
return ALIGNOF_INT8_T;
169171
case MPIR_FIXED16:
170172
case MPIR_INT16:
171173
case MPIR_UINT16:
172174
case MPIR_FLOAT16:
175+
case MPIR_COMPLEX16:
173176
case MPIR_BFLOAT16:
177+
case MPIR_FORTRAN_LOGICAL16:
174178
return ALIGNOF_INT16_T;
175179
case MPIR_FIXED32:
176180
case MPIR_INT32:
177181
case MPIR_UINT32:
182+
case MPIR_FORTRAN_LOGICAL32:
178183
return ALIGNOF_INT32_T;
179184
case MPIR_FIXED64:
180185
case MPIR_INT64:
181186
case MPIR_UINT64:
187+
case MPIR_FORTRAN_LOGICAL64:
182188
return ALIGNOF_INT64_T;
189+
case MPIR_FIXED128:
190+
case MPIR_INT128:
191+
case MPIR_UINT128:
192+
case MPIR_FORTRAN_LOGICAL128:
193+
return MAX_ALIGNMENT; /* ALIGNOF_INT128_T */
183194
case MPIR_FLOAT32:
184195
case MPIR_COMPLEX32:
185196
return ALIGNOF_FLOAT;
186197
case MPIR_FLOAT64:
187198
case MPIR_COMPLEX64:
188199
return ALIGNOF_DOUBLE;
200+
case MPIR_FLOAT128:
201+
case MPIR_COMPLEX128:
202+
return MAX_ALIGNMENT; /* ALIGNOF_FLOAT128_T */
189203
case MPIR_ALT_FLOAT96:
190204
case MPIR_ALT_FLOAT128:
191205
case MPIR_ALT_COMPLEX96:

0 commit comments

Comments
 (0)