How to pass STL object messages in C ++, such as std :: map in MPI?

I want to pass stl objects in C ++ like std::map and std::list using MPI, but I don't know how to do this.

+4
source share
1 answer

Unfortunately, this is not possible directly. You will need to do serialization.

Since you mention MPI, you are probably interested in high performance. In this case, using serialization is probably not the best idea. Therefore, I would stay away from more complex STL structures and only work with std::vector .

+5
source

All Articles