First step on supporting full external32 conversion on both operations
pack and unpack. This commit was SVN r12299.
Этот коммит содержится в:
родитель
ccbe5ee016
Коммит
2d17f0fa9d
@ -39,7 +39,7 @@ extern "C" {
|
||||
*/
|
||||
/* keep the last 16 bits free for data flags */
|
||||
#define CONVERTOR_DATATYPE_MASK 0x0000FFFF
|
||||
#define CONVERTOR_USELESS 0x00010000
|
||||
#define CONVERTOR_SEND_CONVERSION 0x00010000
|
||||
#define CONVERTOR_RECV 0x00020000
|
||||
#define CONVERTOR_SEND 0x00040000
|
||||
#define CONVERTOR_HOMOGENEOUS 0x00080000
|
||||
|
@ -58,9 +58,14 @@ int MPI_Pack_external(char *datarep, void *inbuf, int incount,
|
||||
|
||||
OBJ_CONSTRUCT(&local_convertor, ompi_convertor_t);
|
||||
|
||||
/* The resulting convertor will be set to the position zero */
|
||||
/* The resulting convertor will be set to the position zero. We have to use
|
||||
* CONVERTOR_SEND_CONVERSION in order to force the convertor to do anything
|
||||
* more than just packing the data.
|
||||
*/
|
||||
ompi_convertor_copy_and_prepare_for_send( ompi_mpi_external32_convertor,
|
||||
datatype, incount, inbuf, 0, &local_convertor );
|
||||
datatype, incount, inbuf,
|
||||
CONVERTOR_SEND_CONVERSION,
|
||||
&local_convertor );
|
||||
|
||||
/* Check for truncation */
|
||||
ompi_convertor_get_packed_size( &local_convertor, &size );
|
||||
|
@ -52,7 +52,9 @@ int MPI_Pack_external_size(char *datarep, int incount,
|
||||
|
||||
/* the resulting convertor will be set to the position ZERO */
|
||||
ompi_convertor_copy_and_prepare_for_send( ompi_mpi_external32_convertor,
|
||||
datatype, incount, NULL, 0, &local_convertor );
|
||||
datatype, incount, NULL,
|
||||
CONVERTOR_SEND_CONVERSION,
|
||||
&local_convertor );
|
||||
|
||||
ompi_convertor_get_packed_size( &local_convertor, &length );
|
||||
*size = (MPI_Aint)length;
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user