1
1

Correctly compute the gaps inside the datatype. They depend on the shape of the

final datatype not on the shape of the added datatype. The gaps exist if the
extent of the final datatype is not equal to its size.

This commit was SVN r10867.
Этот коммит содержится в:
George Bosilca 2006-07-18 15:47:12 +00:00
родитель 8bec270f90
Коммит d34b51b8ec
2 изменённых файлов: 5 добавлений и 5 удалений

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

@ -59,7 +59,7 @@ OMPI_DECLSPEC extern ompi_pointer_array_t *ompi_datatype_f_to_c_table;
#define DT_FLAG_USER_LB 0x0010 /**< has a user defined LB */
#define DT_FLAG_USER_UB 0x0020 /**< has a user defined UB */
#define DT_FLAG_PREDEFINED 0x0040 /**< cannot be removed: initial and predefined datatypes */
#define DT_FLAG_NO_GAPS 0x0080 /**< we are inside a loop */
#define DT_FLAG_NO_GAPS 0x0080 /**< no gaps around the datatype */
#define DT_FLAG_DATA 0x0100 /**< data or control structure */
#define DT_FLAG_ONE_SIDED 0x0200 /**< datatype can be used for one sided operations */
#define DT_FLAG_UNAVAILABLE 0x0400 /**< datatypes unavailable on the build (OS or compiler dependant) */

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

@ -293,9 +293,9 @@ int32_t ompi_ddt_add( ompi_datatype_t* pdtBase, const ompi_datatype_t* pdtAdd,
}
/* Is the data still contiguous ?
* The only way for the data to be contiguous is to have the true extent equal to his size.
* In other words to avoid having internal gaps between elements. If any of the data are
* overlapping then this method will not work.
* The only way for the data to be contiguous is to have the true extent
* equal to his size. In other words to avoid having internal gaps between
* elements. If any of the data are overlapping then this method will not work.
*/
localFlags = pdtBase->flags & pdtAdd->flags;
UNSET_CONTIGUOUS_FLAG(pdtBase->flags);
@ -307,7 +307,7 @@ int32_t ompi_ddt_add( ompi_datatype_t* pdtBase, const ompi_datatype_t* pdtAdd,
* type have to match */
|| (count < 2)) ) { /* - if the count is bigger than 2 */
SET_CONTIGUOUS_FLAG(pdtBase->flags);
if( ((long)pdtAdd->size) == extent )
if( ((long)pdtBase->size) == (pdtBase->ub - pdtBase->lb) )
SET_NO_GAP_FLAG(pdtBase->flags);
}
}