Correct a bug on the CHECK_DDT macros. Now the datatype.h match what's expected by the mpi layer.
This commit was SVN r3022.
Этот коммит содержится в:
родитель
722e51aa2c
Коммит
950e46e086
@ -100,11 +100,11 @@ dt_desc_t* ompi_ddt_create( int expectedSize );
|
||||
int ompi_ddt_commit( dt_desc_t** );
|
||||
int ompi_ddt_destroy( dt_desc_t** );
|
||||
static inline int ompi_ddt_is_committed( ompi_datatype_t* type )
|
||||
{ return (type->flags & DT_FLAG_COMMITED); }
|
||||
{ return ((type->flags & DT_FLAG_COMMITED) == DT_FLAG_COMMITED); }
|
||||
static inline int ompi_ddt_is_overlapped( ompi_datatype_t* type )
|
||||
{ return (type->flags & DT_FLAG_OVERLAP); }
|
||||
{ return ((type->flags & DT_FLAG_OVERLAP) == DT_FLAG_OVERLAP); }
|
||||
static inline int ompi_ddt_is_acceptable_for_one_sided( ompi_datatype_t* type )
|
||||
{ return (type->flags & DT_FLAG_ONE_SIDED); }
|
||||
{ return ((type->flags & DT_FLAG_ONE_SIDED) == DT_FLAG_ONE_SIDED); }
|
||||
void ompi_ddt_dump( dt_desc_t* pData );
|
||||
/* data creation functions */
|
||||
int ompi_ddt_duplicate( dt_desc_t* oldType, dt_desc_t** newType );
|
||||
|
@ -24,28 +24,31 @@ extern bool ompi_mpi_param_check;
|
||||
* on the top level MPI functions, as they does not trigger the error handler. Is the user
|
||||
* responsability to do it.
|
||||
*/
|
||||
#define OMPI_CHECK_DATATYPE_FOR_SEND( RC, DDT, COUNT ) \
|
||||
do { \
|
||||
if( NULL == (DDT) || MPI_DATATYPE_NULL == (DDT) ) (RC) = MPI_ERR_TYPE; \
|
||||
else if( (COUNT) < 0 ) (RC) = MPI_ERR_COUNT; \
|
||||
else if( !ompi_ddt_is_committed((DDT)) ) (RC) = MPI_ERR_TYPE; \
|
||||
} while (0)
|
||||
#define OMPI_CHECK_DATATYPE_FOR_SEND( RC, DDT, COUNT ) \
|
||||
do { \
|
||||
(RC) = MPI_SUCCESS; \
|
||||
if( NULL == (DDT) || MPI_DATATYPE_NULL == (DDT) ) (RC) = MPI_ERR_TYPE; \
|
||||
else if( (COUNT) < 0 ) (RC) = MPI_ERR_COUNT; \
|
||||
else if( !ompi_ddt_is_committed((DDT)) ) (RC) = MPI_ERR_TYPE; \
|
||||
} while (0)
|
||||
|
||||
#define OMPI_CHECK_DATATYPE_FOR_RECV( RC, DDT, COUNT ) \
|
||||
do { \
|
||||
if( NULL == (DDT) || MPI_DATATYPE_NULL == (DDT) ) (RC) = MPI_ERR_TYPE; \
|
||||
else if( (COUNT) < 0 ) (RC) = MPI_ERR_COUNT; \
|
||||
else if( !ompi_ddt_is_committed((DDT)) ) (RC) = MPI_ERR_TYPE; \
|
||||
else if( ompi_ddt_is_overlapped((DDT)) ) (RC) = MPI_ERR_TYPE; \
|
||||
} while (0)
|
||||
do { \
|
||||
(RC) = MPI_SUCCESS; \
|
||||
if( NULL == (DDT) || MPI_DATATYPE_NULL == (DDT) ) (RC) = MPI_ERR_TYPE; \
|
||||
else if( (COUNT) < 0 ) (RC) = MPI_ERR_COUNT; \
|
||||
else if( !ompi_ddt_is_committed((DDT)) ) (RC) = MPI_ERR_TYPE; \
|
||||
else if( ompi_ddt_is_overlapped((DDT)) ) (RC) = MPI_ERR_TYPE; \
|
||||
} while (0)
|
||||
|
||||
#define OMPI_CHECK_DATATYPE_FOR_ONE_SIDED( RC, DDT, COUNT ) \
|
||||
do { \
|
||||
if( NULL == (DDT) || MPI_DATATYPE_NULL == (DDT) ) (RC) = MPI_ERR_TYPE; \
|
||||
else if( (COUNT) < 0 ) (RC) = MPI_ERR_COUNT; \
|
||||
else if( !ompi_ddt_is_committed((DDT)) ) (RC) = MPI_ERR_TYPE; \
|
||||
else if( ompi_ddt_is_overerlapped((DDT)) ) (RC) = MPI_ERR_TYPE; \
|
||||
else if( !ompi_ddt_is_acceptable_for_one_sided((DDT)) ) (RC) = MPI_ERR_TYPE; \
|
||||
} while(0)
|
||||
#define OMPI_CHECK_DATATYPE_FOR_ONE_SIDED( RC, DDT, COUNT ) \
|
||||
do { \
|
||||
(RC) = MPI_SUCCESS; \
|
||||
if( NULL == (DDT) || MPI_DATATYPE_NULL == (DDT) ) (RC) = MPI_ERR_TYPE; \
|
||||
else if( (COUNT) < 0 ) (RC) = MPI_ERR_COUNT; \
|
||||
else if( !ompi_ddt_is_committed((DDT)) ) (RC) = MPI_ERR_TYPE; \
|
||||
else if( ompi_ddt_is_overerlapped((DDT)) ) (RC) = MPI_ERR_TYPE; \
|
||||
else if( !ompi_ddt_is_acceptable_for_one_sided((DDT)) ) (RC) = MPI_ERR_TYPE; \
|
||||
} while(0)
|
||||
|
||||
#endif /* OMPI_C_BINDINGS_H */
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user