1
1

When we duplicate a datatype we should copy the optimized version if the datatype

was commited.

This commit was SVN r4467.
Этот коммит содержится в:
George Bosilca 2005-02-18 22:57:23 +00:00
родитель dc3165f1ea
Коммит 6752128a3f

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

@ -28,6 +28,12 @@ int ompi_ddt_duplicate( const dt_desc_t* oldType, dt_desc_t** newType )
pdt->id = 0;
pdt->args = NULL;
/* TODO: if the data was commited update the opt_desc field */
if( 0 != oldType->opt_desc.used ) {
pdt->opt_desc.desc = malloc( oldType->opt_desc.used * sizeof(dt_elem_desc_t) );
pdt->opt_desc.length = oldType->opt_desc.used;
pdt->opt_desc.used = oldType->opt_desc.used;
memcpy( pdt->opt_desc.desc, oldType->opt_desc.desc, oldType->opt_desc.used * sizeof(dt_elem_desc_t) );
}
*newType = pdt;
return OMPI_SUCCESS;
}