123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165 |
- #ifndef BOOST_MPI_INTERCOMMUNICATOR_HPP
- #define BOOST_MPI_INTERCOMMUNICATOR_HPP
- #include <boost/mpi/communicator.hpp>
- namespace boost { namespace mpi {
-
- class group;
-
- class BOOST_MPI_DECL intercommunicator : public communicator
- {
- private:
- friend class communicator;
-
- explicit intercommunicator(const shared_ptr<MPI_Comm>& cp)
- {
- this->comm_ptr = cp;
- }
- public:
-
- intercommunicator(const MPI_Comm& comm, comm_create_kind kind)
- : communicator(comm, kind) { }
-
- intercommunicator(const communicator& local, int local_leader,
- const communicator& peer, int remote_leader);
-
- int local_size() const { return this->size(); }
-
- boost::mpi::group local_group() const;
-
- int local_rank() const { return this->rank(); }
-
- int remote_size() const;
-
- boost::mpi::group remote_group() const;
-
- communicator merge(bool high) const;
- };
- } }
- #endif
|