From cf96404075cbf1383e0952764ec7218b88a2430e Mon Sep 17 00:00:00 2001 From: George Bosilca Date: Tue, 4 Nov 2008 16:52:06 +0000 Subject: [PATCH] All convertors with a zero length are considered as contiguous. This commit was SVN r19913. --- ompi/datatype/convertor.c | 3 ++- ompi/datatype/convertor.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ompi/datatype/convertor.c b/ompi/datatype/convertor.c index 32af45b8c0..802de3d415 100644 --- a/ompi/datatype/convertor.c +++ b/ompi/datatype/convertor.c @@ -46,6 +46,7 @@ static void ompi_convertor_construct( ompi_convertor_t* convertor ) convertor->stack_size = DT_STATIC_STACK_SIZE; convertor->partial_length = 0; convertor->remoteArch = ompi_mpi_local_arch; + convertor->flags = DT_FLAG_NO_GAPS | CONVERTOR_COMPLETED; } static void ompi_convertor_destruct( ompi_convertor_t* convertor ) @@ -464,7 +465,7 @@ int32_t ompi_convertor_set_position_nocheck( ompi_convertor_t* convertor, * will not do anything. \ */ \ if( OPAL_UNLIKELY((0 == count) || (0 == datatype->size)) ) { \ - convertor->flags |= CONVERTOR_COMPLETED; \ + convertor->flags |= DT_FLAG_NO_GAPS | CONVERTOR_COMPLETED; \ convertor->local_size = convertor->remote_size = 0; \ return OMPI_SUCCESS; \ } \ diff --git a/ompi/datatype/convertor.h b/ompi/datatype/convertor.h index 2d560d0c69..dc5f46abde 100644 --- a/ompi/datatype/convertor.h +++ b/ompi/datatype/convertor.h @@ -154,6 +154,7 @@ static inline int ompi_convertor_cleanup( ompi_convertor_t* convertor ) } convertor->pDesc = NULL; convertor->stack_pos = 0; + convertor->flags = DT_FLAG_NO_GAPS | CONVERTOR_COMPLETED; return OMPI_SUCCESS; } @@ -224,7 +225,7 @@ ompi_convertor_copy_and_prepare_for_send( const ompi_convertor_t* pSrcConv, ompi_convertor_t* convertor ) { convertor->remoteArch = pSrcConv->remoteArch; - convertor->flags = (pSrcConv->flags | flags); + convertor->flags = pSrcConv->flags | flags; convertor->master = pSrcConv->master; return ompi_convertor_prepare_for_send( convertor, datatype, count, pUserBuf );