This source file includes following definitions.
- ompi_osc_rdma_sync_get_count
1
2
3
4
5
6
7
8
9
10
11
12 #if !defined(OSC_RDMA_SYNC_H)
13 #define OSC_RDMA_SYNC_H
14
15 #include "osc_rdma_types.h"
16 #include "opal/class/opal_object.h"
17 #include "opal/threads/threads.h"
18
19
20
21
22 enum ompi_osc_rdma_sync_type_t {
23
24 OMPI_OSC_RDMA_SYNC_TYPE_NONE,
25
26 OMPI_OSC_RDMA_SYNC_TYPE_LOCK,
27
28 OMPI_OSC_RDMA_SYNC_TYPE_FENCE,
29
30 OMPI_OSC_RDMA_SYNC_TYPE_PSCW,
31 };
32 typedef enum ompi_osc_rdma_sync_type_t ompi_osc_rdma_sync_type_t;
33
34 struct ompi_osc_rdma_module_t;
35
36 struct ompi_osc_rdma_sync_aligned_counter_t {
37 osc_rdma_atomic_counter_t counter;
38
39 uint64_t padding[7];
40 };
41 typedef struct ompi_osc_rdma_sync_aligned_counter_t ompi_osc_rdma_sync_aligned_counter_t;
42
43
44
45
46
47
48 struct ompi_osc_rdma_sync_t {
49 opal_object_t super;
50
51
52 struct ompi_osc_rdma_module_t *module;
53
54
55 ompi_osc_rdma_sync_type_t type;
56
57
58 union {
59
60 struct {
61
62 int target;
63
64
65 int16_t type;
66
67
68
69
70 int16_t assert;
71 } lock;
72
73
74 struct {
75
76 ompi_group_t *group;
77 } pscw;
78 } sync;
79
80
81 union {
82
83 struct ompi_osc_rdma_peer_t **peers;
84
85 struct ompi_osc_rdma_peer_t *peer;
86 } peer_list;
87
88
89 opal_list_t demand_locked_peers;
90
91
92 int num_peers;
93
94
95 bool epoch_active;
96
97
98 ompi_osc_rdma_sync_aligned_counter_t outstanding_rdma __opal_attribute_aligned__(64);
99
100
101 opal_mutex_t lock;
102 };
103 typedef struct ompi_osc_rdma_sync_t ompi_osc_rdma_sync_t;
104
105 OBJ_CLASS_DECLARATION(ompi_osc_rdma_sync_t);
106
107
108
109
110
111
112
113
114
115 ompi_osc_rdma_sync_t *ompi_osc_rdma_sync_allocate (struct ompi_osc_rdma_module_t *module);
116
117
118
119
120
121
122 void ompi_osc_rdma_sync_return (ompi_osc_rdma_sync_t *rdma_sync);
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137 bool ompi_osc_rdma_sync_pscw_peer (struct ompi_osc_rdma_module_t *module, int target, struct ompi_osc_rdma_peer_t **peer);
138
139
140 static inline int64_t ompi_osc_rdma_sync_get_count (ompi_osc_rdma_sync_t *rdma_sync)
141 {
142 return rdma_sync->outstanding_rdma.counter;
143 }
144
145 #endif