Skip to content

Commit 06ef344

Browse files
author
Valentin Petrov
committed
coll/hcoll: extends dtypes support
Adds support for legacy MPI_UB/LB types (old apps may use it) as well as for BOOL/WCHAR. Signed-off-by: Valentin Petrov <[email protected]>
1 parent 3660ced commit 06ef344

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

ompi/mca/coll/hcoll/coll_hcoll_dtypes.h

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,16 @@ total 15 types
3636
static dte_data_representation_t* ompi_datatype_2_dte_data_rep[OMPI_DATATYPE_MAX_PREDEFINED] = {
3737
&DTE_ZERO, /*OPAL_DATATYPE_LOOP 0 */
3838
&DTE_ZERO, /*OPAL_DATATYPE_END_LOOP 1 */
39-
&DTE_ZERO, /*OPAL_DATATYPE_LB 2 */
40-
&DTE_ZERO, /*OPAL_DATATYPE_UB 3 */
39+
#if defined(DTE_LB)
40+
&DTE_LB, /*OPAL_DATATYPE_LB 2 */
41+
#else
42+
&DTE_ZERO,
43+
#endif
44+
#if defined(DTE_UB)
45+
&DTE_UB, /*OPAL_DATATYPE_UB 3 */
46+
#else
47+
&DTE_ZERO,
48+
#endif
4149
&DTE_BYTE, /*OPAL_DATATYPE_INT1 4 */
4250
&DTE_INT16, /*OPAL_DATATYPE_INT2 5 */
4351
&DTE_INT32, /*OPAL_DATATYPE_INT4 6 */
@@ -68,8 +76,16 @@ static dte_data_representation_t* ompi_datatype_2_dte_data_rep[OMPI_DATATYPE_MAX
6876
#else
6977
&DTE_ZERO,
7078
#endif
71-
&DTE_ZERO, /*OPAL_DATATYPE_BOOL 22 */
72-
&DTE_ZERO, /*OPAL_DATATYPE_WCHAR 23 */
79+
#if defined(DTE_BOOL)
80+
&DTE_BOOL, /*OPAL_DATATYPE_BOOL 22 */
81+
#else
82+
&DTE_ZERO,
83+
#endif
84+
#if defined(DTE_WCHAR)
85+
&DTE_WCHAR, /*OPAL_DATATYPE_WCHAR 23 */
86+
#else
87+
&DTE_ZERO,
88+
#endif
7389
&DTE_ZERO /*OPAL_DATATYPE_UNAVAILABLE 24 */
7490
};
7591

0 commit comments

Comments
 (0)