This source file includes following definitions.
- ompi_mtl_psm2_get_endpoint
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 #ifndef MCA_MTL_PSM2_ENDPOINT_H
22 #define MCA_MTL_PSM2_ENDPOINT_H
23
24 #include "opal/class/opal_list.h"
25 #include "opal/mca/event/event.h"
26 #include "ompi/mca/mtl/mtl.h"
27 #include "mtl_psm2.h"
28
29 #include "psm2.h"
30
31 BEGIN_C_DECLS
32
33 OBJ_CLASS_DECLARATION(mca_mtl_psm2_endpoint_t);
34
35
36
37
38
39
40
41
42 struct mca_mtl_psm2_endpoint_t {
43 opal_list_item_t super;
44
45 struct mca_mtl_psm2_module_t* mtl_psm2_module;
46
47
48 psm2_epid_t peer_epid;
49
50
51 psm2_epaddr_t peer_addr;
52
53 };
54
55 typedef struct mca_mtl_psm2_endpoint_t mca_mtl_psm2_endpoint_t;
56 OBJ_CLASS_DECLARATION(mca_mtl_psm2_endpoint);
57
58 static inline mca_mtl_psm2_endpoint_t *ompi_mtl_psm2_get_endpoint (struct mca_mtl_base_module_t* mtl, ompi_proc_t *ompi_proc)
59 {
60 if (OPAL_UNLIKELY(NULL == ompi_proc->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_MTL])) {
61 ompi_mtl_psm2_add_procs (mtl, 1, &ompi_proc);
62 }
63
64 return ompi_proc->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_MTL];
65 }
66
67 END_C_DECLS
68 #endif