1
1

Detect when the convertor is done with the conversion in a more

generic way.

This commit was SVN r9756.
Этот коммит содержится в:
George Bosilca 2006-04-27 17:25:56 +00:00
родитель cabf703dad
Коммит 0fcae472aa
2 изменённых файлов: 9 добавлений и 4 удалений

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

@ -167,13 +167,16 @@ ompi_pack_general_function( ompi_convertor_t* pConvertor,
/* out of the loop: we have complete the data conversion or no more space
* in the buffer.
*/
if( pConvertor->pStack[0].count < 0 ) return 1; /* data succesfully converted */
if( pConvertor->local_size == pConvertor->bConverted ) {
pConvertor->flags |= CONVERTOR_COMPLETED;
return 1;
}
/* I complete an element, next step I should go to the next one */
PUSH_STACK( pStack, pConvertor->stack_pos, pos_desc, type, count_desc,
disp_desc, pos_desc );
return (pConvertor->bConverted == pConvertor->local_size);
return 0;
}
/* We suppose here that we work with an already optimized version of the data

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

@ -99,7 +99,6 @@ ompi_unpack_general_function( ompi_convertor_t* pConvertor,
if( DT_END_LOOP == pElems[pos_desc].elem.common.type ) { /* end of the current loop */
if( --(pStack->count) == 0 ) { /* end of loop */
if( pConvertor->stack_pos == 0 ) {
pConvertor->flags |= CONVERTOR_COMPLETED;
goto save_and_return; /* completed */
}
pConvertor->stack_pos--;
@ -162,7 +161,10 @@ ompi_unpack_general_function( ompi_convertor_t* pConvertor,
/* out of the loop: we have complete the data conversion or no more space
* in the buffer.
*/
if( pConvertor->flags & CONVERTOR_COMPLETED ) return 1; /* data succesfully converted */
if( pConvertor->remote_size == pConvertor->bConverted ) {
pConvertor->flags |= CONVERTOR_COMPLETED;
return 1; /* I'm done */
}
/* I complete an element, next step I should go to the next one */
PUSH_STACK( pStack, pConvertor->stack_pos, pos_desc, type,