Boost logo

Boost :

From: Robert Ramey (ramey_at_[hidden])
Date: 2006-09-07 11:52:05


Hmmm - one could also use BOOST_STRONG_TYPEDEF to define
types so that one would write:

mpi::communicator c;
std::string str("Hello, World!");
c.send(tag(0), rank(1), str);
...
or
tag t(0);
rank r(1);
c.send(t, r, str);

Just and idea.

Robert Ramey

David Abrahams wrote:
> "Dean Michael Berris" <mikhailberis_at_[hidden]> writes:
>
>> The above line doesn't say anything about what the first int is, and
>> what the second int is -- and it's fairly easy to confuse which one
>> is the rank and which one is the tag. A suggestion I would make is
>> either to utilize Boost.Parameter to come up with something like:
>>
>> mpi::communicator c;
>> std::string str("Hello, World!");
>> c.send(tag=0, rank=1, value=str);
>> c.send(rank=1, tag=0, value=str);
>> c.send(value=str, rank=1, tag=0);
>
> Great idea!
>
>> Or if that introduces too many issues regarding performance (I'm not
>> sure)
>
> I think our tests have demonstrated that Boost.Parameter has no
> measurable runtime performance impact, [or maybe even a positive one
> ;-)]


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