1
1

Report back the correct position when the caller use ompi_convertor_set_position. That should

fix Tim's problems.

This commit was SVN r7353.
Этот коммит содержится в:
George Bosilca 2005-09-13 20:29:50 +00:00
родитель ad0c0cdc03
Коммит a5871ffc23
2 изменённых файлов: 17 добавлений и 10 удалений

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

@ -214,6 +214,8 @@ extern int ompi_convertor_create_stack_with_pos_general( ompi_convertor_t* pConv
inline int32_t ompi_convertor_set_position( ompi_convertor_t* convertor, size_t* position )
{
int32_t rc;
/*
* If the convertor is already at the correct position we are happy
*/
@ -224,16 +226,21 @@ inline int32_t ompi_convertor_set_position( ompi_convertor_t* convertor, size_t*
*/
if( (convertor->pDesc->size * convertor->count) <= *position ) {
convertor->flags |= CONVERTOR_COMPLETED;
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( convertor->flags & DT_FLAG_CONTIGUOUS )
return ompi_convertor_create_stack_with_pos_contig( convertor, (*position),
ompi_ddt_local_sizes );
return ompi_convertor_create_stack_with_pos_general( convertor, (*position),
ompi_ddt_local_sizes );
if( convertor->flags & DT_FLAG_CONTIGUOUS ) {
rc = ompi_convertor_create_stack_with_pos_contig( convertor, (*position),
ompi_ddt_local_sizes );
} else {
rc = ompi_convertor_create_stack_with_pos_general( convertor, (*position),
ompi_ddt_local_sizes );
}
*position = convertor->bConverted;
return rc;
}
int32_t

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

@ -141,8 +141,8 @@ int ompi_convertor_create_stack_with_pos_general( ompi_convertor_t* pConvertor,
pos_desc -= (end_loop->items - 1); /* go back to the first element in the loop */
pElems -= (end_loop->items - 1);
remoteLength[pConvertor->stack_pos] = 0;
loop_length = 0;
continue;
loop_length = 0;
continue;
}
/* Not in this loop. Cleanup the stack and advance to the
* next data description.
@ -174,8 +174,8 @@ int ompi_convertor_create_stack_with_pos_general( ompi_convertor_t* pConvertor,
loop_length += (cnt * basic_type->size);
resting_place -= (cnt * basic_type->size);
PUSH_STACK( pStack, pConvertor->stack_pos, pos_desc, pElems->elem.common.type,
pElems->elem.count - cnt,
pStack->disp + pElems->elem.disp + cnt * pElems->elem.extent,
pElems->elem.count - cnt,
pStack->disp + pElems->elem.disp + cnt * pElems->elem.extent,
pos_desc );
pConvertor->bConverted = starting_point - resting_place;
DDT_DUMP_STACK( pConvertor->pStack, pConvertor->stack_pos,