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

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

Function template register_serialized

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

Synopsis

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


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

Description

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.

Parameters:

type

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

value

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


PrevUpHomeNext