mpit.h 33.3 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
/*
 *  (C) 2013 by Argonne National Laboratory.
 *      See COPYRIGHT in top-level directory.
 */

/* Interfaces in this file are intended to be used by modules other than
 * MPIR_T. They use these interfaces to declare, create, operate and expose
 * enums, control variables, performance variables and categories.
 */
#ifndef MPIT_H_INCLUDED
#define MPIT_H_INCLUDED

#include "mpitimpl.h"

/* Stamp to indicate a change in categories */
extern int cat_stamp;

/* Tables to store enums, categories, cvars, pvars.
 * All tables need random access except enum_table. But we still implement
 * enum_table as an array, since it is handy and element size of
 * enum_table (i.e., sizeof(enum_item_t)) is small.
 */
extern UT_array *enum_table;
extern UT_array *cat_table;
extern UT_array *cvar_table;
extern UT_array *pvar_table;

/* Hash tables to quick locate category, cvar, pvar indices by their names */
extern name2index_hash_t *cat_hash;
extern name2index_hash_t *cvar_hash;
/* pvar names are unique per pvar class. So we use multiple hashs */
extern name2index_hash_t *pvar_hashs[MPIR_T_PVAR_CLASS_NUMBER];

/* See description in mpit.c */
extern void MPIR_T_enum_create(const char *name, MPI_T_enum *handle);
extern void MPIR_T_enum_add_item(MPI_T_enum handle, const char *item_name, int item_value);
extern int MPIR_T_cat_add_pvar(const char *cat_name, int pvar_index);
extern int MPIR_T_cat_add_cvar(const char *cat_name, int cvar_index);
extern int MPIR_T_cat_add_subcat(const char *parent_name, const char *child_name);
extern int MPIR_T_cat_add_desc(const char *cat_name, const char *cat_desc);

static inline cvar_table_entry_t * LOOKUP_CVAR_BY_NAME(const char* cvar_name)
{
    name2index_hash_t *hash_entry;
    HASH_FIND_STR(cvar_hash, cvar_name, hash_entry);
    MPIU_Assert(hash_entry != NULL);
    int cvar_idx = hash_entry->idx;
    return (cvar_table_entry_t *)utarray_eltptr(cvar_table, cvar_idx);
}

/* Helper macros for getting the default value of a cvar */
53
#define MPIR_CVAR_GET_DEFAULT_INT(name_,out_ptr_)   \
54
55
56
57
58
    do {  \
        cvar_table_entry_t *cvar = LOOKUP_CVAR_BY_NAME(#name_); \
        *(out_ptr_) = cvar->defaultval.d; \
    } while (0)

59
#define MPIR_CVAR_GET_DEFAULT_BOOLEAN(name_,out_ptr_)   \
60
    do {  \
61
        MPIR_CVAR_GET_DEFAULT_INT(name_,out_ptr_); \
62
63
    } while (0)

64
#define MPIR_CVAR_GET_DEFAULT_UNSIGNED(name_,out_ptr_)   \
65
66
67
68
69
    do {  \
        cvar_table_entry_t *cvar = LOOKUP_CVAR_BY_NAME(#name_); \
        *(out_ptr_) = cvar->defaultval.u; \
    } while (0)

70
#define MPIR_CVAR_GET_DEFAULT_UNSIGNED_LONG(name_,out_ptr_)   \
71
72
73
74
75
    do {  \
        cvar_table_entry_t *cvar = LOOKUP_CVAR_BY_NAME(#name_); \
        *(out_ptr_) = cvar->defaultval.ul; \
    } while (0)

76
#define MPIR_CVAR_GET_DEFAULT_UNSIGNED_LONG_LONG(name_,out_ptr_)   \
77
78
79
80
81
    do {  \
        cvar_table_entry_t *cvar = LOOKUP_CVAR_BY_NAME(#name_); \
        *(out_ptr_) = cvar->defaultval.ull; \
    } while (0)

82
#define MPIR_CVAR_GET_DEFAULT_DOUBLE(name_,out_ptr_)   \
83
84
85
86
87
    do {  \
        cvar_table_entry_t *cvar = LOOKUP_CVAR_BY_NAME(#name_); \
        *(out_ptr_) = cvar->defaultval.f; \
    } while (0)

88
#define MPIR_CVAR_GET_DEFAULT_STRING(name_,out_ptr_)   \
89
90
91
92
93
    do {  \
        cvar_table_entry_t *cvar = LOOKUP_CVAR_BY_NAME(#name_); \
        *(out_ptr_) = cvar->defaultval.str; \
    } while (0)

94
#define MPIR_CVAR_GET_DEFAULT_RANGE(name_,out_ptr_)   \
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
    do {  \
        cvar_table_entry_t *cvar = LOOKUP_CVAR_BY_NAME(#name_); \
        *(out_ptr_) = cvar->defaultval.range; \
    } while (0)

/* Register a static cvar. A static pvar has NO binding and its address
 * and count are known at registeration time.
 * Attention: name_ is a token not a string
*/
#define MPIR_T_CVAR_REGISTER_STATIC(dtype_, name_, addr_, count_, verb_, \
            scope_, default_, cat_, desc_) \
    do { \
        MPIU_Assert(count_ > 0); \
        MPIR_T_CVAR_REGISTER_impl(dtype_, #name_, addr_, count_, MPI_T_ENUM_NULL, \
            verb_, MPI_T_BIND_NO_OBJECT, scope_, NULL, NULL, default_, cat_, desc_); \
    } while (0)

/* Register a dynamic cvar, which may have object binding and whose
 * address and count may be unknown at registeration time. It is
 * developers' duty to provide self-contained arguments.
*/
#define MPIR_T_CVAR_REGISTER_DYNAMIC(dtype_, name_, addr_, count_, etype_, \
            verb_, bind_, scope_, get_addr_, get_count_, default_, cat_, desc_) \
    do { \
        MPIU_Assert(addr_ != NULL || get_addr_ != NULL); \
        MPIU_Assert(count_ > 0 || get_count_ != NULL); \
        MPIR_T_CVAR_REGISTER_impl(dtype_, #name_, addr_, count_, etype_, \
            verb_, bind_, scope_, get_addr_, get_count_, default_, cat_, desc_); \
    } while (0)

125
126
127
/* stmt_ is executed only when ENABLE_PVAR_#MODULE is defined as 1 */
#define MPIR_T_PVAR_STMT(MODULE, stmt_) \
    PVAR_GATED_ACTION(MODULE, stmt_)
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144

/* The following are interfaces for each pvar classe,
 * basically including delcaration, access and registeration.
 */

/* STATE */
#define MPIR_T_PVAR_INT_STATE_DECL(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_INT_STATE_DECL_impl(name_))

#define MPIR_T_PVAR_INT_STATE_DECL_STATIC(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_INT_STATE_DECL_STATIC_impl(name_))

#define MPIR_T_PVAR_INT_STATE_DECL_EXTERN(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_INT_STATE_DECL_EXTERN_impl(name_))

#define MPIR_T_PVAR_STATE_SET_VAR(MODULE, ptr_, val_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_STATE_SET_VAR_impl(ptr_, val_))
145
146
147
/* Not gated by MODULE, since it is supposed to be a rvalue */
#define MPIR_T_PVAR_STATE_GET_VAR(ptr_) \
    MPIR_T_PVAR_STATE_GET_VAR_impl(ptr_)
148
149
150

#define MPIR_T_PVAR_STATE_SET(MODULE, name_, val_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_STATE_SET_impl(name_, val_))
151
152
#define MPIR_T_PVAR_STATE_GET(name_) \
    MPIR_T_PVAR_STATE_GET_impl(name_)
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193

#define MPIR_T_PVAR_STATE_REGISTER_STATIC(MODULE, dtype_, name_, \
            initval_, etype_, verb_, bind_, flags_, cat_, desc_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_STATE_REGISTER_STATIC_impl(dtype_, name_, \
            initval_, etype_, verb_, bind_, flags_, cat_, desc_))

#define MPIR_T_PVAR_STATE_REGISTER_DYNAMIC(MODULE, dtype_, name_, \
            addr_, count_, etype_, verb_, bind_, flags_, get_value_, get_count_, cat_, desc_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_STATE_REGISTER_DYNAMIC_impl(dtype_, name_, \
            addr_, count_, etype_, verb_, bind_, flags_, get_value_, get_count_, cat_, desc_))

/* LEVEL */
#define MPIR_T_PVAR_UINT_LEVEL_DECL(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_UINT_LEVEL_DECL_impl(name_))
#define MPIR_T_PVAR_ULONG_LEVEL_DECL(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG_LEVEL_DECL_impl(name_))
#define MPIR_T_PVAR_ULONG2_LEVEL_DECL(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG2_LEVEL_DECL_impl(name_))
#define MPIR_T_PVAR_DOUBLE_LEVEL_DECL(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_DOUBLE_LEVEL_DECL_impl(name_))

#define MPIR_T_PVAR_UINT_LEVEL_DECL_STATIC(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_UINT_LEVEL_DECL_STATIC_impl(name_))
#define MPIR_T_PVAR_ULONG_LEVEL_DECL_STATIC(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG_LEVEL_DECL_STATIC_impl(name_))
#define MPIR_T_PVAR_ULONG2_LEVEL_DECL_STATIC(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG2_LEVEL_DECL_STATIC_impl(name_))
#define MPIR_T_PVAR_DOUBLE_LEVEL_DECL_STATIC(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_DOUBLE_LEVEL_DECL_STATIC_impl(name_))

#define MPIR_T_PVAR_UINT_LEVEL_DECL_EXTERN(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_UINT_LEVEL_DECL_EXTERN_impl(name_))
#define MPIR_T_PVAR_ULONG_LEVEL_DECL_EXTERN(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG_LEVEL_DECL_EXTERN_impl(name_))
#define MPIR_T_PVAR_ULONG2_LEVEL_DECL_EXTERN(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG2_LEVEL_DECL_EXTERN_impl(name_))
#define MPIR_T_PVAR_DOUBLE_LEVEL_DECL_EXTERN(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_DOUBLE_LEVEL_DECL_EXTERN_impl(name_))

#define MPIR_T_PVAR_LEVEL_SET_VAR(MODULE, ptr_, val_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_LEVEL_SET_VAR_impl(ptr_, val_))
194
195
#define MPIR_T_PVAR_LEVEL_GET_VAR(ptr_) \
    MPIR_T_PVAR_LEVEL_GET_VAR_impl(ptr_)
196
197
198
199
200
201
202
#define MPIR_T_PVAR_LEVEL_INC_VAR(MODULE, ptr_, val_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_LEVEL_INC_VAR_impl(ptr_, val_))
#define MPIR_T_PVAR_LEVEL_DEC_VAR(MODULE, ptr_, val_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_LEVEL_DEC_VAR_impl(ptr_, val_))

#define MPIR_T_PVAR_LEVEL_SET(MODULE, name_, val_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_LEVEL_SET_impl(name_, val_))
203
204
#define MPIR_T_PVAR_LEVEL_GET(name_) \
    MPIR_T_PVAR_LEVEL_GET_impl(name_)
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
#define MPIR_T_PVAR_LEVEL_INC(MODULE, name_, val_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_LEVEL_INC_impl(name_, val_))
#define MPIR_T_PVAR_LEVEL_DEC(MODULE, name_, val_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_LEVEL_DEC_impl(name_, val_))

#define MPIR_T_PVAR_LEVEL_REGISTER_STATIC(MODULE, dtype_, name_, \
            initval_, verb_, bind_, flags_, cat_, desc_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_LEVEL_REGISTER_STATIC_impl(dtype_, name_, \
            initval_, verb_, bind_, flags_, cat_, desc_))

#define MPIR_T_PVAR_LEVEL_REGISTER_DYNAMIC(MODULE, dtype_, name_, \
            addr_, count_, verb_, bind_, flags_, get_value_, get_count_, cat_, desc_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_LEVEL_REGISTER_DYNAMIC_impl(dtype_, name_, \
            addr_, count_, verb_, bind_, flags_, get_value_, get_count, cat_, desc_))

/* SIZE */
#define MPIR_T_PVAR_UINT_SIZE_DECL(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_UINT_SIZE_DECL_impl(name_))
#define MPIR_T_PVAR_ULONG_SIZE_DECL(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG_SIZE_DECL_impl(name_))
#define MPIR_T_PVAR_ULONG2_SIZE_DECL(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG2_SIZE_DECL_impl(name_))
#define MPIR_T_PVAR_DOUBLE_SIZE_DECL(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_DOUBLE_SIZE_DECL_impl(name_))

#define MPIR_T_PVAR_UINT_SIZE_DECL_STATIC(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_UINT_SIZE_DECL_STATIC_impl(name_))
#define MPIR_T_PVAR_ULONG_SIZE_DECL_STATIC(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG_SIZE_DECL_STATIC_impl(name_))
#define MPIR_T_PVAR_ULONG2_SIZE_DECL_STATIC(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG2_SIZE_DECL_STATIC_impl(name_))
#define MPIR_T_PVAR_DOUBLE_SIZE_DECL_STATIC(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_DOUBLE_SIZE_DECL_STATIC_impl(name_))

#define MPIR_T_PVAR_UINT_SIZE_DECL_EXTERN(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_UINT_SIZE_DECL_EXTERN_impl(name_))
#define MPIR_T_PVAR_ULONG_SIZE_DECL_EXTERN(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG_SIZE_DECL_EXTERN_impl(name_))
#define MPIR_T_PVAR_ULONG2_SIZE_DECL_EXTERN(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG2_SIZE_DECL_EXTERN_impl(name_))
#define MPIR_T_PVAR_DOUBLE_SIZE_DECL_EXTERN(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_DOUBLE_SIZE_DECL_EXTERN_impl(name_))

#define MPIR_T_PVAR_SIZE_SET_VAR(MODULE, ptr_, val_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_SIZE_SET_VAR_impl(ptr_, val_))
250
251
#define MPIR_T_PVAR_SIZE_GET_VAR(ptr_) \
    MPIR_T_PVAR_SIZE_GET_VAR_impl(ptr_)
252
253
254

#define MPIR_T_PVAR_SIZE_SET(MODULE, name_, val_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_SIZE_SET_impl(name_, val_))
255
256
#define MPIR_T_PVAR_SIZE_GET(name_) \
    MPIR_T_PVAR_SIZE_GET_impl(name_)
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280

#define MPIR_T_PVAR_SIZE_REGISTER_STATIC(MODULE, dtype_, name_, \
            initval_, verb_, bind_, flags_, cat_, desc_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_SIZE_REGISTER_STATIC_impl(dtype_, name_, \
            initval_, verb_, bind_, flags_, cat_, desc_))

#define MPIR_T_PVAR_SIZE_REGISTER_DYNAMIC(MODULE, dtype_, name_, \
            addr_, count_, verb_, bind_, flags_, get_value_, get_count_, cat_, desc_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_SIZE_REGISTER_DYNAMIC_impl(dtype_, name_, \
            addr_, count_, verb_, bind_, flags_, get_value_, get_count, cat_, desc_))

/* PERCENTAGE */
#define MPIR_T_PVAR_DOUBLE_PERCENTAGE_DECL(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_DOUBLE_PERCENTAGE_DECL_impl(name_))

#define MPIR_T_PVAR_DOUBLE_PERCENTAGE_DECL_STATIC(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_DOUBLE_PERCENTAGE_DECL_STATIC_impl(name_))

#define MPIR_T_PVAR_DOUBLE_PERCENTAGE_DECL_EXTERN(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_DOUBLE_PERCENTAGE_DECL_EXTERN_impl(name_))

#define MPIR_T_PVAR_PERCENTAGE_SET_VAR(MODULE, ptr_, val_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_PERCENTAGE_SET_VAR_impl(ptr_, val_))
#define MPIR_T_PVAR_PERCENTAGE_GET_VAR(MODULE, ptr_) \
281
    MPIR_T_PVAR_PERCENTAGE_GET_VAR_impl(ptr_)
282
283
284
285

#define MPIR_T_PVAR_PERCENTAGE_SET(MODULE, name_, val_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_PERCENTAGE_SET_impl(name_, val_))
#define MPIR_T_PVAR_PERCENTAGE_GET(MODULE, name_) \
286
    MPIR_T_PVAR_PERCENTAGE_GET_impl(name_)
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321

#define MPIR_T_PVAR_PERCENTAGE_REGISTER_STATIC(MODULE, dtype_, name_, \
            initval_, verb_, bind_, flags_, cat_, desc_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_PERCENTAGE_REGISTER_STATIC_impl(dtype_, name_, \
            initval_, verb_, bind_, flags_, cat_, desc_))

#define MPIR_T_PVAR_PERCENTAGE_REGISTER_DYNAMIC(MODULE, dtype_, name_, \
            addr_, count_, verb_, bind_, flags_, get_value_, get_count_, cat_, desc_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_PERCENTAGE_REGISTER_DYNAMIC_impl(dtype_, name_, \
            addr_, count_, verb_, bind_, flags_, get_value_, get_count, cat_, desc_))

/* COUNTER */
#define MPIR_T_PVAR_UINT_COUNTER_DECL(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_UINT_COUNTER_DECL_impl(name_))
#define MPIR_T_PVAR_ULONG_COUNTER_DECL(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG_COUNTER_DECL_impl(name_))
#define MPIR_T_PVAR_ULONG2_COUNTER_DECL(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG2_COUNTER_DECL_impl(name_))

#define MPIR_T_PVAR_UINT_COUNTER_DECL_STATIC(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_UINT_COUNTER_DECL_STATIC_impl(name_))
#define MPIR_T_PVAR_ULONG_COUNTER_DECL_STATIC(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG_COUNTER_DECL_STATIC_impl(name_))
#define MPIR_T_PVAR_ULONG2_COUNTER_DECL_STATIC(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG2_COUNTER_DECL_STATIC_impl(name_))

#define MPIR_T_PVAR_UINT_COUNTER_DECL_EXTERN(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_UINT_COUNTER_DECL_EXTERN_impl(name_))
#define MPIR_T_PVAR_ULONG_COUNTER_DECL_EXTERN(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG_COUNTER_DECL_EXTERN_impl(name_))
#define MPIR_T_PVAR_ULONG2_COUNTER_DECL_EXTERN(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG2_COUNTER_DECL_EXTERN_impl(name_))

#define MPIR_T_PVAR_COUNTER_INIT_VAR(MODULE, ptr_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_COUNTER_INIT_VAR_impl(ptr_))
322
323
#define MPIR_T_PVAR_COUNTER_GET_VAR(ptr_) \
    MPIR_T_PVAR_COUNTER_GET_VAR_impl(ptr_)
324
325
326
327
328
#define MPIR_T_PVAR_COUNTER_INC_VAR(MODULE, ptr_, inc_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_COUNTER_INC_VAR_impl(ptr_, inc_))

#define MPIR_T_PVAR_COUNTER_INIT(MODULE, name_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_COUNTER_INIT_impl(name_))
329
330
#define MPIR_T_PVAR_COUNTER_GET(name_) \
    MPIR_T_PVAR_COUNTER_GET_impl(name_)
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
#define MPIR_T_PVAR_COUNTER_INC(MODULE, name_, inc_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_COUNTER_INC_impl(name_, inc_))

#define MPIR_T_PVAR_COUNTER_REGISTER_STATIC(MODULE, dtype_, name_, \
            verb_, bind_, flags_, cat_, desc_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_COUNTER_REGISTER_STATIC_impl(dtype_, name_, \
            verb_, bind_, flags_, cat_, desc_))

#define MPIR_T_PVAR_COUNTER_REGISTER_DYNAMIC(MODULE, dtype_, name_, \
            addr_, count_, verb_, bind_, flags_, get_value_, get_count_, cat_, desc_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_COUNTER_REGISTER_DYNAMIC_impl(dtype_, name_, \
            addr_, count_, verb_, bind_, flags_, get_value_, get_count_, cat_, desc_))

/* COUNTER ARRAY for user's convenience */
#define MPIR_T_PVAR_UINT_COUNTER_ARRAY_DECL(MODULE, name_, len_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_UINT_COUNTER_ARRAY_DECL_impl(name_, len_))
#define MPIR_T_PVAR_ULONG_COUNTER_ARRAY_DECL(MODULE, name_, len_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_ULONG_COUNTER_ARRAY_DECL_impl(name_, len_))
#define MPIR_T_PVAR_ULONG2_COUNTER_ARRAY_DECL(MODULE, name_, len_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_ULONG2_COUNTER_ARRAY_DECL_impl(name_, len_))

#define MPIR_T_PVAR_UINT_COUNTER_ARRAY_DECL_STATIC(MODULE, name_, len_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_UINT_COUNTER_ARRAY_DECL_STATIC_impl(name_, len_))
#define MPIR_T_PVAR_ULONG_COUNTER_ARRAY_DECL_STATIC(MODULE, name_, len_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_ULONG_COUNTER_ARRAY_DECL_STATIC_impl(name_, len_))
#define MPIR_T_PVAR_ULONG2_COUNTER_ARRAY_DECL_STATIC(MODULE, name_, len_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_ULONG2_COUNTER_ARRAY_DECL_STATIC_impl(name_, len_))

#define MPIR_T_PVAR_UINT_COUNTER_ARRAY_DECL_EXTERN(MODULE, name_, len_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_UINT_COUNTER_ARRAY_DECL_EXTERN_impl(name_, len_))
#define MPIR_T_PVAR_ULONG_COUNTER_ARRAY_DECL_EXTERN(MODULE, name_, len_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_ULONG_COUNTER_ARRAY_DECL_EXTERN_impl(name_, len_))
#define MPIR_T_PVAR_ULONG2_COUNTER_ARRAY_DECL_EXTERN(MODULE, name_, len_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_ULONG2_COUNTER_ARRAY_DECL_EXTERN_impl(name_, len_))

#define MPIR_T_PVAR_COUNTER_ARRAY_INIT_VAR(MODULE, ptr_, count_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_COUNTER_ARRAY_INIT_VAR_impl(ptr_, count_))
368
369
#define MPIR_T_PVAR_COUNTER_ARRAY_GET_VAR(ptr_, idx_) \
    MPIR_T_PVAR_COUNTER_ARRAY_GET_VAR_impl(ptr_, idx_)
370
371
372
373
374
#define MPIR_T_PVAR_COUNTER_ARRAY_INC_VAR(MODULE, ptr_, idx_, inc_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_COUNTER_ARRAY_INC_VAR_impl(ptr_, idx_, inc_))

#define MPIR_T_PVAR_COUNTER_ARRAY_INIT(MODULE, name_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_COUNTER_ARRAY_INIT_impl(name_))
375
376
#define MPIR_T_PVAR_COUNTER_ARRAY_GET(name_, idx_) \
    MPIR_T_PVAR_COUNTER_ARRAY_GET_impl(name_, idx_)
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
#define MPIR_T_PVAR_COUNTER_ARRAY_INC(MODULE, ptr_, idx_, inc_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_COUNTER_ARRAY_INC_impl(ptr_, idx_, inc_))

#define MPIR_T_PVAR_COUNTER_ARRAY_REGISTER_STATIC(MODULE, dtype_, name_, \
            verb_, bind_, flags_, cat_, desc_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_COUNTER_ARRAY_REGISTER_STATIC_impl(dtype_, name_, \
            verb_, bind_, flags_, cat_, desc_))

/* ARRGEGATE */
#define MPIR_T_PVAR_UINT_AGGREGATE_DECL(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_UINT_AGGREGATE_DECL_impl(name_))
#define MPIR_T_PVAR_ULONG_AGGREGATE_DECL(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG_AGGREGATE_DECL_impl(name_))
#define MPIR_T_PVAR_ULONG2_AGGREGATE_DECL(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG2_AGGREGATE_DECL_impl(name_))
#define MPIR_T_PVAR_ULONG2_AGGREGATE_DECL(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG2_AGGREGATE_DECL_impl(name_))

#define MPIR_T_PVAR_UINT_AGGREGATE_DECL_STATIC(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_UINT_AGGREGATE_DECL_STATIC_impl(name_))
#define MPIR_T_PVAR_ULONG_AGGREGATE_DECL_STATIC(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG_AGGREGATE_DECL_STATIC_impl(name_))
#define MPIR_T_PVAR_ULONG2_AGGREGATE_DECL_STATIC(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG2_AGGREGATE_DECL_STATIC_impl(name_))
#define MPIR_T_PVAR_ULONG2_AGGREGATE_DECL_STATIC(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG2_AGGREGATE_DECL_STATIC_impl(name_))

#define MPIR_T_PVAR_UINT_AGGREGATE_DECL_EXTERN(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_UINT_AGGREGATE_DECL_EXTERN_impl(name_))
#define MPIR_T_PVAR_ULONG_AGGREGATE_DECL_EXTERN(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG_AGGREGATE_DECL_EXTERN_impl(name_))
#define MPIR_T_PVAR_ULONG2_AGGREGATE_DECL_EXTERN(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG2_AGGREGATE_DECL_EXTERN_impl(name_))
#define MPIR_T_PVAR_ULONG2_AGGREGATE_DECL_EXTERN(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG2_AGGREGATE_DECL_EXTERN_impl(name_))

#define MPIR_T_PVAR_AGGREGATE_INIT_VAR(MODULE, ptr_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_AGGREGATE_INIT_VAR_impl(ptr_))
415
416
#define MPIR_T_PVAR_AGGREGATE_GET_VAR(ptr_) \
    MPIR_T_PVAR_AGGREGATE_GET_VAR_impl(ptr_)
417
418
419
420
421
#define MPIR_T_PVAR_AGGREGATE_INC_VAR(MODULE, ptr_, inc_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_AGGREGATE_INC_VAR_impl(ptr_, inc_))

#define MPIR_T_PVAR_AGGREGATE_INIT(MODULE, name_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_AGGREGATE_INIT_impl(name_))
422
423
#define MPIR_T_PVAR_AGGREGATE_GET(name_) \
    MPIR_T_PVAR_AGGREGATE_GET_impl(name_)
424
425
426
427
428
429
430
431
432
433
434
435
436
437
#define MPIR_T_PVAR_AGGREGATE_INC(MODULE, name_, inc_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_AGGREGATE_INC_impl(name_, inc_))

#define MPIR_T_PVAR_AGGREGATE_REGISTER_STATIC(MODULE, dtype_, name_, \
            verb_, bind_, flags_, cat_, desc_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_AGGREGATE_REGISTER_STATIC_impl(dtype_, name_, \
            verb_, bind_, flags_, cat_, desc_))

#define MPIR_T_PVAR_AGGREGATE_REGISTER_DYNAMIC(MODULE, dtype_, name_, \
            addr_, count_, verb_, bind_, flags_, get_value_, get_count_, cat_, desc_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_AGGREGATE_REGISTER_DYNAMIC_impl(dtype_, name_, \
            addr_, count_, verb_, bind_, flags_, get_value_, get_count_, cat_, desc_))

/* TIMER */
438
439
440
441
442
443
444

/* A timer actually has a twin, i.e., a counter, which counts how many times
 the timer is started/stopped so that we could know the average time
 for events measured. In our impl, the twins are exposed to MPI_T through the
 same name, but in two MPI_T_PVAR classes (timer and counter) and two data types
 (double and unsigned long long) respectively.
*/
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
#define MPIR_T_PVAR_DOUBLE_TIMER_DECL(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_DOUBLE_TIMER_DECL_impl(name_))

#define MPIR_T_PVAR_DOUBLE_TIMER_DECL_STATIC(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_DOUBLE_TIMER_DECL_STATIC_impl(name_))

#define MPIR_T_PVAR_DOUBLE_TIMER_DECL_EXTERN(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_DOUBLE_TIMER_DECL_EXTERN_impl(name_))

#define MPIR_T_PVAR_TIMER_INIT_VAR(MODULE, ptr_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_TIMER_INIT_VAR_impl(ptr_))
#define MPIR_T_PVAR_TIMER_GET_VAR(MODULE, ptr_, buf) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_TIMER_GET_VAR_impl(ptr_, buf))
#define MPIR_T_PVAR_TIMER_START_VAR(MODULE, ptr_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_TIMER_START_VAR_impl(ptr_))
#define MPIR_T_PVAR_TIMER_END_VAR(MODULE, ptr_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_TIMER_END_VAR_impl(ptr_))

#define MPIR_T_PVAR_TIMER_INIT(MODULE, name_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_TIMER_INIT_impl(name_))
#define MPIR_T_PVAR_TIMER_GET(MODULE, name_, buf_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_TIMER_GET_impl(name_, buf_))
#define MPIR_T_PVAR_TIMER_START(MODULE, name_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_TIMER_START_impl(name_))
#define MPIR_T_PVAR_TIMER_END(MODULE, name_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_TIMER_END_impl(name_))

472
/* This macro actually register twins of a timer and a counter to MPIR_T */
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
#define MPIR_T_PVAR_TIMER_REGISTER_STATIC(MODULE, dtype_, name_, \
            verb_, bind_, flags_, cat_, desc_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_TIMER_REGISTER_STATIC_impl(dtype_, name_, \
            verb_, bind_, flags_, cat_, desc_))

/* HIGHWATERMARK */
#define MPIR_T_PVAR_UINT_HIGHWATERMARK_DECL(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_UINT_HIGHWATERMARK_DECL_impl(name_))
#define MPIR_T_PVAR_ULONG_HIGHWATERMARK_DECL(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG_HIGHWATERMARK_DECL_impl(name_))
#define MPIR_T_PVAR_ULONG2_HIGHWATERMARK_DECL(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG2_HIGHWATERMARK_DECL_impl(name_))
#define MPIR_T_PVAR_DOUBLE_HIGHWATERMARK_DECL(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_DOUBLE_HIGHWATERMARK_DECL_impl(name_))

#define MPIR_T_PVAR_UINT_HIGHWATERMARK_DECL_STATIC(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_UINT_HIGHWATERMARK_DECL_STATIC_impl(name_))
#define MPIR_T_PVAR_ULONG_HIGHWATERMARK_DECL_STATIC(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG_HIGHWATERMARK_DECL_STATIC_impl(name_))
#define MPIR_T_PVAR_ULONG2_HIGHWATERMARK_DECL_STATIC(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG2_HIGHWATERMARK_DECL_STATIC_impl(name_))
#define MPIR_T_PVAR_DOUBLE_HIGHWATERMARK_DECL_STATIC(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_DOUBLE_HIGHWATERMARK_DECL_STATIC_impl(name_))

#define MPIR_T_PVAR_UINT_HIGHWATERMARK_DECL_EXTERN(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_UINT_HIGHWATERMARK_DECL_EXTERN_impl(name_))
#define MPIR_T_PVAR_ULONG_HIGHWATERMARK_DECL_EXTERN(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG_HIGHWATERMARK_DECL_EXTERN_impl(name_))
#define MPIR_T_PVAR_ULONG2_HIGHWATERMARK_DECL_EXTERN(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG2_HIGHWATERMARK_DECL_EXTERN_impl(name_))
#define MPIR_T_PVAR_DOUBLE_HIGHWATERMARK_DECL_EXTERN(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_DOUBLE_HIGHWATERMARK_DECL_EXTERN_impl(name_))

/* Embed type names in watermark operations because these operations need to
   know types of watermark to work, however we can't use typeof(ptr_) in C.
 */
#define MPIR_T_PVAR_UINT_HIGHWATERMARK_INIT_VAR(MODULE, ptr_, val_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_UINT_HIGHWATERMARK_INIT_VAR_impl(ptr_, val_))
#define MPIR_T_PVAR_ULONG_HIGHWATERMARK_INIT_VAR(MODULE, ptr_, val_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_ULONG_HIGHWATERMARK_INIT_VAR_impl(ptr_, val_))
#define MPIR_T_PVAR_ULONG2_HIGHWATERMARK_INIT_VAR(MODULE, ptr_, val_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_ULONG2_HIGHWATERMARK_INIT_VAR_impl(ptr_, val_))
#define MPIR_T_PVAR_DOUBLE_HIGHWATERMARK_INIT_VAR(MODULE, ptr_, val_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_DOUBLE_HIGHWATERMARK_INIT_VAR_impl(ptr_, val_))

#define MPIR_T_PVAR_UINT_HIGHWATERMARK_UPDATE_VAR(MODULE, ptr_, val_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_UINT_HIGHWATERMARK_UPDATE_VAR_impl(ptr_, val_))
#define MPIR_T_PVAR_ULONG_HIGHWATERMARK_UPDATE_VAR(MODULE, ptr_, val_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_ULONG_HIGHWATERMARK_UPDATE_VAR_impl(ptr_, val_))
#define MPIR_T_PVAR_ULONG2_HIGHWATERMARK_UPDATE_VAR(MODULE, ptr_, val_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_ULONG2_HIGHWATERMARK_UPDATE_VAR_impl(ptr_, val_))
#define MPIR_T_PVAR_DOUBLE_HIGHWATERMARK_UPDATE_VAR(MODULE, ptr_, val_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_DOUBLE_HIGHWATERMARK_UPDATE_VAR_impl(ptr_, val_))

#define MPIR_T_PVAR_UINT_HIGHWATERMARK_INIT(MODULE, name_, val_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_UINT_HIGHWATERMARK_INIT_impl(name_, val_))
#define MPIR_T_PVAR_ULONG_HIGHWATERMARK_INIT(MODULE, name_, val_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_ULONG_HIGHWATERMARK_INIT_impl(name_, val_))
#define MPIR_T_PVAR_ULONG2_HIGHWATERMARK_INIT(MODULE, name_, val_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_ULONG2_HIGHWATERMARK_INIT_impl(name_, val_))
#define MPIR_T_PVAR_DOUBLE_HIGHWATERMARK_INIT(MODULE, name_, val_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_DOUBLE_HIGHWATERMARK_INIT_impl(name_, val_))

#define MPIR_T_PVAR_UINT_HIGHWATERMARK_UPDATE(MODULE, name_, val_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_UINT_HIGHWATERMARK_UPDATE_impl(name_, val_))
#define MPIR_T_PVAR_ULONG_HIGHWATERMARK_UPDATE(MODULE, name_, val_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_ULONG_HIGHWATERMARK_UPDATE_impl(name_, val_))
#define MPIR_T_PVAR_ULONG2_HIGHWATERMARK_UPDATE(MODULE, name_, val_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_ULONG2_HIGHWATERMARK_UPDATE_impl(name_, val_))
#define MPIR_T_PVAR_DOUBLE_HIGHWATERMARK_UPDATE(MODULE, name_, val_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_DOUBLE_HIGHWATERMARK_UPDATE_impl(name_, val_))

#define MPIR_T_PVAR_HIGHWATERMARK_REGISTER_STATIC(MODULE, dtype_, \
            name_, initval_, verb_, bind_, flags_, cat_, desc_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_HIGHWATERMARK_REGISTER_STATIC_impl(dtype_, name_, \
            initval_, verb_, bind_, flags_, cat_, desc_))

#define MPIR_T_PVAR_HIGHWATERMARK_REGISTER_DYNAMIC(MODULE, dtype_, name_, \
            addr_, count_, verb_, bind_, flags_, get_value_, get_count_, cat_, desc_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_HIGHWATERMARK_REGISTER_DYNAMIC_impl(dtype_, name_, \
            addr_, count_, verb_, bind_, flags_, get_value_, get_count_, cat_, desc_))

/* LOWWATERMARK */
#define MPIR_T_PVAR_UINT_LOWWATERMARK_DECL(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_UINT_LOWWATERMARK_DECL_impl(name_))
#define MPIR_T_PVAR_ULONG_LOWWATERMARK_DECL(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG_LOWWATERMARK_DECL_impl(name_))
#define MPIR_T_PVAR_ULONG2_LOWWATERMARK_DECL(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG2_LOWWATERMARK_DECL_impl(name_))
#define MPIR_T_PVAR_DOUBLE_LOWWATERMARK_DECL(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_DOUBLE_LOWWATERMARK_DECL_impl(name_))

#define MPIR_T_PVAR_UINT_LOWWATERMARK_DECL_STATIC(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_UINT_LOWWATERMARK_DECL_STATIC_impl(name_))
#define MPIR_T_PVAR_ULONG_LOWWATERMARK_DECL_STATIC(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG_LOWWATERMARK_DECL_STATIC_impl(name_))
#define MPIR_T_PVAR_ULONG2_LOWWATERMARK_DECL_STATIC(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG2_LOWWATERMARK_DECL_STATIC_impl(name_))
#define MPIR_T_PVAR_DOUBLE_LOWWATERMARK_DECL_STATIC(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_DOUBLE_LOWWATERMARK_DECL_STATIC_impl(name_))

#define MPIR_T_PVAR_UINT_LOWWATERMARK_DECL_EXTERN(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_UINT_LOWWATERMARK_DECL_EXTERN_impl(name_))
#define MPIR_T_PVAR_ULONG_LOWWATERMARK_DECL_EXTERN(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG_LOWWATERMARK_DECL_EXTERN_impl(name_))
#define MPIR_T_PVAR_ULONG2_LOWWATERMARK_DECL_EXTERN(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG2_LOWWATERMARK_DECL_EXTERN_impl(name_))
#define MPIR_T_PVAR_DOUBLE_LOWWATERMARK_DECL_EXTERN(MODULE, name_) \
    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_DOUBLE_LOWWATERMARK_DECL_EXTERN_impl(name_))

#define MPIR_T_PVAR_UINT_LOWWATERMARK_INIT_VAR(MODULE, ptr_, val_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_UINT_LOWWATERMARK_INIT_VAR_impl(ptr_, val_))
#define MPIR_T_PVAR_ULONG_LOWWATERMARK_INIT_VAR(MODULE, ptr_, val_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_ULONG_LOWWATERMARK_INIT_VAR_impl(ptr_, val_))
#define MPIR_T_PVAR_ULONG2_LOWWATERMARK_INIT_VAR(MODULE, ptr_, val_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_ULONG2_LOWWATERMARK_INIT_VAR_impl(ptr_, val_))
#define MPIR_T_PVAR_DOUBLE_LOWWATERMARK_INIT_VAR(MODULE, ptr_, val_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_DOUBLE_LOWWATERMARK_INIT_VAR_impl(ptr_, val_))

#define MPIR_T_PVAR_UINT_LOWWATERMARK_UPDATE_VAR(MODULE, ptr_, val_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_UINT_LOWWATERMARK_UPDATE_VAR_impl(ptr_, val_))
#define MPIR_T_PVAR_ULONG_LOWWATERMARK_UPDATE_VAR(MODULE, ptr_, val_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_ULONG_LOWWATERMARK_UPDATE_VAR_impl(ptr_, val_))
#define MPIR_T_PVAR_ULONG2_LOWWATERMARK_UPDATE_VAR(MODULE, ptr_, val_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_ULONG2_LOWWATERMARK_UPDATE_VAR_impl(ptr_, val_))
#define MPIR_T_PVAR_DOUBLE_LOWWATERMARK_UPDATE_VAR(MODULE, ptr_, val_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_DOUBLE_LOWWATERMARK_UPDATE_VAR_impl(ptr_, val_))

#define MPIR_T_PVAR_UINT_LOWWATERMARK_INIT(MODULE, name_, val_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_UINT_LOWWATERMARK_INIT_impl(name_, val_))
#define MPIR_T_PVAR_ULONG_LOWWATERMARK_INIT(MODULE, name_, val_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_ULONG_LOWWATERMARK_INIT_impl(name_, val_))
#define MPIR_T_PVAR_ULONG2_LOWWATERMARK_INIT(MODULE, name_, val_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_ULONG2_LOWWATERMARK_INIT_impl(name_, val_))
#define MPIR_T_PVAR_DOUBLE_LOWWATERMARK_INIT(MODULE, name_, val_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_DOUBLE_LOWWATERMARK_INIT_impl(name_, val_))

#define MPIR_T_PVAR_UINT_LOWWATERMARK_UPDATE(MODULE, name_, val_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_UINT_LOWWATERMARK_UPDATE_impl(name_, val_))
#define MPIR_T_PVAR_ULONG_LOWWATERMARK_UPDATE(MODULE, name_, val_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_ULONG_LOWWATERMARK_UPDATE_impl(name_, val_))
#define MPIR_T_PVAR_ULONG2_LOWWATERMARK_UPDATE(MODULE, name_, val_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_ULONG2_LOWWATERMARK_UPDATE_impl(name_, val_))
#define MPIR_T_PVAR_DOUBLE_LOWWATERMARK_UPDATE(MODULE, name_, val_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_DOUBLE_LOWWATERMARK_UPDATE_impl(name_, val_))

#define MPIR_T_PVAR_LOWWATERMARK_REGISTER_STATIC(MODULE, dtype_, name_, \
            initval_, verb_, bind_, flags_, cat_, desc_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_LOWWATERMARK_REGISTER_STATIC_impl(dtype_, name_, \
            initval_, verb_, bind_, flags_, cat_, desc_))

#define MPIR_T_PVAR_LOWWATERMARK_REGISTER_DYNAMIC(MODULE, dtype_, name_, \
            addr_, count_, verb_, bind_, flags_, get_value_, get_count_, cat_, desc_) \
    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_LOWWATERMARK_REGISTER_DYNAMIC_impl(dtype_, name_, \
            addr_, count_, verb_, bind_, flags_, get_value_, get_count_, cat_, desc_))
#endif