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

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

optimisation partially finished. To do : special case for intercomm_create and intercomm_merge

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];        // size_rank_info of newcomm
32
33
34    int intercomm_tag;                       // newcomm_ep_rank_loc of ep with ep_rank_loc==0
35                                             // used in comm_dup_intercomm
36   
37  };
38
39
40}
41
42
43
44#endif // EP_INTERCOMM_HPP_INCLUDED
45
Note: See TracBrowser for help on using the repository browser.