| Home | Libraries | People | FAQ | More

## Class packed_iarchive

boost::mpi::packed_iarchive — An archive that packs binary data into an MPI buffer.

## Synopsis

    class packed_iarchive {
    public:
      // construct/copy/destruct
      packed_iarchive(MPI_Comm const &, buffer_type &,
                      unsigned int = boost::archive::no_header, int = 0);
      packed_iarchive(MPI_Comm const &, unsigned int = boost::archive::no_header);
    };

## Description

The `packed_iarchive` class is an Archiver (as in the Boost.Serialization library) that packs binary data into a buffer for transmission via MPI. It can operate on any Serializable data type and will use the `MPI_Pack` function of the underlying MPI implementation to perform serialization.

### `packed_iarchive` public construct/copy/destruct

1.     packed_iarchive(MPI_Comm const & comm, buffer_type & b,
                       unsigned int flags = boost::archive::no_header,
                       int position = 0);

   Construct a `packed_iarchive` for transmission over the given MPI communicator and with an initial buffer.

   Parameters: |
   `b` | A user-defined buffer that will be filled with the binary representation of serialized objects.
   `comm` | The communicator over which this archive will be sent.
   `flags` | Control the serialization of the data types. Refer to the Boost.Serialization documentation before changing the default flags.
   `position` | Set the offset into buffer `b` at which deserialization will begin.

2.     packed_iarchive(MPI_Comm const & comm,
                       unsigned int flags = boost::archive::no_header);

   Construct a `packed_iarchive` for transmission over the given MPI communicator.

   Parameters: |
   `comm` | The communicator over which this archive will be sent.
   `flags` | Control the serialization of the data types. Refer to the Boost.Serialization documentation before changing the default flags.