serialization - Sync only parts of a c++ vector using Boost.MPI -
i have std::vector (let's call "data_vector") want synchronize parts of across processors. i.e., want send values arbitrary indexes in vector other processors.
i can boost's send() functions if want send whole vector, need send small portion of it. right have separate vector (let's call "idx_vector") containing indexes of data_vector want send, can change format if necessary.
what's best way this? don't want iterate through , sync each index separately. copy values 1 contiguous vector , sync that, rebuild it, wonder if boost has better way. boost.serialization idx_vector containing pointers data_vector locations work? how that?
serialization should work, since under hood mpi implementation sending array of bytes. mpi method of doing define mpi datatype picks out indices want send, in case mpi_type_indexed right option.
Comments
Post a Comment