Do not allow the use of the optimized path for predefined non contiguous datatypes (like MPI_SHORT_INT on most of the architectures).
This commit was SVN r7776.
Этот коммит содержится в:
родитель
9d5f597b7f
Коммит
6e3c23ec3b
@ -84,9 +84,7 @@ int32_t ompi_ddt_add( ompi_datatype_t* pdtBase, const ompi_datatype_t* pdtAdd,
|
|||||||
*/
|
*/
|
||||||
if( extent == -1 ) extent = (pdtAdd->ub - pdtAdd->lb);
|
if( extent == -1 ) extent = (pdtAdd->ub - pdtAdd->lb);
|
||||||
|
|
||||||
/* first make sure that we have enought place to
|
if( pdtAdd->flags & DT_FLAG_PREDEFINED ) { /* add a basic datatype */
|
||||||
* put the new element inside */
|
|
||||||
if( pdtAdd->flags & DT_FLAG_PREDEFINED ) {
|
|
||||||
/* 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 |= (1<< DT_LB);
|
||||||
@ -200,7 +198,11 @@ int32_t ompi_ddt_add( ompi_datatype_t* pdtBase, const ompi_datatype_t* pdtAdd,
|
|||||||
pdtBase->desc.length = newLength;
|
pdtBase->desc.length = newLength;
|
||||||
}
|
}
|
||||||
pLast = &(pdtBase->desc.desc[pdtBase->desc.used]);
|
pLast = &(pdtBase->desc.desc[pdtBase->desc.used]);
|
||||||
if( pdtAdd->flags & DT_FLAG_PREDEFINED ) { /* add a basic datatype */
|
/* The condition to be able to use the optimized path here is to be in presence
|
||||||
|
* of an predefined contiguous datatype. This part is unable to handle any
|
||||||
|
* predefined non contiguous datatypes (like MPI_SHORT_INT).
|
||||||
|
*/
|
||||||
|
if( (pdtAdd->flags & (DT_FLAG_PREDEFINED | DT_FLAG_DATA)) == (DT_FLAG_PREDEFINED | DT_FLAG_DATA) ) {
|
||||||
pdtBase->btypes[pdtAdd->id] += count;
|
pdtBase->btypes[pdtAdd->id] += count;
|
||||||
if( (extent != (long)pdtAdd->size) && (count > 1) ) { /* gaps around the datatype */
|
if( (extent != (long)pdtAdd->size) && (count > 1) ) { /* gaps around the datatype */
|
||||||
localFlags = pdtAdd->flags & ~(DT_FLAG_COMMITED | DT_FLAG_CONTIGUOUS);
|
localFlags = pdtAdd->flags & ~(DT_FLAG_COMMITED | DT_FLAG_CONTIGUOUS);
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user