source: XIOS/dev/branch_openmp/extern/ep_dev/ep_intercomm.hpp @ 1515

Last change on this file since 1515 was 1515, checked in by yushan, 3 years ago

save dev

File size: 1.2 KB
Line 
1#ifndef EP_INTERCOMM_HPP_INCLUDED
2#define EP_INTERCOMM_HPP_INCLUDED
3
4typedef std::pair< int, int > SIZE_RANK_INFO; // < rank, size>
5typedef std::vector< std::pair<int, int> > RANK_MAP;  // at(ep_rank) = <ep_rank_local, mpi_rank>
6typedef std::map<int, std::pair<int, int> > EP_RANK_MAP;  // key(ep_rank) = <ep_rank_local, mpi_rank>
7typedef std::map<int, std::pair< int, std::pair<int, int> > > INTERCOMM_RANK_MAP;
8
9namespace ep_lib
10{
11
12  class ep_comm;
13
14  class ep_intercomm
15  {
16    public:
17
18    void *mpi_inter_comm;
19
20    INTERCOMM_RANK_MAP *intercomm_rank_map;  // quadruple : ep_rank_in_local_comm, ep_rank_loc_in_newcomm, mpi_rank_in_new_comm, comm_label
21                                             // of remote_comm
22   
23    EP_RANK_MAP *local_rank_map;             // = ep_rank_map of local_comm
24
25
26    RANK_MAP *inter_rank_map;
27    RANK_MAP *loc_rank_map;
28    RANK_MAP *remote_rank_map;
29
30
31    SIZE_RANK_INFO size_rank_info[3];
32
33
34    //ep_comm *local_comm;
35    int intercomm_tag;
36
37    ep_intercomm();
38    //~ep_intercomm(){delete mpi_inter_comm;}
39    bool operator == (ep_intercomm right);
40    bool operator != (ep_intercomm right);
41   
42  };
43
44
45}
46
47
48
49#endif // EP_INTERCOMM_HPP_INCLUDED
50
Note: See TracBrowser for help on using the repository browser.