The master convertor is the one that knows if the peers are
homogeneous or heterogeneous. This commit was SVN r10005.
Этот коммит содержится в:
родитель
6df7bf1a0f
Коммит
1dcd70ad80
@ -49,17 +49,14 @@ inline int ompi_convertor_cleanup( ompi_convertor_t* convertor )
|
|||||||
convertor->stack_size = DT_STATIC_STACK_SIZE;
|
convertor->stack_size = DT_STATIC_STACK_SIZE;
|
||||||
}
|
}
|
||||||
convertor->pDesc = NULL;
|
convertor->pDesc = NULL;
|
||||||
convertor->flags = CONVERTOR_HOMOGENEOUS;
|
|
||||||
convertor->stack_pos = 0;
|
convertor->stack_pos = 0;
|
||||||
return OMPI_SUCCESS;
|
return OMPI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ompi_convertor_construct( ompi_convertor_t* convertor )
|
static void ompi_convertor_construct( ompi_convertor_t* convertor )
|
||||||
{
|
{
|
||||||
convertor->flags = CONVERTOR_HOMOGENEOUS;
|
|
||||||
convertor->pStack = convertor->static_stack;
|
convertor->pStack = convertor->static_stack;
|
||||||
convertor->stack_size = DT_STATIC_STACK_SIZE;
|
convertor->stack_size = DT_STATIC_STACK_SIZE;
|
||||||
convertor->remoteArch = 0;
|
|
||||||
convertor->storage.length = 0;
|
convertor->storage.length = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -105,7 +102,7 @@ ompi_convertor_master_t* ompi_convertor_find_or_create_master( uint32_t remote_a
|
|||||||
master->next = ompi_convertor_master_list;
|
master->next = ompi_convertor_master_list;
|
||||||
ompi_convertor_master_list = master;
|
ompi_convertor_master_list = master;
|
||||||
master->remote_arch = remote_arch;
|
master->remote_arch = remote_arch;
|
||||||
|
master->flags = 0;
|
||||||
/* Most of the sizes will be identical, so for now just make a copy of
|
/* Most of the sizes will be identical, so for now just make a copy of
|
||||||
* the local ones. As master->remote_sizes is defined as being an array of
|
* the local ones. As master->remote_sizes is defined as being an array of
|
||||||
* consts we have to manually cast it before using it for writing purposes.
|
* consts we have to manually cast it before using it for writing purposes.
|
||||||
@ -148,11 +145,12 @@ ompi_convertor_master_t* ompi_convertor_find_or_create_master( uint32_t remote_a
|
|||||||
|
|
||||||
if( master->remote_arch == ompi_mpi_local_arch ) {
|
if( master->remote_arch == ompi_mpi_local_arch ) {
|
||||||
master->pFunctions = ompi_ddt_copy_functions;
|
master->pFunctions = ompi_ddt_copy_functions;
|
||||||
|
master->flags |= CONVERTOR_HOMOGENEOUS;
|
||||||
} else {
|
} else {
|
||||||
master->pFunctions = ompi_ddt_heterogeneous_copy_functions;
|
master->pFunctions = ompi_ddt_heterogeneous_copy_functions;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* We're done so far, return th mater convertor */
|
/* We're done so far, return the mater convertor */
|
||||||
return master;
|
return master;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -165,6 +163,8 @@ ompi_convertor_t* ompi_convertor_create( int32_t remote_arch, int32_t mode )
|
|||||||
|
|
||||||
convertor->remoteArch = remote_arch;
|
convertor->remoteArch = remote_arch;
|
||||||
convertor->stack_pos = 0;
|
convertor->stack_pos = 0;
|
||||||
|
convertor->flags = master->flags;
|
||||||
|
convertor->master = master;
|
||||||
|
|
||||||
return convertor;
|
return convertor;
|
||||||
}
|
}
|
||||||
@ -197,8 +197,7 @@ int32_t ompi_convertor_pack( ompi_convertor_t* pConv,
|
|||||||
{
|
{
|
||||||
OMPI_CONVERTOR_SET_STATUS_BEFORE_PACK_UNPACK( pConv, iov, out_size, max_data );
|
OMPI_CONVERTOR_SET_STATUS_BEFORE_PACK_UNPACK( pConv, iov, out_size, max_data );
|
||||||
|
|
||||||
if( (pConv->flags & (DT_FLAG_PREDEFINED | CONVERTOR_HOMOGENEOUS)) ==
|
if( (pConv->flags & DT_FLAG_PREDEFINED) == DT_FLAG_PREDEFINED ) {
|
||||||
(DT_FLAG_PREDEFINED | CONVERTOR_HOMOGENEOUS) ) {
|
|
||||||
/* We are doing conversion on a predefined datatype. The convertor contain
|
/* We are doing conversion on a predefined datatype. The convertor contain
|
||||||
* minimal informations, we only use the bConverted to manage the conversion.
|
* minimal informations, we only use the bConverted to manage the conversion.
|
||||||
*/
|
*/
|
||||||
|
@ -25,6 +25,7 @@ typedef int32_t (*conversion_fct_t)( ompi_convertor_t* pConvertor, uint32_t coun
|
|||||||
typedef struct ompi_convertor_master_t {
|
typedef struct ompi_convertor_master_t {
|
||||||
struct ompi_convertor_master_t* next;
|
struct ompi_convertor_master_t* next;
|
||||||
uint32_t remote_arch;
|
uint32_t remote_arch;
|
||||||
|
uint32_t flags;
|
||||||
const int32_t remote_sizes[DT_MAX_PREDEFINED];
|
const int32_t remote_sizes[DT_MAX_PREDEFINED];
|
||||||
conversion_fct_t* pFunctions; /**< the convertor functions pointer */
|
conversion_fct_t* pFunctions; /**< the convertor functions pointer */
|
||||||
} ompi_convertor_master_t;
|
} ompi_convertor_master_t;
|
||||||
|
Загрузка…
Ссылка в новой задаче
Block a user