1
1

Allow duplication of MPI_LB and MPI_UB. A very usefull feature :)

This commit was SVN r11496.
Этот коммит содержится в:
George Bosilca 2006-08-29 20:19:58 +00:00
родитель 3312aa4b0a
Коммит ee27c497f9

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

@ -42,9 +42,11 @@ int32_t ompi_ddt_duplicate( const ompi_datatype_t* oldType, ompi_datatype_t** ne
the top level (specifically, MPI_TYPE_DUP). */
pdt->d_keyhash = NULL;
/**
* Allow duplication of MPI_UB and MPI_LB.
*/
if( 0 != oldType->desc.used ) {
memcpy( pdt->desc.desc, oldType->desc.desc, sizeof(dt_elem_desc_t) * desc_length );
pdt->id = 0;
pdt->args = NULL;
/* TODO: if the data was commited update the opt_desc field */
if( 0 != oldType->opt_desc.used ) {
desc_length = pdt->opt_desc.used + 1;
@ -56,6 +58,9 @@ int32_t ompi_ddt_duplicate( const ompi_datatype_t* oldType, ompi_datatype_t** ne
pdt->opt_desc.used = oldType->opt_desc.used;
memcpy( pdt->opt_desc.desc, oldType->opt_desc.desc, desc_length * sizeof(dt_elem_desc_t) );
}
}
pdt->id = 0;
pdt->args = NULL;
*newType = pdt;
return OMPI_SUCCESS;
}