This source file includes following definitions.
- gpusm_open
- gpusm_register
- gpusm_close
- gpusm_init
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 #define OPAL_DISABLE_ENABLE_MEM_DEBUG 1
27 #include "opal_config.h"
28 #include "opal/mca/base/base.h"
29 #include "rcache_gpusm.h"
30 #ifdef HAVE_UNISTD_H
31 #include <unistd.h>
32 #endif
33 #ifdef HAVE_MALLOC_H
34 #include <malloc.h>
35 #endif
36
37
38
39
40 static int gpusm_open(void);
41 static int gpusm_close(void);
42 static int gpusm_register(void);
43 static mca_rcache_base_module_t* gpusm_init(struct mca_rcache_base_resources_t* resources);
44
45 mca_rcache_gpusm_component_t mca_rcache_gpusm_component = {
46 {
47
48
49
50 .rcache_version = {
51 MCA_RCACHE_BASE_VERSION_3_0_0,
52
53 .mca_component_name = "gpusm",
54 MCA_BASE_MAKE_VERSION(component, OPAL_MAJOR_VERSION, OPAL_MINOR_VERSION,
55 OPAL_RELEASE_VERSION),
56 .mca_open_component = gpusm_open,
57 .mca_close_component = gpusm_close,
58 .mca_register_component_params = gpusm_register,
59 },
60 .rcache_data = {
61
62 MCA_BASE_METADATA_PARAM_CHECKPOINT
63 },
64
65 .rcache_init = gpusm_init,
66 }
67 };
68
69
70
71
72
73 static int gpusm_open(void)
74 {
75 return OPAL_SUCCESS;
76 }
77
78
79 static int gpusm_register(void)
80 {
81 return OPAL_SUCCESS;
82 }
83
84
85 static int gpusm_close(void)
86 {
87 return OPAL_SUCCESS;
88 }
89
90
91 static mca_rcache_base_module_t* gpusm_init(struct mca_rcache_base_resources_t *resources)
92 {
93 mca_rcache_gpusm_module_t* rcache_module;
94
95 (void) resources;
96
97 rcache_module = (mca_rcache_gpusm_module_t *) calloc (1, sizeof (*rcache_module));
98 if (NULL == rcache_module) {
99 return NULL;
100 }
101
102 mca_rcache_gpusm_module_init(rcache_module);
103
104 return &rcache_module->super;
105 }