Debian Codegraph @

src/mpid/ch3/channels/nemesis/include/mpid_nem_nets.h

raw
1 /*
2 * Copyright (C) by Argonne National Laboratory
3 * See COPYRIGHT in top-level directory
4 */
5
6 #ifndef MPID_NEM_NETS_H_INCLUDED
7 #define MPID_NEM_NETS_H_INCLUDED
8
9 typedef int (* MPID_nem_net_module_init_t)(MPIDI_PG_t *pg_p, int pg_rank,
10 char **bc_val_p, int *val_max_sz_p);
11 typedef int (* MPID_nem_net_module_finalize_t)(void);
12 #ifdef ENABLE_CHECKPOINTING
13 typedef int (* MPID_nem_net_module_ckpt_precheck_t)(void);
14 typedef int (* MPID_nem_net_module_ckpt_restart_t)(void);
15 typedef int (* MPID_nem_net_module_ckpt_continue_t)(void);
16 #endif
17 typedef int (* MPID_nem_net_module_poll_t)(int in_blocking_poll);
18 typedef int (* MPID_nem_net_module_get_business_card_t)(int my_rank, char **bc_val_p, int *val_max_sz_p);
19 typedef int (* MPID_nem_net_module_connect_to_root_t)(const char *business_card, MPIDI_VC_t *new_vc);
20 typedef int (* MPID_nem_net_module_vc_init_t)(MPIDI_VC_t *vc);
21 typedef int (* MPID_nem_net_module_vc_destroy_t)(MPIDI_VC_t *vc);
22 typedef int (* MPID_nem_net_module_vc_terminate_t)(MPIDI_VC_t *vc);
23 typedef int (* MPID_nem_net_module_anysource_iprobe_t)(int tag, MPIR_Comm *comm, int context_offset, int *flag,
24 MPI_Status *status);
25 typedef int (* MPID_nem_net_module_anysource_improbe_t)(int tag, MPIR_Comm *comm, int context_offset, int *flag,
26 MPIR_Request **message, MPI_Status *status);
27
28 typedef void (* MPID_nem_net_module_vc_dbg_print_sendq_t)(FILE *stream, MPIDI_VC_t *vc);
29 typedef int (* MPID_nem_net_module_get_ordering_t)(int *ordering);
30
31 typedef struct MPID_nem_netmod_funcs
32 {
33 MPID_nem_net_module_init_t init;
34 MPID_nem_net_module_finalize_t finalize;
35 #ifdef ENABLE_CHECKPOINTING
36 MPID_nem_net_module_ckpt_precheck_t ckpt_precheck;
37 MPID_nem_net_module_ckpt_restart_t ckpt_restart;
38 MPID_nem_net_module_ckpt_continue_t ckpt_continue;
39 #endif
40 MPID_nem_net_module_poll_t poll;
41 MPID_nem_net_module_get_business_card_t get_business_card;
42 MPID_nem_net_module_connect_to_root_t connect_to_root;
43 MPID_nem_net_module_vc_init_t vc_init;
44 MPID_nem_net_module_vc_destroy_t vc_destroy;
45 MPID_nem_net_module_vc_terminate_t vc_terminate;
46 MPID_nem_net_module_anysource_iprobe_t anysource_iprobe;
47 MPID_nem_net_module_anysource_improbe_t anysource_improbe;
48 MPID_nem_net_module_get_ordering_t get_ordering;
49 } MPID_nem_netmod_funcs_t;
50
51 extern MPID_nem_net_module_vc_dbg_print_sendq_t MPID_nem_net_module_vc_dbg_print_sendq;
52
53 /* table of all netmod functions */
54 extern MPID_nem_netmod_funcs_t *MPID_nem_netmod_funcs[];
55 /* netmod functions for the netmod being used */
56 extern MPID_nem_netmod_funcs_t *MPID_nem_netmod_func;
57 extern int MPID_nem_netmod_id;
58 extern int MPID_nem_num_netmods;
59 #define MPID_NEM_MAX_NETMOD_STRING_LEN 64
60 extern char MPID_nem_netmod_strings[][MPID_NEM_MAX_NETMOD_STRING_LEN];
61
62 int MPID_nem_net_init(void);
63
64 #endif /* MPID_NEM_NETS_H_INCLUDED */