@@ -36,7 +36,7 @@ extern int ompi_ts_copy(CFI_cdesc_t *cdesc, char *buffer);
3636 datatype = type; \
3737 if (x->rank != 0 && !CFI_is_contiguous(x)) { \
3838 rc = ompi_ts_create_datatype(x, count, type, &datatype); \
39- if (MPI_SUCCESS == rc) { \
39+ if (OPAL_LIKELY( MPI_SUCCESS == rc)) { \
4040 count = 1; \
4141 } \
4242 } else { \
@@ -50,7 +50,7 @@ extern int ompi_ts_copy(CFI_cdesc_t *cdesc, char *buffer);
5050 if (x->rank != 0 && !CFI_is_contiguous(x)) { \
5151 size_t size = ompi_ts_size(x); \
5252 buffer = malloc(size); \
53- if (NULL == buffer) { \
53+ if (OPAL_UNLIKELY( NULL == buffer)) { \
5454 rc = MPI_ERR_NO_MEM; \
5555 } else { \
5656 rc = MPI_SUCCESS; \
@@ -67,7 +67,7 @@ extern int ompi_ts_copy(CFI_cdesc_t *cdesc, char *buffer);
6767 if (x->rank != 0 && !CFI_is_contiguous(x)) { \
6868 size_t size = ompi_ts_size(x); \
6969 buffer = malloc(size); \
70- if (NULL == buffer) { \
70+ if (OPAL_UNLIKELY( NULL == buffer)) { \
7171 rc = MPI_ERR_NO_MEM; \
7272 } else { \
7373 rc = ompi_ts_copy(x, buffer); \
@@ -84,18 +84,18 @@ extern int ompi_ts_copy(CFI_cdesc_t *cdesc, char *buffer);
8484 free(buffer); \
8585 } \
8686 if (type != datatype) { \
87- rc = PMPI_Type_free(&datatype); \
87+ rc = PMPI_Type_free(&datatype); \
8888 } \
8989 } while (0)
9090
9191#define OMPI_C_2_CFI_COPY (x , buffer , count , type , datatype , rc ) \
9292 do { \
9393 if (buffer != x->base_addr) { \
94- rc = ompi_ts_copy_back(buffer, x); \
94+ rc = ompi_ts_copy_back(buffer, x); \
9595 free(buffer); \
9696 } \
9797 if (type != datatype) { \
98- rc = PMPI_Type_free(&datatype); \
98+ rc = PMPI_Type_free(&datatype); \
9999 } \
100100 } while (0)
101101
0 commit comments