Rev | Line | |
---|
[1502] | 1 | #ifndef EP_COMM_HPP_INCLUDED |
---|
| 2 | #define EP_COMM_HPP_INCLUDED |
---|
| 3 | |
---|
| 4 | #include "ep_message.hpp" |
---|
| 5 | #include "ep_barrier.hpp" |
---|
| 6 | #include "ep_buffer.hpp" |
---|
| 7 | |
---|
| 8 | typedef std::pair< int, int > SIZE_RANK_INFO; // < rank, size> |
---|
| 9 | typedef std::vector< std::pair<int, int> > RANK_MAP; // at(ep_rank) = <ep_rank_local, mpi_rank> |
---|
| 10 | typedef std::map<int, std::pair<int, int> > EP_RANK_MAP; // key(ep_rank) = <ep_rank_local, mpi_rank> |
---|
| 11 | typedef std::list<ep_lib::MPI_Message > Message_list; |
---|
[1525] | 12 | typedef std::map<int, int > INTER_RANK_MAP; |
---|
[1502] | 13 | |
---|
| 14 | namespace ep_lib |
---|
| 15 | { |
---|
| 16 | |
---|
| 17 | class ep_comm; |
---|
| 18 | |
---|
| 19 | class ep_communicator |
---|
| 20 | { |
---|
| 21 | public: |
---|
| 22 | |
---|
| 23 | SIZE_RANK_INFO size_rank_info[3]; // 0: ep_rank, ep_size |
---|
| 24 | // 1: ep_rank_loc, num_ep |
---|
| 25 | // 2: mpi_rank, mpi_size |
---|
| 26 | |
---|
| 27 | ep_comm **comm_list; |
---|
| 28 | |
---|
| 29 | Message_list *message_queue; |
---|
| 30 | |
---|
| 31 | }; |
---|
| 32 | |
---|
| 33 | |
---|
| 34 | class ep_comm |
---|
| 35 | { |
---|
| 36 | public: |
---|
| 37 | |
---|
| 38 | bool is_ep; |
---|
| 39 | bool is_intercomm; |
---|
| 40 | |
---|
| 41 | BUFFER *my_buffer; |
---|
[1517] | 42 | |
---|
[1502] | 43 | ep_barrier *ep_barrier; |
---|
[1517] | 44 | |
---|
[1527] | 45 | EP_RANK_MAP *ep_rank_map; |
---|
[1517] | 46 | |
---|
[1525] | 47 | INTER_RANK_MAP *inter_rank_map; |
---|
[1517] | 48 | |
---|
[1502] | 49 | void* mpi_comm; |
---|
| 50 | ep_communicator *ep_comm_ptr; |
---|
| 51 | ep_comm **mem_bridge; |
---|
| 52 | void* mpi_bridge; |
---|
| 53 | |
---|
[1517] | 54 | ep_comm(){}; |
---|
[1502] | 55 | ep_comm(void* comm); |
---|
| 56 | |
---|
| 57 | }; |
---|
| 58 | |
---|
| 59 | typedef ep_comm* MPI_Comm; |
---|
| 60 | |
---|
| 61 | |
---|
| 62 | } |
---|
| 63 | |
---|
| 64 | |
---|
| 65 | |
---|
| 66 | #endif // EP_COMM_HPP_INCLUDED |
---|
| 67 | |
---|
Note: See
TracBrowser
for help on using the repository browser.