1
1

- Use the actual _count parameter passed through the macro

This commit was SVN r9189.
Этот коммит содержится в:
Rainer Keller 2006-03-02 20:23:07 +00:00
родитель 8bf6ed7a36
Коммит b8d1189091
2 изменённых файлов: 5 добавлений и 2 удалений

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

@ -39,9 +39,9 @@ static inline int IMIN( int a, int b ) { return ( a < b ? a : b ); }
#define OMPI_DDT_LB_UB_CONT( _count, _disp, _old_lb, _old_ub, _old_extent, _new_lb, _new_ub ) \
{ \
if( 0 == count ) { \
if( 0 == _count ) { \
_new_lb = (_old_lb) + (_disp); \
_new_ub = (_old_ub) + (_disp); \
_new_ub = (_old_ub) + (_disp); \
} else { \
long lower, upper; \
upper = (_disp) + (_old_extent) * ((_count) - 1); \

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

@ -43,6 +43,9 @@ int32_t ompi_ddt_duplicate( const ompi_datatype_t* oldType, ompi_datatype_t** ne
/* 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) );
/*
* Yes, the pdt->opt_desc.length is just the opt_desc.used of the old Type.
*/
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) );