[pooma-dev] Re: [PATCH] Add MPI serializer
Jeffrey D. Oldham
oldham at codesourcery.com
Mon Jan 5 22:39:20 UTC 2004
Richard Guenther wrote:
> On Mon, 5 Jan 2004, Jeffrey D. Oldham wrote:
>
>
>>Richard Guenther wrote:
>>
>>>Hi!
>>>
>>>This patch adds the serializer for MPI messaging. This is basically a
>>>stripped down version of Cheetahs MatchingHandler/Serialize.h. I omitted
>>>all traces of Cheetah::DELEGATE mechanism which we don't use.
>>>
>>>Ok?
>>
>>Please see the interspersed comments below.
>>
>>
>>>// Serialize is a simple class that serializes/unserializes items to/from
>>>// a buffer. It can be partially specialized for different types T,
>>>// or for different general tags Tag. Provided tags are:
>>>//
>>>// 1. 'CHEETAH' is a simple tag type for the default case used by other parts
>>>// of Cheetah. Objects are instantiated in place in the provided buffer.
>>
>>Where is number 2?
>
>
> Number 2 was 'DELEGATE', which I stripped. I'll change 3 for 2.
>
>
>>>// 3. 'ARRAY' serializes arrays. API changes a little from other
>>>// serialize tags as array length must be provided in serialize methods.
>>>// Objects are instantiated in place in the provided buffer.
>>>//
>>>//-----------------------------------------------------------------------------
>
>
>>> static inline int size(const T &)
>>> {
>>
>>Remove the extra blank line.
>
>
> Ok.
>
>
>>> return sizeof(double) * ((sizeof(T) + sizeof(double) - 1) / sizeof(double));
>>> /*
>>> const int off = sizeof(T) % sizeof(void *);
>>> return (sizeof(T) + (off == 0 ? 0 : sizeof(void *) - off));
>>> */
>>
>>Why have the commented out code?
>
>
> It's work in progress, I'll remove it for now.
>
> Ok with these changes?
Yes.
> Thanks,
>
> Richard.
--
Jeffrey D. Oldham
oldham at codesourcery.com
More information about the pooma-dev
mailing list