$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: David Abrahams (dave_at_[hidden])
Date: 2005-11-22 23:57:47
Ian McCulloch <ianmcc_at_[hidden]> writes:
> The 'usual' way (if there is such a thing; datatypes seem to be not used
> much in MPI) of constructing datatypes is using offsetof(), or just knowing
> what the layout is for compiler X, and constructing the datatype by hand.
> I don't know what mechanism Dave is thinking of to construct the datatype,
> it sounds unlikely that it could be done via a usual serialization
> function
Actually yes, it can. It's based on an innovation by Michael Gauckler
and it's both fiendishly clever and blindingly obvious once you see
it. He's writing a paper on it.
> (but maybe if you could do member pointer arithmetic to replace
> offsetof() ?). I don't understand the restriction to PODs with no pointers
> though, as pointers are no problem - at least in principle - you just
> recursively follow the pointer when constructing the typemap.
IIUC, you just can't get the same acceleration for arrays of such types.
-- Dave Abrahams Boost Consulting www.boost-consulting.com