This source file includes following definitions.
- mca_io_base_register_datarep
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 #include "ompi_config.h"
23
24 #include "opal/mca/base/base.h"
25 #include "opal/class/opal_list.h"
26 #include "ompi/constants.h"
27 #include "ompi/mca/io/io.h"
28 #include "ompi/mca/io/base/base.h"
29
30
31 int
32 mca_io_base_register_datarep(const char *datarep,
33 MPI_Datarep_conversion_function* read_fn,
34 MPI_Datarep_conversion_function* write_fn,
35 MPI_Datarep_extent_function* extent_fn,
36 void* state)
37 {
38 mca_base_component_list_item_t *cli;
39 const mca_base_component_t *component;
40 const mca_io_base_component_2_0_0_t *v200;
41 int tmp, ret = OMPI_SUCCESS;
42
43
44
45
46 OPAL_LIST_FOREACH(cli, &ompi_io_base_framework.framework_components, mca_base_component_list_item_t) {
47 component = cli->cli_component;
48
49
50 if (component->mca_type_major_version == 2 &&
51 component->mca_type_minor_version == 0 &&
52 component->mca_type_release_version == 0) {
53 v200 = (mca_io_base_component_2_0_0_t *) component;
54
55
56 tmp = v200->io_register_datarep(datarep, read_fn, write_fn,
57 extent_fn, state);
58 ret = (ret == OMPI_SUCCESS) ? tmp : ret;
59 }
60 }
61
62 return ret;
63 }
64