Delay the initialization until necessary.
Signed-off-by: George Bosilca <bosilca@icl.utk.edu>
Этот коммит содержится в:
родитель
86bb6f8bac
Коммит
8a9ef3dc2d
@ -64,7 +64,7 @@ BEGIN_C_DECLS
|
|||||||
/* flags for the datatypes. */
|
/* flags for the datatypes. */
|
||||||
#define OPAL_DATATYPE_FLAG_UNAVAILABLE 0x0001 /**< datatypes unavailable on the build (OS or compiler dependant) */
|
#define OPAL_DATATYPE_FLAG_UNAVAILABLE 0x0001 /**< datatypes unavailable on the build (OS or compiler dependant) */
|
||||||
#define OPAL_DATATYPE_FLAG_PREDEFINED 0x0002 /**< cannot be removed: initial and predefined datatypes */
|
#define OPAL_DATATYPE_FLAG_PREDEFINED 0x0002 /**< cannot be removed: initial and predefined datatypes */
|
||||||
#define OPAL_DATATYPE_FLAG_COMMITTED 0x0004 /**< ready to be used for a send/recv operation */
|
#define OPAL_DATATYPE_FLAG_COMMITTED 0x0004 /**< ready to be used for a send/recv operation */
|
||||||
#define OPAL_DATATYPE_FLAG_OVERLAP 0x0008 /**< datatype is unpropper for a recv operation */
|
#define OPAL_DATATYPE_FLAG_OVERLAP 0x0008 /**< datatype is unpropper for a recv operation */
|
||||||
#define OPAL_DATATYPE_FLAG_CONTIGUOUS 0x0010 /**< contiguous datatype */
|
#define OPAL_DATATYPE_FLAG_CONTIGUOUS 0x0010 /**< contiguous datatype */
|
||||||
#define OPAL_DATATYPE_FLAG_NO_GAPS 0x0020 /**< no gaps around the datatype, aka OPAL_DATATYPE_FLAG_CONTIGUOUS and extent == size */
|
#define OPAL_DATATYPE_FLAG_NO_GAPS 0x0020 /**< no gaps around the datatype, aka OPAL_DATATYPE_FLAG_CONTIGUOUS and extent == size */
|
||||||
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user