1
1

If the convertor have the checksum flag don't try to be nice and optimize.

Just do it in a way that will allow the checksum computation in all the cases.

This commit was SVN r10336.
Этот коммит содержится в:
George Bosilca 2006-06-13 19:24:29 +00:00
родитель d077b73d0b
Коммит f648f0bb51
2 изменённых файлов: 9 добавлений и 4 удалений

Просмотреть файл

@ -180,7 +180,8 @@ int32_t ompi_convertor_pack( ompi_convertor_t* pConv,
{ {
OMPI_CONVERTOR_SET_STATUS_BEFORE_PACK_UNPACK( pConv, iov, out_size, max_data ); OMPI_CONVERTOR_SET_STATUS_BEFORE_PACK_UNPACK( pConv, iov, out_size, max_data );
if( (pConv->flags & DT_FLAG_BASIC) == DT_FLAG_BASIC) { if( ((pConv->flags & DT_FLAG_BASIC) == DT_FLAG_BASIC) &&
!(pConv->flags & CONVERTOR_WITH_CHECKSUM) ) {
/* We are doing conversion on a predefined contiguous datatype. The /* We are doing conversion on a predefined contiguous datatype. The
* convertor contain minimal informations, we only use the bConverted * convertor contain minimal informations, we only use the bConverted
* to manage the conversion. * to manage the conversion.
@ -230,8 +231,9 @@ inline int32_t ompi_convertor_unpack( ompi_convertor_t* pConv,
{ {
OMPI_CONVERTOR_SET_STATUS_BEFORE_PACK_UNPACK( pConv, iov, out_size, max_data ); OMPI_CONVERTOR_SET_STATUS_BEFORE_PACK_UNPACK( pConv, iov, out_size, max_data );
if( (pConv->flags & (DT_FLAG_BASIC | CONVERTOR_HOMOGENEOUS)) == if( ((pConv->flags & (DT_FLAG_BASIC | CONVERTOR_HOMOGENEOUS)) ==
(DT_FLAG_BASIC | CONVERTOR_HOMOGENEOUS) ) { (DT_FLAG_BASIC | CONVERTOR_HOMOGENEOUS)) &&
!(pConv->flags & CONVERTOR_WITH_CHECKSUM) ) {
/* We are doing conversion on a contiguous datatype on a homogeneous /* We are doing conversion on a contiguous datatype on a homogeneous
* environment. The convertor contain minimal informations, we only * environment. The convertor contain minimal informations, we only
* use the bConverted to manage the conversion. * use the bConverted to manage the conversion.
@ -422,7 +424,9 @@ int32_t ompi_convertor_set_position_nocheck( ompi_convertor_t* convertor,
} \ } \
assert( NULL != convertor->use_desc->desc ); \ assert( NULL != convertor->use_desc->desc ); \
/* For predefined datatypes (contiguous) do nothing more */ \ /* For predefined datatypes (contiguous) do nothing more */ \
/* if checksum is enabled the always continue */ \
if( ((convertor->flags & DT_FLAG_BASIC) == DT_FLAG_BASIC) && \ if( ((convertor->flags & DT_FLAG_BASIC) == DT_FLAG_BASIC) && \
!(convertor->flags & CONVERTOR_WITH_CHECKSUM) && \
((convertor->flags & CONVERTOR_SEND) || \ ((convertor->flags & CONVERTOR_SEND) || \
(convertor->flags & CONVERTOR_HOMOGENEOUS) ) ) { \ (convertor->flags & CONVERTOR_HOMOGENEOUS) ) ) { \
convertor->bConverted = 0; \ convertor->bConverted = 0; \

Просмотреть файл

@ -267,7 +267,8 @@ ompi_convertor_set_position( ompi_convertor_t* convertor,
convertor->flags &= ~CONVERTOR_COMPLETED; convertor->flags &= ~CONVERTOR_COMPLETED;
if( (convertor->flags & (DT_FLAG_PREDEFINED | CONVERTOR_HOMOGENEOUS)) == if( (convertor->flags & (DT_FLAG_PREDEFINED | CONVERTOR_HOMOGENEOUS)) ==
(DT_FLAG_PREDEFINED | CONVERTOR_HOMOGENEOUS) ) { (DT_FLAG_PREDEFINED | CONVERTOR_HOMOGENEOUS) &&
!(convertor->flags & CONVERTOR_WITH_CHECKSUM) ) {
/* basic predefined datatype (contiguous) */ /* basic predefined datatype (contiguous) */
convertor->bConverted = *position; convertor->bConverted = *position;
return OMPI_SUCCESS; return OMPI_SUCCESS;