
Ian McCulloch <ianmcc@physik.rwth-aachen.de> 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