1
1

The correct way to detect if a contiguous datatpe has gaps around (in the begining or at the

end) is to check the size and the extent (not the true extent).
If there are gaps we should adapt the source and the destination to match these gaps
(especially if the gaps are in the begining).

This commit was SVN r7060.
Этот коммит содержится в:
George Bosilca 2005-08-26 22:41:04 +00:00
родитель c9cdb36b0b
Коммит 0eabdd9498

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

@ -765,7 +765,12 @@ int32_t ompi_ddt_copy_content_same_ddt( const ompi_datatype_t* datatype, int32_t
*/
if( (datatype->flags & DT_FLAG_CONTIGUOUS) == DT_FLAG_CONTIGUOUS ) {
long extent = (datatype->ub - datatype->lb);
if( (long)datatype->size == (datatype->true_ub - datatype->true_lb) ) { /* all contiguous */
/* Now that we know the datatype is contiguous, we should move the 2 pointers
* source and destination to the correct displacement.
*/
pDestBuf += datatype->lb;
pSrcBuf += datatype->lb;
if( (long)datatype->size == extent ) { /* all contiguous == no gaps around */
int total_length = datatype->size * count;
lastLength = 128 * 1024;
if( lastLength > total_length ) lastLength = total_length;