1
1

That was a bad*bad typo. To compute the flags I have to use & not |.

In the case where the user want to roll-back a convertor we should first rewind the
convertor to the beginning and then move it to the requested position. Otherwise the
logic do roll-back a convertor in an optimized way is really difficult. BTW, in terms of
performances one would prefer to have 2 convertors and play with position inside, than
just having one and roll it back.

This commit was SVN r7378.
Этот коммит содержится в:
George Bosilca 2005-09-14 23:32:18 +00:00
родитель fdfd966aad
Коммит ec621c2145

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

@ -229,9 +229,14 @@ inline int32_t ompi_convertor_set_position( ompi_convertor_t* convertor, size_t*
convertor->bConverted = convertor->pDesc->size * convertor->count;
return OMPI_SUCCESS;
}
if( 0 == (*position) )
return ompi_convertor_create_stack_at_begining( convertor, ompi_ddt_local_sizes );
/*
* If we plan to rollback the convertor then first we have to set it
* at the beginning.
*/
if( (0 == (*position)) || ((*position) < convertor->bConverted) ) {
rc = ompi_convertor_create_stack_at_begining( convertor, ompi_ddt_local_sizes );
if( 0 == (*position) ) return rc;
}
if( convertor->flags & DT_FLAG_CONTIGUOUS ) {
rc = ompi_convertor_create_stack_with_pos_contig( convertor, (*position),
ompi_ddt_local_sizes );
@ -280,7 +285,7 @@ inline int ompi_convertor_prepare( ompi_convertor_t* convertor,
* part of the convertor flags to the default value.
*/
convertor->flags &= CONVERTOR_TYPE_MASK;
convertor->flags |= (CONVERTOR_DATATYPE_MASK | datatype->flags);
convertor->flags |= (CONVERTOR_DATATYPE_MASK & datatype->flags);
convertor->pDesc = (ompi_datatype_t*)datatype;
convertor->bConverted = 0;