12 #ifndef ALPS_UTILITIES_MPI_VECTOR_HPP_INCLUDED_ba202cf9fb0040e493596702a707ca9b 13 #define ALPS_UTILITIES_MPI_VECTOR_HPP_INCLUDED_ba202cf9fb0040e493596702a707ca9b 19 #include <boost/container/vector.hpp> 33 std::size_t root_sz=vec.size();
35 if (comm.
rank() != root) {
38 for(std::string& elem: vec) {
51 std::size_t root_sz=vec.size();
53 if (comm.
rank() != root) {
56 broadcast(comm, &vec[0], vec.size(), root);
67 typedef std::vector<bool> vector_type;
68 typedef vector_type::iterator iter_type;
70 std::size_t root_sz=vec.size();
72 if (comm.
rank() != root) {
76 for (iter_type it=vec.begin(); it!=vec.end(); ++it) {
Header for object-oriented interface to MPI (similar to boost::mpi)
Encapsulation of an MPI communicator and some communicator-related operations.
int rank() const
Returns process rank in this communicator.
void broadcast(const communicator &comm, T *vals, std::size_t count, int root)
Broadcasts array vals of a primitive type T, length count on communicator comm with root root ...