12 #ifndef ALPS_UTILITIES_MPI_MAP_HPP_INCLUDED_b6555a13ab3b46c2a2b4a434a3484099 13 #define ALPS_UTILITIES_MPI_MAP_HPP_INCLUDED_b6555a13ab3b46c2a2b4a434a3484099 25 template <
typename K,
typename V>
28 typedef std::map<K,V> map_type;
29 typedef typename map_type::value_type value_type;
31 std::size_t root_sz=a_map.size();
34 if (comm.
rank()==root) {
35 for(value_type& pair: a_map) {
36 broadcast(comm, const_cast<K&>(pair.first), root);
void swap(params &p1, params &p2)
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 ...