File: osc_monitoring_template.h

package info (click to toggle)
openmpi 5.0.7-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 202,312 kB
  • sloc: ansic: 612,441; makefile: 42,495; sh: 11,230; javascript: 9,244; f90: 7,052; java: 6,404; perl: 5,154; python: 1,856; lex: 740; fortran: 61; cpp: 20; tcl: 12
file content (55 lines) | stat: -rw-r--r-- 2,627 bytes parent folder | download | duplicates (2)
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
53
54
55
/*
 * Copyright (c) 2016-2017 Inria.  All rights reserved.
 * Copyright (c) 2017      Amazon.com, Inc. or its affiliates.  All Rights
 *                         reserved.
 * Copyright (c) 2019      Research Organization for Information Science
 *                         and Technology (RIST).  All rights reserved.
 * $COPYRIGHT$
 *
 * Additional copyrights may follow
 *
 * $HEADER$
 */

#ifndef MCA_OSC_MONITORING_TEMPLATE_H
#define MCA_OSC_MONITORING_TEMPLATE_H

#include "ompi_config.h"
#include "ompi/communicator/communicator.h"
#include "ompi/win/win.h"
#include "opal/sys/atomic.h"
#include "osc_monitoring_accumulate.h"
#include "osc_monitoring_active_target.h"
#include "osc_monitoring_comm.h"
#include "osc_monitoring_dynamic.h"
#include "osc_monitoring_module.h"
#include "osc_monitoring_passive_target.h"

/* The magic used here is that for a given module type (given with the
 * {template} parameter), we generate a set of every functions defined
 * in ompi_osc_base_module_t, the ompi_osc_monitoring_module_##
 * template ##_template variable recording the original set of
 * functions, and the generated set of functions is recorded as a
 * static variable inside the initialization function. When a function
 * is called from the original module, we route the call to our
 * generated function that does the monitoring, and then we call the
 * original function that had been saved in the
 * ompi_osc_monitoring_module_## template ##_template variable.
 */
#define OSC_MONITORING_MODULE_TEMPLATE_GENERATE(template)               \
    /* Generate the proper symbol for the                               \
       ompi_osc_monitoring_module_## template ##_template variable */   \
    OMPI_OSC_MONITORING_MODULE_GENERATE(template)                       \
    /* Generate each module specific functions */                       \
    OSC_MONITORING_GENERATE_TEMPLATE_ACCUMULATE(template)               \
    OSC_MONITORING_GENERATE_TEMPLATE_ACTIVE_TARGET(template)            \
    OSC_MONITORING_GENERATE_TEMPLATE_COMM(template)                     \
    OSC_MONITORING_GENERATE_TEMPLATE_DYNAMIC(template)                  \
    OSC_MONITORING_GENERATE_TEMPLATE_MODULE(template)                   \
    OSC_MONITORING_GENERATE_TEMPLATE_PASSIVE_TARGET(template)           \
    /* Generate template specific module initialization function:       \
     * ompi_osc_monitoring_## template ##_set_template(ompi_osc_base_module_t*module) \
     */                                                                 \
    MCA_OSC_MONITORING_MODULE_TEMPLATE_GENERATE(template)

#endif /* MCA_OSC_MONITORING_TEMPLATE_H */