Joel Falcou wrote:
I have a small class view<T> that containes a T* and a size. When I send/receive view using Boost.MPI, I want transfert the actual n data pointed by the view pointer and send the size. On receiving, i will receive the size, checks if they are compatible and receive the data into the zone pointed by the pointer of the receiving view. Of course, I may do something more complex than send/Receive, like all_2_all etc. So i was thinking to give view<T> a proper serialize function so boost.serialization may kick in. As the behavior of sending and receiving is different, I use the load/save idiom to separate the behavior. The question is then, how to serialize the n elements poitned by a raw pointer to those data in an efficient way ? Back to this issue, now here is my use case.
On my N MPI process, I have an array of float (let's say any fundamental
types if we want).
All processor build a few "view" of this array to map a small subset of
contiguous data.
float tab[]= {1,2,3,4,5,6,7,8,9,10};
view<float> v0(&tab[0],5);
view<float> v1(&tab[5],5);
Then I have an array of optional