What's the difference between Boost.MPI and Boost.Interprocess?
I suppose Boost.MPI
and Boost.Interprocess
are different, right?
From a performance perspective, which is faster? Has anyone ever done benchmarking开发者_开发技巧?
Can I use them to pass data within the same process (i.e. among different threads)?
Thanks!
They are totally different. Boost MPI is for parallel/distributed computing (like massively-parallel super-computers). It requires an existing installation of MPI (Message Passing Interface), such as OpenMPI. MPI is usually used with high-performance clusters of networked computers, or with super computers. The Boost MPI library is basically just a nice wrapper around the normal MPI function calls.
Boost.Interprocess, on the other hand, is an API for IPC (Interprocess Communications), i.e. communicating between two processes on a single computer.
If you want to share data between processes on the same computer, Boost.Interprocess is useful. But if, as you suggest, you just want to share data between threads, you don't need any of this. You just need a threading API.
精彩评论