From 5133c987e3d6d89f0cabea5f4481c211446c147a Mon Sep 17 00:00:00 2001 From: George Bosilca Date: Fri, 28 Apr 2006 16:17:28 +0000 Subject: [PATCH] Move the code around to shorten the execution path for the most common data-types. This commit was SVN r9771. --- ompi/datatype/dt_copy.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ompi/datatype/dt_copy.c b/ompi/datatype/dt_copy.c index 24b124c5af..257e65428e 100644 --- a/ompi/datatype/dt_copy.c +++ b/ompi/datatype/dt_copy.c @@ -206,6 +206,13 @@ int32_t ompi_ddt_copy_content_same_ddt( const ompi_datatype_t* datatype, int32_t pElem = &(description[pos_desc]); while( 1 ) { + while( pElem->elem.common.flags & DT_FLAG_DATA ) { + /* now here we have a basic datatype */ + COPY_PREDEFINED_DATATYPE( pElem, datatype, source_base, count, count_desc, + source, destination, iov_len_local ); + pos_desc++; /* advance to the next data */ + UPDATE_INTERNAL_COUNTERS( description, pos_desc, pElem, count_desc ); + } if( DT_END_LOOP == pElem->elem.common.type ) { /* end of the current loop */ DO_DEBUG( opal_output( 0, "copy end_loop count %d stack_pos %d pos_desc %d disp %ld space %d\n", pStack->count, stack_pos, pos_desc, pStack->disp, iov_len_local ); ); @@ -251,12 +258,5 @@ int32_t ompi_ddt_copy_content_same_ddt( const ompi_datatype_t* datatype, int32_t DDT_DUMP_STACK( pStack, stack_pos, pElem, "advance loop" ); continue; } - while( pElem->elem.common.flags & DT_FLAG_DATA ) { - /* now here we have a basic datatype */ - COPY_PREDEFINED_DATATYPE( pElem, datatype, source_base, count, count_desc, - source, destination, iov_len_local ); - pos_desc++; /* advance to the next data */ - UPDATE_INTERNAL_COUNTERS( description, pos_desc, pElem, count_desc ); - } } }