1
1

Delay the initialization until necessary.

Signed-off-by: George Bosilca <bosilca@icl.utk.edu>
Этот коммит содержится в:
George Bosilca 2017-10-31 17:35:48 -04:00
родитель 86bb6f8bac
Коммит 8a9ef3dc2d
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 09C926752C9F09B1

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

@ -81,7 +81,6 @@ BEGIN_C_DECLS
OPAL_DATATYPE_FLAG_DATA | \ OPAL_DATATYPE_FLAG_DATA | \
OPAL_DATATYPE_FLAG_COMMITTED) OPAL_DATATYPE_FLAG_COMMITTED)
/** /**
* The number of supported entries in the data-type definition and the * The number of supported entries in the data-type definition and the
* associated type. * associated type.
@ -349,13 +348,13 @@ static inline ptrdiff_t
opal_datatype_span( const opal_datatype_t* pData, int64_t count, opal_datatype_span( const opal_datatype_t* pData, int64_t count,
ptrdiff_t* gap) ptrdiff_t* gap)
{ {
ptrdiff_t extent = (pData->ub - pData->lb);
ptrdiff_t true_extent = (pData->true_ub - pData->true_lb);
if (OPAL_UNLIKELY(0 == pData->size) || (0 == count)) { if (OPAL_UNLIKELY(0 == pData->size) || (0 == count)) {
*gap = 0; *gap = 0;
return 0; return 0;
} }
*gap = pData->true_lb; *gap = pData->true_lb;
ptrdiff_t extent = (pData->ub - pData->lb);
ptrdiff_t true_extent = (pData->true_ub - pData->true_lb);
return true_extent + (count - 1) * extent; return true_extent + (count - 1) * extent;
} }