This is always on the critical path so let's make it static inline.
This commit was SVN r10020.
Этот коммит содержится в:
родитель
95d0395578
Коммит
e832aac7b1
@ -35,24 +35,6 @@ extern int ompi_ddt_local_sizes[DT_MAX_PREDEFINED];
|
|||||||
extern int ompi_convertor_create_stack_with_pos_general( ompi_convertor_t* convertor,
|
extern int ompi_convertor_create_stack_with_pos_general( ompi_convertor_t* convertor,
|
||||||
int starting_point, const int* sizes );
|
int starting_point, const int* sizes );
|
||||||
|
|
||||||
/* The cleanup function will put the convertor in exactly the same state as after a call
|
|
||||||
* to ompi_convertor_construct. Therefore, all PML can call OBJ_DESTRUCT on the request's
|
|
||||||
* convertors without having to call OBJ_CONSTRUCT everytime they grab a new one from the
|
|
||||||
* cache. The OBJ_CONSTRUCT on the convertor should be called only on the first creation
|
|
||||||
* of a request (not when extracted from the cache).
|
|
||||||
*/
|
|
||||||
inline int ompi_convertor_cleanup( ompi_convertor_t* convertor )
|
|
||||||
{
|
|
||||||
if( convertor->stack_size > DT_STATIC_STACK_SIZE ) {
|
|
||||||
free( convertor->pStack );
|
|
||||||
convertor->pStack = convertor->static_stack;
|
|
||||||
convertor->stack_size = DT_STATIC_STACK_SIZE;
|
|
||||||
}
|
|
||||||
convertor->pDesc = NULL;
|
|
||||||
convertor->stack_pos = 0;
|
|
||||||
return OMPI_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void ompi_convertor_construct( ompi_convertor_t* convertor )
|
static void ompi_convertor_construct( ompi_convertor_t* convertor )
|
||||||
{
|
{
|
||||||
convertor->pStack = convertor->static_stack;
|
convertor->pStack = convertor->static_stack;
|
||||||
|
@ -189,10 +189,24 @@ ompi_convertor_unpack( ompi_convertor_t* pConv,
|
|||||||
*/
|
*/
|
||||||
OMPI_DECLSPEC ompi_convertor_t* ompi_convertor_create( int32_t remote_arch, int32_t mode );
|
OMPI_DECLSPEC ompi_convertor_t* ompi_convertor_create( int32_t remote_arch, int32_t mode );
|
||||||
|
|
||||||
/*
|
/**
|
||||||
*
|
* The cleanup function will put the convertor in exactly the same state as after a call
|
||||||
|
* to ompi_convertor_construct. Therefore, all PML can call OBJ_DESTRUCT on the request's
|
||||||
|
* convertors without having to call OBJ_CONSTRUCT everytime they grab a new one from the
|
||||||
|
* cache. The OBJ_CONSTRUCT on the convertor should be called only on the first creation
|
||||||
|
* of a request (not when extracted from the cache).
|
||||||
*/
|
*/
|
||||||
OMPI_DECLSPEC int ompi_convertor_cleanup( ompi_convertor_t* convertor );
|
static inline int ompi_convertor_cleanup( ompi_convertor_t* convertor )
|
||||||
|
{
|
||||||
|
if( convertor->stack_size > DT_STATIC_STACK_SIZE ) {
|
||||||
|
free( convertor->pStack );
|
||||||
|
convertor->pStack = convertor->static_stack;
|
||||||
|
convertor->stack_size = DT_STATIC_STACK_SIZE;
|
||||||
|
}
|
||||||
|
convertor->pDesc = NULL;
|
||||||
|
convertor->stack_pos = 0;
|
||||||
|
return OMPI_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user