Cast to the uint64_t before playing with the << operator in order to make sure we keep
all usefull informations. This commit was SVN r11986.
Этот коммит содержится в:
родитель
9e4b64ce81
Коммит
bf1d4ee259
@ -167,7 +167,7 @@ ompi_convertor_find_or_create_master( uint32_t remote_arch )
|
|||||||
if( remote_sizes[i] > 2 )
|
if( remote_sizes[i] > 2 )
|
||||||
hetero_mask |= (((uint64_t)1) << i);
|
hetero_mask |= (((uint64_t)1) << i);
|
||||||
}
|
}
|
||||||
hetero_mask &= ~((1 << DT_LOGIC) | (1 << DT_CXX_BOOL));
|
hetero_mask &= ~((((uint64_t)1) << DT_LOGIC) | (((uint64_t)1) << DT_CXX_BOOL));
|
||||||
master->hetero_mask |= hetero_mask;
|
master->hetero_mask |= hetero_mask;
|
||||||
}
|
}
|
||||||
master->pFunctions = malloc( sizeof(ompi_ddt_heterogeneous_copy_functions) );
|
master->pFunctions = malloc( sizeof(ompi_ddt_heterogeneous_copy_functions) );
|
||||||
|
@ -90,7 +90,7 @@ int32_t ompi_ddt_add( ompi_datatype_t* pdtBase, const ompi_datatype_t* pdtAdd,
|
|||||||
if( pdtAdd->flags & DT_FLAG_PREDEFINED ) { /* add a basic datatype */
|
if( pdtAdd->flags & DT_FLAG_PREDEFINED ) { /* add a basic datatype */
|
||||||
/* handle special cases for DT_LB and DT_UB */
|
/* handle special cases for DT_LB and DT_UB */
|
||||||
if( pdtAdd == ompi_ddt_basicDatatypes[DT_LB] ) {
|
if( pdtAdd == ompi_ddt_basicDatatypes[DT_LB] ) {
|
||||||
pdtBase->bdt_used |= (1<< DT_LB);
|
pdtBase->bdt_used |= (((uint64_t)1) << DT_LB);
|
||||||
if( pdtBase->flags & DT_FLAG_USER_LB ) {
|
if( pdtBase->flags & DT_FLAG_USER_LB ) {
|
||||||
pdtBase->lb = LMIN( pdtBase->lb, disp );
|
pdtBase->lb = LMIN( pdtBase->lb, disp );
|
||||||
} else {
|
} else {
|
||||||
@ -102,7 +102,7 @@ int32_t ompi_ddt_add( ompi_datatype_t* pdtBase, const ompi_datatype_t* pdtAdd,
|
|||||||
}
|
}
|
||||||
return OMPI_SUCCESS;
|
return OMPI_SUCCESS;
|
||||||
} else if( pdtAdd == ompi_ddt_basicDatatypes[DT_UB] ) {
|
} else if( pdtAdd == ompi_ddt_basicDatatypes[DT_UB] ) {
|
||||||
pdtBase->bdt_used |= (1<< DT_UB);
|
pdtBase->bdt_used |= (((uint64_t)1) << DT_UB);
|
||||||
if( pdtBase->flags & DT_FLAG_USER_UB ) {
|
if( pdtBase->flags & DT_FLAG_USER_UB ) {
|
||||||
pdtBase->ub = LMAX( pdtBase->ub, disp );
|
pdtBase->ub = LMAX( pdtBase->ub, disp );
|
||||||
} else {
|
} else {
|
||||||
|
@ -50,17 +50,17 @@ int ompi_ddt_dfd = -1;
|
|||||||
#define INIT_BASIC_TYPE( TYPE, NAME ) \
|
#define INIT_BASIC_TYPE( TYPE, NAME ) \
|
||||||
{ BASEOBJ_DATA, 0/*size*/, 0 /*align*/, 0/*true_lb*/, 0/*true_ub*/, \
|
{ BASEOBJ_DATA, 0/*size*/, 0 /*align*/, 0/*true_lb*/, 0/*true_ub*/, \
|
||||||
0/*lb*/, 0/*ub*/, DT_FLAG_PREDEFINED, TYPE, 1, \
|
0/*lb*/, 0/*ub*/, DT_FLAG_PREDEFINED, TYPE, 1, \
|
||||||
(((unsigned long long)1)<<(TYPE)), EMPTY_DATA(NAME) }
|
(((uint64_t)1)<<(TYPE)), EMPTY_DATA(NAME) }
|
||||||
|
|
||||||
#define INIT_BASIC_DATA( TYPE, ALIGN, NAME, FLAGS ) \
|
#define INIT_BASIC_DATA( TYPE, ALIGN, NAME, FLAGS ) \
|
||||||
{ BASEOBJ_DATA, sizeof(TYPE), ALIGN, 0, sizeof(TYPE), \
|
{ BASEOBJ_DATA, sizeof(TYPE), ALIGN, 0, sizeof(TYPE), \
|
||||||
0, sizeof(TYPE), DT_FLAG_BASIC | (FLAGS), \
|
0, sizeof(TYPE), DT_FLAG_BASIC | (FLAGS), \
|
||||||
DT_##NAME, 1, (((unsigned long long)1)<<(DT_##NAME)), EMPTY_DATA(NAME) }
|
DT_##NAME, 1, (((uint64_t)1)<<(DT_##NAME)), EMPTY_DATA(NAME) }
|
||||||
|
|
||||||
#define INIT_BASIC_DATA_WITH_NAME( TYPE, ALIGN, INTERNAL_NAME, NAME, FLAGS ) \
|
#define INIT_BASIC_DATA_WITH_NAME( TYPE, ALIGN, INTERNAL_NAME, NAME, FLAGS ) \
|
||||||
{ BASEOBJ_DATA, sizeof(TYPE), ALIGN, 0, sizeof(TYPE), \
|
{ BASEOBJ_DATA, sizeof(TYPE), ALIGN, 0, sizeof(TYPE), \
|
||||||
0, sizeof(TYPE), DT_FLAG_BASIC | (FLAGS), \
|
0, sizeof(TYPE), DT_FLAG_BASIC | (FLAGS), \
|
||||||
DT_##INTERNAL_NAME, 1, (((unsigned long long)1)<<(DT_##INTERNAL_NAME)),\
|
DT_##INTERNAL_NAME, 1, (((uint64_t)1)<<(DT_##INTERNAL_NAME)), \
|
||||||
EMPTY_DATA(NAME) }
|
EMPTY_DATA(NAME) }
|
||||||
|
|
||||||
#define INIT_UNAVAILABLE_DATA( NAME ) \
|
#define INIT_UNAVAILABLE_DATA( NAME ) \
|
||||||
@ -76,7 +76,7 @@ int ompi_ddt_dfd = -1;
|
|||||||
{ BASEOBJ_DATA, SIZE, ALIGN, 0/*true_lb*/, SIZE/*true_ub*/, \
|
{ BASEOBJ_DATA, SIZE, ALIGN, 0/*true_lb*/, SIZE/*true_ub*/, \
|
||||||
0/*lb*/, SIZE/*ub*/, \
|
0/*lb*/, SIZE/*ub*/, \
|
||||||
DT_FLAG_BASIC | DT_FLAG_DATA_FORTRAN | (FLAGS), \
|
DT_FLAG_BASIC | DT_FLAG_DATA_FORTRAN | (FLAGS), \
|
||||||
(TYPE), 1, (((unsigned long long)1)<<(TYPE)), EMPTY_DATA(NAME) }
|
(TYPE), 1, (((uint64_t)1)<<(TYPE)), EMPTY_DATA(NAME) }
|
||||||
#else
|
#else
|
||||||
#define INIT_BASIC_FORTRAN_TYPE( TYPE, NAME, SIZE, ALIGN, FLAGS ) \
|
#define INIT_BASIC_FORTRAN_TYPE( TYPE, NAME, SIZE, ALIGN, FLAGS ) \
|
||||||
INIT_BASIC_TYPE( TYPE, NAME )
|
INIT_BASIC_TYPE( TYPE, NAME )
|
||||||
@ -731,7 +731,7 @@ static inline int __dt_contain_basic_datatypes( const ompi_datatype_t* pData, ch
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
size_t index = 0;
|
size_t index = 0;
|
||||||
unsigned long long mask = 1;
|
uint64_t mask = 1;
|
||||||
|
|
||||||
if( pData->flags & DT_FLAG_USER_LB ) index += snprintf( ptr, length - index, "lb " );
|
if( pData->flags & DT_FLAG_USER_LB ) index += snprintf( ptr, length - index, "lb " );
|
||||||
if( pData->flags & DT_FLAG_USER_UB ) index += snprintf( ptr + index, length - index, "ub " );
|
if( pData->flags & DT_FLAG_USER_UB ) index += snprintf( ptr + index, length - index, "ub " );
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user