Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

PrevUpHomeNext

Class packed_oarchive

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

Synopsis

// In header: <boost/mpi/packed_oarchive.hpp>


class packed_oarchive : public oprimitive {
public:

  // public member functions
  packed_oarchive(MPI_Comm const &, buffer_type &, 
                  unsigned int = boost::archive::no_header);
  packed_oarchive(MPI_Comm const &, unsigned int = boost::archive::no_header);
  template<typename T> void save_override(T const &, mpl::false_);
  template<typename T> void save_override(T const &, mpl::true_);
  template<typename T> void save_override(T const &);
  void save_override(const archive::class_id_optional_type &);
  void save_override(const archive::class_name_type &);
  void save_override(const archive::class_id_type &);
  void save_override(const archive::version_type &);
};

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_oarchive public member functions

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

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

    Parameters:

    comm

    The communicator over which this archive will be sent.

    b

    A user-defined buffer that will be filled with the binary representation of serialized objects.

    flags

    Control the serialization of the data types. Refer to the Boost.Serialization documentation before changing the default flags.

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

    Construct a packed_oarchive 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.

  3. template<typename T> void save_override(T const & x, mpl::false_);
  4. template<typename T> void save_override(T const & x, mpl::true_);
  5. template<typename T> void save_override(T const & x);
  6. void save_override(const archive::class_id_optional_type &);
  7. void save_override(const archive::class_name_type & t);
  8. void save_override(const archive::class_id_type & t);
  9. void save_override(const archive::version_type & t);

PrevUpHomeNext