Boost logo

Boost :

Subject: Re: [boost] [UUID] PODness Revisited
From: David Abrahams (dave_at_[hidden])
Date: 2008-12-26 02:35:55


on Thu Dec 25 2008, Adam Merz <adammerz-AT-hotmail.com> wrote:

> Vladimir Batov writes:
>> 1. Boost.MPI efficiency does not seem to rely on PODness. Rather it seem to
>> be due to serialization (or rather ability to bypass it).
>
> This isn't technically correct, I think; in MPI's case (though not
> Interprocess'), the type must be serializable regardless, but the ideal
> efficiency scenario comes from specializing both boost::mpi::is_mpi_datatype
> and boost::serialization::is_bitwise_serializable. Note that the documentation
> for these traits ([1] and [2], respectively) both specifically mention POD
> types -- this is no coincidence.
>
> [1] http://www.boost.org/doc/libs/1_37_0/doc/html/boost/mpi/is_mpi_datatype.html
> [2] http://www.boost.org/doc/libs/1_37_0/libs/serialization/doc/traits.html

Vladimir is technically correct in fact. It just so happens that PODs
are *guaranteed* to satisfy both the necessary qualifications. In
practice, many non-PODs will also do that, but of course that's not
guaranteed to be true, portably, for most non-POD types.

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk