Skip to content

Commit 2806504

Browse files
author
Sergey Oblomov
committed
PML/SPML/UCX: init global objects using C99 style
- to avoid value mix used C99 style of object initializations Signed-off-by: Sergey Oblomov <sergeyo@mellanox.com>
1 parent 99ad8d4 commit 2806504

File tree

2 files changed

+59
-59
lines changed

2 files changed

+59
-59
lines changed

ompi/mca/pml/ucx/pml_ucx.c

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -49,33 +49,33 @@
4949
#define MODEX_KEY "pml-ucx"
5050

5151
mca_pml_ucx_module_t ompi_pml_ucx = {
52-
{
53-
mca_pml_ucx_add_procs,
54-
mca_pml_ucx_del_procs,
55-
mca_pml_ucx_enable,
56-
NULL,
57-
mca_pml_ucx_add_comm,
58-
mca_pml_ucx_del_comm,
59-
mca_pml_ucx_irecv_init,
60-
mca_pml_ucx_irecv,
61-
mca_pml_ucx_recv,
62-
mca_pml_ucx_isend_init,
63-
mca_pml_ucx_isend,
64-
mca_pml_ucx_send,
65-
mca_pml_ucx_iprobe,
66-
mca_pml_ucx_probe,
67-
mca_pml_ucx_start,
68-
mca_pml_ucx_improbe,
69-
mca_pml_ucx_mprobe,
70-
mca_pml_ucx_imrecv,
71-
mca_pml_ucx_mrecv,
72-
mca_pml_ucx_dump,
73-
NULL, /* FT */
74-
1ul << (PML_UCX_CONTEXT_BITS),
75-
1ul << (PML_UCX_TAG_BITS - 1),
52+
.super = {
53+
.pml_add_procs = mca_pml_ucx_add_procs,
54+
.pml_del_procs = mca_pml_ucx_del_procs,
55+
.pml_enable = mca_pml_ucx_enable,
56+
.pml_progress = NULL,
57+
.pml_add_comm = mca_pml_ucx_add_comm,
58+
.pml_del_comm = mca_pml_ucx_del_comm,
59+
.pml_irecv_init = mca_pml_ucx_irecv_init,
60+
.pml_irecv = mca_pml_ucx_irecv,
61+
.pml_recv = mca_pml_ucx_recv,
62+
.pml_isend_init = mca_pml_ucx_isend_init,
63+
.pml_isend = mca_pml_ucx_isend,
64+
.pml_send = mca_pml_ucx_send,
65+
.pml_iprobe = mca_pml_ucx_iprobe,
66+
.pml_probe = mca_pml_ucx_probe,
67+
.pml_start = mca_pml_ucx_start,
68+
.pml_improbe = mca_pml_ucx_improbe,
69+
.pml_mprobe = mca_pml_ucx_mprobe,
70+
.pml_imrecv = mca_pml_ucx_imrecv,
71+
.pml_mrecv = mca_pml_ucx_mrecv,
72+
.pml_dump = mca_pml_ucx_dump,
73+
.pml_ft_event = NULL,
74+
.pml_max_contextid = 1ul << (PML_UCX_CONTEXT_BITS),
75+
.pml_max_tag = 1ul << (PML_UCX_TAG_BITS - 1)
7676
},
77-
NULL, /* ucp_context */
78-
NULL /* ucp_worker */
77+
.ucp_context = NULL,
78+
.ucp_worker = NULL
7979
};
8080

8181
#define PML_UCX_REQ_ALLOCA() \

oshmem/mca/spml/ucx/spml_ucx.c

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -48,47 +48,47 @@ static
4848
spml_ucx_mkey_t * mca_spml_ucx_get_mkey_slow(int pe, void *va, void **rva);
4949

5050
mca_spml_ucx_t mca_spml_ucx = {
51-
{
51+
.super = {
5252
/* Init mca_spml_base_module_t */
53-
mca_spml_ucx_add_procs,
54-
mca_spml_ucx_del_procs,
55-
mca_spml_ucx_enable,
56-
mca_spml_ucx_register,
57-
mca_spml_ucx_deregister,
58-
mca_spml_base_oob_get_mkeys,
59-
mca_spml_ucx_ctx_create,
60-
mca_spml_ucx_ctx_destroy,
61-
mca_spml_ucx_put,
62-
mca_spml_ucx_put_nb,
63-
mca_spml_ucx_get,
64-
mca_spml_ucx_get_nb,
65-
mca_spml_ucx_recv,
66-
mca_spml_ucx_send,
67-
mca_spml_base_wait,
68-
mca_spml_base_wait_nb,
69-
mca_spml_base_test,
70-
mca_spml_ucx_fence,
71-
mca_spml_ucx_quiet,
72-
mca_spml_ucx_rmkey_unpack,
73-
mca_spml_ucx_rmkey_free,
74-
mca_spml_ucx_rmkey_ptr,
75-
mca_spml_ucx_memuse_hook,
76-
(void*)&mca_spml_ucx
53+
.spml_add_procs = mca_spml_ucx_add_procs,
54+
.spml_del_procs = mca_spml_ucx_del_procs,
55+
.spml_enable = mca_spml_ucx_enable,
56+
.spml_register = mca_spml_ucx_register,
57+
.spml_deregister = mca_spml_ucx_deregister,
58+
.spml_oob_get_mkeys = mca_spml_base_oob_get_mkeys,
59+
.spml_ctx_create = mca_spml_ucx_ctx_create,
60+
.spml_ctx_destroy = mca_spml_ucx_ctx_destroy,
61+
.spml_put = mca_spml_ucx_put,
62+
.spml_put_nb = mca_spml_ucx_put_nb,
63+
.spml_get = mca_spml_ucx_get,
64+
.spml_get_nb = mca_spml_ucx_get_nb,
65+
.spml_recv = mca_spml_ucx_recv,
66+
.spml_send = mca_spml_ucx_send,
67+
.spml_wait = mca_spml_base_wait,
68+
.spml_wait_nb = mca_spml_base_wait_nb,
69+
.spml_test = mca_spml_base_test,
70+
.spml_fence = mca_spml_ucx_fence,
71+
.spml_quiet = mca_spml_ucx_quiet,
72+
.spml_rmkey_unpack = mca_spml_ucx_rmkey_unpack,
73+
.spml_rmkey_free = mca_spml_ucx_rmkey_free,
74+
.spml_rmkey_ptr = mca_spml_ucx_rmkey_ptr,
75+
.spml_memuse_hook = mca_spml_ucx_memuse_hook,
76+
.self = (void*)&mca_spml_ucx
7777
},
7878

79-
NULL, /* ucp_context */
80-
1, /* num_disconnect */
81-
0, /* heap_reg_nb */
82-
0, /* enabled */
83-
mca_spml_ucx_get_mkey_slow
79+
.ucp_context = NULL,
80+
.num_disconnect = 1,
81+
.heap_reg_nb = 0,
82+
.enabled = 0,
83+
.get_mkey_slow = mca_spml_ucx_get_mkey_slow
8484
};
8585

8686
OBJ_CLASS_INSTANCE(mca_spml_ucx_ctx_list_item_t, opal_list_item_t, NULL, NULL);
8787

8888
mca_spml_ucx_ctx_t mca_spml_ucx_ctx_default = {
89-
NULL, /* ucp_worker */
90-
NULL, /* ucp_peers */
91-
0 /* options */
89+
.ucp_worker = NULL,
90+
.ucp_peers = NULL,
91+
.options = 0
9292
};
9393

9494
int mca_spml_ucx_enable(bool enable)

0 commit comments

Comments
 (0)