1
1

Keep only the best [the fastest] version of the unpack function.

This commit was SVN r9772.
Этот коммит содержится в:
George Bosilca 2006-04-28 16:18:29 +00:00
родитель 5133c987e3
Коммит e23c3008a6
2 изменённых файлов: 14 добавлений и 21 удалений

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

@ -862,6 +862,20 @@ ompi_generic_simple_pack_function( ompi_convertor_t* pConvertor,
destination = iov[iov_count].iov_base;
iov_len_local = iov[iov_count].iov_len;
while( 1 ) {
while( pElem->elem.common.flags & DT_FLAG_DATA ) {
/* now here we have a basic datatype */
PACK_PREDEFINED_DATATYPE( pConvertor, pElem, count_desc,
source_base, destination, iov_len_local );
if( 0 == count_desc ) { /* completed */
source_base = pConvertor->pBaseBuf + pStack->disp;
pos_desc++; /* advance to the next data */
UPDATE_INTERNAL_COUNTERS( description, pos_desc, pElem, count_desc );
continue;
}
type = pElem->elem.common.type;
required_space = ompi_ddt_basicDatatypes[type]->size;
goto complete_loop;
}
if( DT_END_LOOP == pElem->elem.common.type ) { /* end of the current loop */
DO_DEBUG( opal_output( 0, "pack end_loop count %d stack_pos %d pos_desc %d disp %ld space %d\n",
pStack->count, pConvertor->stack_pos, pos_desc, pStack->disp, iov_len_local ); );
@ -911,19 +925,6 @@ ompi_generic_simple_pack_function( ompi_convertor_t* pConvertor,
DDT_DUMP_STACK( pConvertor->pStack, pConvertor->stack_pos, pElem, "advance loop" );
continue;
}
while( pElem->elem.common.flags & DT_FLAG_DATA ) {
/* now here we have a basic datatype */
PACK_PREDEFINED_DATATYPE( pConvertor, pElem, count_desc,
source_base, destination, iov_len_local );
if( 0 != count_desc ) { /* completed */
type = pElem->elem.common.type;
required_space = ompi_ddt_basicDatatypes[type]->size;
goto complete_loop;
}
source_base = pConvertor->pBaseBuf + pStack->disp;
pos_desc++; /* advance to the next data */
UPDATE_INTERNAL_COUNTERS( description, pos_desc, pElem, count_desc );
}
}
complete_loop:
iov[iov_count].iov_len -= iov_len_local; /* update the amount of valid data */

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

@ -72,14 +72,6 @@ ompi_unpack_general_checksum( ompi_convertor_t* pConvertor,
struct iovec* iov, uint32_t* out_size,
size_t* max_data, int32_t* freeAfter );
OMPI_DECLSPEC int32_t
ompi_unpack_homogeneous( ompi_convertor_t* pConv,
struct iovec* iov, uint32_t* out_size,
size_t* max_data, int32_t* freeAfter );
OMPI_DECLSPEC int32_t
ompi_unpack_homogeneous_checksum( ompi_convertor_t* pConv,
struct iovec* iov, uint32_t* out_size,
size_t* max_data, int32_t* freeAfter );
OMPI_DECLSPEC int32_t
ompi_unpack_homogeneous_contig( ompi_convertor_t* pConv,
struct iovec* iov, uint32_t* out_size,
size_t* max_data, int32_t* freeAfter );