9 #include <alps/config.hpp> 20 template<
typename T,
typename A,
typename Op>
void reduce(
const communicator & comm, std::vector<T, A>
const & in_values, Op op,
int root) {
21 reduce(comm, &in_values.front(), in_values.size(), op, root);
25 template<
typename T,
typename A,
typename Op>
void reduce(
const communicator & comm, std::vector<T, A>
const & in_values, std::vector<T, A> & out_values, Op op,
int root) {
26 out_values.resize(in_values.size());
27 reduce(comm, &in_values.front(), in_values.size(), &out_values.front(), op, root);
Header for object-oriented interface to MPI (similar to boost::mpi)