1
1

First step on supporting full external32 conversion on both operations

pack and unpack.

This commit was SVN r12299.
Этот коммит содержится в:
George Bosilca 2006-10-25 14:33:06 +00:00
родитель ccbe5ee016
Коммит 2d17f0fa9d
3 изменённых файлов: 11 добавлений и 4 удалений

Просмотреть файл

@ -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;