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

This is the documentation for an old version of Boost. Click here to view this page for the latest version.

Function template register_serialized

boost::mpi::python::register_serialized — Register the type T for direct serialization within Boost.MPI.


template<typename T> 
  void register_serialized(const T & value = T(), PyTypeObject * type = 0);


The register_serialized function registers a C++ type for direct serialization within Boost.MPI. Direct serialization elides the use of the Python pickle package when serializing Python objects that represent C++ values. Direct serialization can be beneficial both to improve serialization performance (Python pickling can be very inefficient) and to permit serialization for Python-wrapped C++ objects that do not support pickling.



The Python type associated with the C++ type T. If not provided, it will be computed from the same value value.


A sample value of the type T. This may be used to compute the Python type associated with the C++ type T.