Delay the initialization until necessary.
Signed-off-by: George Bosilca <bosilca@icl.utk.edu>
Этот коммит содержится в:
родитель
86bb6f8bac
Коммит
8a9ef3dc2d
@ -81,7 +81,6 @@ BEGIN_C_DECLS
|
||||
OPAL_DATATYPE_FLAG_DATA | \
|
||||
OPAL_DATATYPE_FLAG_COMMITTED)
|
||||
|
||||
|
||||
/**
|
||||
* The number of supported entries in the data-type definition and the
|
||||
* associated type.
|
||||
@ -349,13 +348,13 @@ static inline ptrdiff_t
|
||||
opal_datatype_span( const opal_datatype_t* pData, int64_t count,
|
||||
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)) {
|
||||
*gap = 0;
|
||||
return 0;
|
||||
}
|
||||
*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;
|
||||
}
|
||||
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user